Skip to main content

FP MQTT Broker Package

A flexible MQTT broker package for IoT services that supports optional message handlers, allowing different services to subscribe and handle MQTT messages independently.

Features

  • Flexible Message Handling: Support for multiple, optional message handlers
  • Easy Configuration: Simple configuration through dictionaries or BrokerConfig objects
  • Extensible: Abstract interfaces for easy customization
  • Production Ready: Built-in error handling, reconnection logic, and logging

Installation

pip install -e .

Usage

from fp_mqtt_broker import BrokerFactory
from fp_mqtt_broker.abstractions import MessageHandler

config = {
    'mqtt': {
        'broker_host': 'localhost',
        'broker_port': 1883,
        'client_id': 'my_service'
    }
}

# Define a custom message handler
class MyMessageHandler(MessageHandler):
    def get_subscribed_topics(self) -> list:
        return ['my/topic']

    def handle_message(self, topic: str, payload: str):
        print(f"Received message on {topic}: {payload}")

# Create and connect the broker with the custom message handler
broker = BrokerFactory.create_broker(config, [MyMessageHandler()])
broker.connect()

Testing

pytest -v

Metadata

Release files for fp-mqtt-broker 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fp-mqtt-broker 0.1.2
File Size Uploaded Provenance
fp_mqtt_broker-0.1.2.tar.gz 7.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fp-mqtt-broker 0.1.2
File Interpreter ABI Platform
fp_mqtt_broker-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / fp_mqtt_broker-0.1.2.tar.gz

Download URL fp_mqtt_broker-0.1.2.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7f2a8f75cc2fdbd94bbd2055f9a5c6c01f19278d09c9e282ca1969023ceb7946
BLAKE2b-256 checksum
How to use checksums
deaa33388ba8e5ba6608eb5e74fbd0574e94b19e248b74f30b71a73cd87d740b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / fp_mqtt_broker-0.1.2-py3-none-any.whl

Download URL fp_mqtt_broker-0.1.2-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab06c3c092d81b1632f65767f3dc6628445335bcffd67999c6bf9f3f9cd6ffe8
BLAKE2b-256 checksum
How to use checksums
af4a52ab34ab55751cb4a38dceb578400829d1a50269e9232e4f192460e0c153
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for fp-mqtt-broker 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page