open-horizon-services / service-mqtt

This is a multi-platform Open Horizon service-based message queue broker. It provides an MQTT broker and publisher for inter-container communication.
0 stars 3 forks source link
hacktoberfest

Horizon MQTT Broker Service

Latest Version Supports amd64 Architecture Supports arm Architecture Supports arm64 Architecture

The MQTT Broker service provides an mqtt broker and publisher for inter-container commmunication.

API:


Authentication:

This service is configured to use password-based authentication. By default, the username is set to mqtt and the password is password. To customize these attributes, please set these environment variables.

export MQTT_USERNAME=<desired-username>
export MQTT_PASSWORD=<desired-password>

Publishing:

mosquitto_pub [-d] [-h host] [-p port] {-f file | -m message} [-t topic] [-u username] [-P password]

Parameters:

Name Description
-h host name
-d put the broker into the background after starting
-p publish on the specified port
-f send the contents of a file as the message
-m message payload to send
-t mqtt topic to publish to
-u mqtt username
-P mqtt password

Subscribing:

mosquitto_sub [-h host] [-p port] [-t topic] [-u username] [-P password]

Parameters:

Name Description
-h host name
-p subscribe on the specified port
-t mqtt topic to subscribe to
-u mqtt username
-P mqtt password