View Source brod_cg_commits (brod v3.17.0)
Link to this section Summary
Types
-1 to use whatever configured in kafka
Functions
This function is called only when
partition_assignment_strategy
is set for callback_implemented
in group config.Called by group coordinator when there is new assignment received.
Called by group coordinator before re-joinning the consumer group.
Called by group coordinator when initializing the assignments for subscriber. NOTE: this function is called only when it is DISABLED to commit offsets to kafka. i.e. offset_commit_policy is set to consumer_managed
Force commit offsets.
Start (link) a group member. The member will try to join the consumer group and get assignments for the given topic-partitions, then commit given offsets to kafka. In case not all given partitions are assigned to it, it will terminate with an exit exception
Stop the process.
Make a call to the resetter process, the call will be blocked until offsets are committed.
Link to this section Types
-type group_id() :: brod:group_id().
-type member_id() :: brod:group_member_id().
-type offset() :: brod:offset().
-type partition() :: brod:partition().
-type pending_sync() :: undefined | gen_server:from().
-type prop_key() :: id | topic | retention | protocol | offsets.
-type prop_val() :: group_id() | topic() | retention() | offsets() | brod_group_coordinator:protocol_name().
-type retention() :: integer().
-type state() :: #state{}.
-type topic() :: brod:topic().
Link to this section Functions
-spec assign_partitions(pid(), [brod:group_member()], [{brod:topic(), brod:partition()}]) -> [{member_id(), [brod:partition_assignment()]}].
partition_assignment_strategy
is set for callback_implemented
in group config.
Link to this function
assignments_received(Pid, MemberId, GenerationId, TopicAssignments)
View Source-spec assignments_received(pid(), member_id(), integer(), brod:received_assignments()) -> ok.
-spec assignments_revoked(pid()) -> ok.
-spec get_committed_offsets(pid(), [{brod:topic(), brod:partition()}]) -> {ok, [{{brod:topic(), brod:partition()}, brod:offset()}]}.
-spec start_link(brod:client(), group_input()) -> {ok, pid()} | {error, any()}.
-spec stop(pid()) -> ok.
-spec sync(pid()) -> ok.