package
0.23.2
Repository: https://github.com/mainfluxlabs/mainflux.git
Documentation: pkg.go.dev

# README

Messaging

messaging package defines Publisher, Subscriber and an aggregate Pubsub interface.

Subscriber interface defines methods used to subscribe to a message broker such as MQTT or NATS or RabbitMQ.

Publisher interface defines methods used to publish messages to a message broker such as MQTT or NATS or RabbitMQ.

Pubsub interface is composed of Publisher and Subscriber interface and can be used to send messages to as well as to receive messages from a message broker.

# Packages

No description provided by the author
Package mqtt hold the implementation of the Publisher and PubSub interfaces for the MQTT messaging system, the internal messaging broker of the Mainflux IoT platform.
Package nats hold the implementation of the Publisher and PubSub interfaces for the NATS messaging system, the internal messaging broker of the Mainflux IoT platform.
Package rabbitmq holds the implementation of the Publisher and PubSub interfaces for the RabbitMQ messaging system, the internal messaging broker of the Mainflux IoT platform.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrConnect indicates that connection to MQTT broker failed.
ErrEmptyID indicates the absence of ID.
ErrEmptyTopic indicates the absence of topic.
ErrMalformedSubtopic indicates that the subtopic is malformed.
ErrNotSubscribed indicates that the topic is not subscribed to.
ErrPublishTimeout indicates that the publishing failed due to timeout.
ErrSubscribeTimeout indicates that the subscription failed due to timeout.
ErrUnsubscribeDeleteTopic indicates that unsubscribe failed because the topic was deleted.
ErrUnsubscribeTimeout indicates that unsubscribe failed due to timeout.

# Interfaces

MessageHandler represents protomfx.Message handler for Subscriber.
Publisher specifies message publishing API.
PubSub represents aggregation interface for publisher and subscriber.
Subscriber specifies message subscription API.