MQTT

MQTT

Type: PubSub

Sends and receives messages using the mqtt protocol.

This driver is doesn't support unsubscribe on a specific subscription. It will unsubscribe all subscriptions of the channel.

Installation

npm install mqtt

Usage

import { mqtt } from '@adaloop/tellthem/drivers/mqtt'
...
buses: {
mqtt: {
driver: mqtt({
protocol: 'mqtt',
host: 'localhost',
port: 1883,
options: {}
})
}
}
...

Options

For more detailed options, feel free to check the mqtt documentation for more details about the configuration.

OptionDescriptionDefault
protocolThe protocol used to connect (mqtt or mqtts).mqtt
hostThe hostname of the mqtt broker.N/A
portThe port of the mqtt broker.1883
optionsThe options of the mqtt broker.N/A

On this page