OffBroadway.EMQTT.MessageHandler behaviour (off_broadway_emqtt v0.3.0)

Copy Markdown View Source

Behaviour for handling messages received from the MQTT broker.

Custom message handlers can transform MQTT messages into Broadway messages. The default implementation extracts the payload as data and remaining fields as metadata.

Summary

Types

ack_ref()

@type ack_ref() :: any()

message()

@type message() :: map()

Callbacks

handle_message(message, ack_ref, opts)

@callback handle_message(message :: message(), ack_ref :: ack_ref(), opts :: keyword()) ::
  Broadway.Message.t()

Functions

handle_message(message, ack_ref, opts)