Log in
Linked Applications
Loading…
Spaces
Glossaries
Create
Create
Hit enter to search
Announcement Banner
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
Cash Collection Wiki
Pages
…
Cash Collection Wiki Home
Digital Mining
SolvExtract
MQTT
Mosquitto configuration
Mosquitto configuration
search
attachments
weblink
advanced
image-effects
image-attributes
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
Colour picker
More colours
Formatting
Strikethrough
Subscript
Superscript
Monospace
Clear formatting
Bullet list
Numbered list
Task list
Outdent
Indent
Align left
Align center
Align right
Page layout
Link
Table
Insert
Insert content
Files and images
Link
Markup
Horizontal rule
Task list
Date
Symbol
Insert macro
User mention
Jira Issue/Filter
Info
Add Lucidchart Diagram
draw.io Diagram
Embed draw.io Diagram
draw.io Board Diagram
Status
Gallery
Table of Contents
Google Drive Live Link
Embedded Google Drive Folder
Embedded Google Drive File
Google Drive Search Result
Other macros
Page layout
No layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard shortcuts help
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account.
This page is also being edited by
. Your changes will be merged with theirs when you save.
<h1 style="text-align: left;">Mosquitto.conf</h1><h3 style="text-align: left;">1. Project Overview</h3><p style="text-align: left;"><strong>Purpose and Scope:</strong><br />This configuration file sets up a Mosquitto MQTT broker for development and testing purposes. It enables unencrypted, unauthenticated MQTT communication on port 1883, allowing rapid prototyping and local integration with MQTT clients (such as the Freeport FMI subscriber described previously).</p><p style="text-align: left;"><strong>Primary Use Cases:</strong></p><ul style="text-align: left;"><li>Local development and testing of MQTT-based applications.</li><li>Integration testing with clients that publish or subscribe to sensor data topics.</li></ul><p style="text-align: left;"><strong>What the System Explicitly Does Not Handle:</strong></p><ul style="text-align: left;"><li>Production-grade security (no authentication, no TLS/mTLS).</li><li>Access control or topic-level permissions.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">2. System Architecture</h3><p style="text-align: left;"><strong>Core Components and Responsibilities:</strong></p><ul style="text-align: left;"><li><strong>Mosquitto Broker:</strong><span> </span>Listens for MQTT connections on port 1883, accepts anonymous clients, and persists messages.</li><li><strong>Persistence Layer:</strong><span> </span>Stores broker state and messages at<span> </span><code class="undefined">/var/lib/mosquitto/</code>.</li><li><strong>Logging:</strong><span> </span>Outputs logs to stdout with various log levels enabled.</li></ul><p style="text-align: left;"><strong>Data and Control Flow:</strong></p><ul style="text-align: left;"><li>Clients connect to the broker (no authentication required).</li><li>Clients can publish/subscribe to any topic (no restrictions).</li><li>Broker logs all connection, subscription, and message events.</li></ul><p style="text-align: left;"><strong>External Services and Dependencies:</strong></p><ul style="text-align: left;"><li>None required for broker operation; clients connect over the network.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">3. Core Concepts & Domain Logic</h3><p style="text-align: left;"><strong>Key Abstractions and Domain Terms:</strong></p><ul style="text-align: left;"><li><strong>MQTT Listener:</strong><span> </span>Accepts incoming MQTT connections on a specified port.</li><li><strong>Anonymous Access:</strong><span> </span>No username/password required for client connections.</li><li><strong>Persistence:</strong><span> </span>Broker state and messages are saved to disk for durability.</li><li><strong>Topic Structure:</strong><span> </span>Expected topics follow the pattern<span> </span><code class="undefined">FCTS/FAE/<site>/SolvExtract/<pi_tag></code>.</li></ul><p style="text-align: left;"><strong>Business or Technical Invariants:</strong></p><ul style="text-align: left;"><li>All clients are treated equally (no authentication or authorization).</li><li>Message size is limited to 10MB.</li><li>Up to 1000 concurrent connections and 1000 queued messages are allowed.</li></ul><p style="text-align: left;"><strong>Mental Model:</strong></p><ul style="text-align: left;"><li>The broker is open and permissive, suitable only for isolated development environments.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">4. Codebase Structure</h3><p style="text-align: left;"><strong>High-level Layout:</strong></p><ul style="text-align: left;"><li>Single configuration file for Mosquitto.</li><li>No code; all behavior is declaratively specified.</li></ul><p style="text-align: left;"><strong>Responsibility Boundaries:</strong></p><ul style="text-align: left;"><li>Broker configuration (network, persistence, logging, limits).</li><li>No application logic or message processing.</li></ul><p style="text-align: left;"><strong>What Changes Together:</strong></p><ul style="text-align: left;"><li>Security settings (authentication, TLS) must be updated together for production.</li><li>Topic structure and message expectations should be coordinated with client applications.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">5. Configuration & Environment</h3><p style="text-align: left;"><strong>Environment Variables:</strong></p><ul style="text-align: left;"><li>Not used; all configuration is static in the file.</li></ul><p style="text-align: left;"><strong>Configuration Files:</strong></p><ul style="text-align: left;"><li>This file configures the Mosquitto broker.</li></ul><p style="text-align: left;"><strong>Differences Between Local, Staging, and Production:</strong></p><ul style="text-align: left;"><li>This configuration is for local/development only. Production should:<ul><li>Disable<span> </span><code class="undefined">allow_anonymous</code>.</li><li>Enable authentication and TLS/mTLS.</li><li>Restrict topics and apply access controls.</li></ul></li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">6. Runtime Behavior</h3><p style="text-align: left;"><strong>Startup Sequence:</strong></p><ul style="text-align: left;"><li>Mosquitto reads this configuration on startup.</li><li>Listens on port 1883 for incoming connections.</li><li>Initializes persistence and logging.</li></ul><p style="text-align: left;"><strong>Normal Execution Flow:</strong></p><ul style="text-align: left;"><li>Accepts client connections and subscriptions.</li><li>Handles message publishing and delivery.</li><li>Logs all relevant events to stdout.</li></ul><p style="text-align: left;"><strong>Error Handling and Logging Strategy:</strong></p><ul style="text-align: left;"><li>Logs errors, warnings, notices, information, subscribe/unsubscribe events.</li><li>No advanced error handling; relies on Mosquitto defaults.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">7. Deployment & Operations</h3><p style="text-align: left;"><strong>Build Process:</strong></p><ul style="text-align: left;"><li>None; deploy Mosquitto and provide this config file.</li></ul><p style="text-align: left;"><strong>Deployment Method:</strong></p><ul style="text-align: left;"><li>Start Mosquitto with this configuration (e.g.,<span> </span><code class="undefined">mosquitto -c /path/to/config</code>).</li></ul><p style="text-align: left;"><strong>Runtime Dependencies:</strong></p><ul style="text-align: left;"><li>File system access to<span> </span><code class="undefined">/var/lib/mosquitto/</code><span> </span>for persistence.</li></ul><p style="text-align: left;"><strong>Scaling and Rollback Considerations:</strong></p><ul style="text-align: left;"><li>Supports up to 1000 concurrent connections.</li><li>Rollback is as simple as restoring a previous config file.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">8. Extending the System</h3><p style="text-align: left;"><strong>Where and How to Add New Features:</strong></p><ul style="text-align: left;"><li>For security, add authentication and TLS/mTLS sections.</li><li>For access control, define ACLs and restrict topics.</li><li>For production, disable<span> </span><code class="undefined">allow_anonymous</code><span> </span>and set<span> </span><code class="undefined">password_file</code><span> </span>and<span> </span><code class="undefined">cafile</code>.</li></ul><p style="text-align: left;"><strong>Recommended Patterns:</strong></p><ul style="text-align: left;"><li>Use separate config files for development and production.</li><li>Version control configuration files.</li></ul><p style="text-align: left;"><strong>Anti-patterns and Risk Areas:</strong></p><ul style="text-align: left;"><li>Never use this configuration in production.</li><li>Avoid exposing port 1883 to untrusted networks.</li></ul><p style="text-align: left;"><strong>Testing Strategy:</strong></p><ul style="text-align: left;"><li>Test with local clients for connectivity and message flow.</li><li>Validate persistence and logging behavior.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">9. Security & Compliance</h3><p style="text-align: left;"><strong>Authentication and Authorization:</strong></p><ul style="text-align: left;"><li>None enabled; all clients are anonymous.</li></ul><p style="text-align: left;"><strong>Secrets Handling:</strong></p><ul style="text-align: left;"><li>None present in this config.</li></ul><p style="text-align: left;"><strong>Data Sensitivity Considerations:</strong></p><ul style="text-align: left;"><li>All data is accessible to any client; do not use for sensitive or production data.</li></ul><hr style="text-align: left;" /><h3 style="text-align: left;">10. Common Pitfalls & Gotchas</h3><ul style="text-align: left;"><li><strong>No Security:</strong><span> </span>Anyone can connect and publish/subscribe to any topic.</li><li><strong>Persistence Location:</strong><span> </span>Ensure<span> </span><code class="undefined">/var/lib/mosquitto/</code><span> </span>is writable and has sufficient space.</li><li><strong>Message Size Limit:</strong><span> </span>Messages over 10MB are rejected.</li><li><strong>Connection Limits:</strong><span> </span>Exceeding 1000 connections or queued messages will result in dropped connections/messages.</li><li><strong>Logging:</strong><span> </span>All logs go to stdout; may need redirection or log rotation in some environments.</li><li><strong>TODOs:</strong><span> </span>The configuration explicitly notes that security is not implemented and must be addressed before production use.</li></ul>
Edit
Preview
Save
Close
{"serverDuration": 314, "requestCorrelationId": "279eb665f3aeb3b9"}