brodex v0.0.2 Brodex.GroupSubscriber behaviour View Source
Wrapper of :brod_group_subscriber.
Link to this section Summary
Types
A spec for callback.
Link to this section Types
A spec for callback.
module must implement Brodex.GroupSubscriber behaviour.
Link to this type
start_link_option()
View Sourcestart_link_option() ::
{:group_config, Brodex.group_config()}
| {:consumer_config, Brodex.consumer_config()}
| {:message_type, :message | :message_set}
Link to this section Functions
Link to this function
start_link(client, group_id, topics, callback_spec, options)
View Sourcestart_link( Brodex.client(), Brodex.group_id(), [Brodex.topic()], callback_spec(), [start_link_option()] ) :: {:ok, pid()} | {:error, term()}
Wrapper of :brod_group_subscriber.start_link/8.
Wrapper of :brod_group_subscriber.stop/1.
Link to this section Callbacks
Link to this callback
handle_message(topic, partition, message_or_message_set, callback_state)
View Sourcehandle_message( topic :: Brodex.topic(), partition :: Brodex.partition(), message_or_message_set :: Brodex.Message.record() | Brodex.MessageSet.record(), callback_state :: callback_state() ) :: {:ok, callback_state()} | {:ok, :ack, callback_state()} | {:ok, :ack_no_commit, callback_state()}
Link to this callback
init(group_id, term)
View Sourceinit(group_id :: Brodex.group_id(), term()) :: {:ok, callback_state()}