OffBroadway.EMQTT.MessageHandler behaviour (off_broadway_emqtt v0.2.0)
View SourceBehaviour for handling messages received from the MQTT broker. Custom message handlers can be implemented by defining a module that implements this behaviour.
Summary
Callbacks
Callback invoked after a successful connection to the MQTT broker.
Callback invoked after a disconnect from the MQTT broker.
Messages are passed to this function after the producer has received them from the MQTT broker.
PUBREL
messages received from the MQTT broker are passed to this function.
Types
Callbacks
Callback invoked after a successful connection to the MQTT broker.
@callback handle_disconnect({reason :: reason_code(), properties :: term()} | atom()) :: any() | mfa()
Callback invoked after a disconnect from the MQTT broker.
@callback handle_message(message :: message(), broadway :: broadway(), opts :: keyword()) :: any() | mfa()
Messages are passed to this function after the producer has received them from the MQTT broker.
PUBREL
messages received from the MQTT broker are passed to this function.