franz/group_subscriber

Types

pub type CallbackReturn
pub opaque type GroupBuilder(callback_init_state)

Functions

pub fn ack(cb_state: a) -> CallbackReturn

Acknowledge the processing of the message.

pub fn commit(cb_state: a) -> CallbackReturn

Commit the offset of the last message that was successfully processed.

pub fn new(
  client: FranzClient,
  group_id: String,
  topics: List(String),
  message_type: MessageType,
  callback: fn(KafkaMessage, a) -> CallbackReturn,
  init_callback_state: a,
) -> GroupBuilder(a)

Create a new group subscriber builder.

pub fn start(
  group_builder: GroupBuilder(a),
) -> Result(Pid, FranzError)

Start a new group subscriber.

pub fn stop(pid: Pid) -> Result(Nil, FranzError)
pub fn with_consumer_config(
  group_builder: GroupBuilder(a),
  consumer_config: ConsumerConfig,
) -> GroupBuilder(a)

Add a consumer configuration to the group builder.

pub fn with_group_config(
  group_builder: GroupBuilder(a),
  group_config: GroupConfig,
) -> GroupBuilder(a)

Add a group configuration to the group builder.

Search Document