Skip to main content

Weapons grade MQTT client.

Project description

The haka_mqtt package is reliable “weapons grade” MQTT client library. It contains a core mqtt reactor class built with provable reliability, and reproducibility as its fundamental goals. A side effect is that the library turns out to be speedy as well.


The project’s core reactor is stable. It has been tested on systems with thousands of distributed nodes in difficult field conditions.


The haka-mqtt package can be from with pip:

pip install haka-mqtt


A quick example of how the package can be used:

# Standard python Packages
import logging

# 3rd-Party Packages
from haka_mqtt.frontends.poll import (
from haka_mqtt.reactor import ACTIVE_STATES
from mqtt_codec.packet import MqttTopic

LOG_FMT='%(asctime)s %(name)s %(levelname)s %(message)s'
logging.basicConfig(format=LOG_FMT, level=logging.INFO)

properties = MqttPollClientProperties() = ''
properties.port = 1883
properties.ssl = False

TOPIC = 'haka'

c = BlockingMqttClient(properties)
sub_ticket = c.subscribe([MqttTopic(TOPIC, 1)])
c.on_suback = lambda c, suback: c.publish(TOPIC, 'payload', 1)
c.on_publish = lambda c, publish: c.stop()

while c.state in ACTIVE_STATES:

Project Infrastructure

The project is coordinated through public infrastructure available at several places:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
haka-mqtt-0.3.2.tar.gz (27.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page