elsa v0.12.3 Elsa.Group.Acknowledger

Handles acknowledgement of messages to the group coordinator to prevent the group manager from queuing up messages for acknowledgement when events such as a rebalance occur.

Link to this section Summary

Functions

Trigger acknowledgement of processed messages back to the cluster.

Trigger acknowledgement of processed messages back to the cluster.

Returns a specification to start this module under a supervisor.

Retrieve the latest offset for a topic and partition. Primarily used for reinitializing consumer workers to the latest unacknowledged offset after a rebalance or other disruption.

Instantiate an acknowledger process and register it to the Elsa registry.

Sync the group generation ID back to the acknowledger state for validation.

Link to this section Functions

Link to this function

ack(connection, map)

ack(Elsa.connection(), %{
  topic: Elsa.topic(),
  partition: Elsa.partition(),
  generation_id: Elsa.Group.Manager.generation_id(),
  offset: integer()
}) :: :ok

Trigger acknowledgement of processed messages back to the cluster.

Link to this function

ack(connection, topic, partition, generation_id, offset)

Trigger acknowledgement of processed messages back to the cluster.

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

get_latest_offset(acknowledger, topic, partition)

Retrieve the latest offset for a topic and partition. Primarily used for reinitializing consumer workers to the latest unacknowledged offset after a rebalance or other disruption.

Link to this function

start_link(opts)

start_link(term()) :: GenServer.on_start()

Instantiate an acknowledger process and register it to the Elsa registry.

Link to this function

update_generation_id(acknowledger, generation_id)

update_generation_id(GenServer.server(), Elsa.Group.Manager.generation_id()) ::
  :ok

Sync the group generation ID back to the acknowledger state for validation.