pub unsafe extern "C" fn rd_kafka_commit(
rk: *mut rd_kafka_t,
offsets: *const rd_kafka_topic_partition_list_t,
async_: c_int,
) -> rd_kafka_resp_err_t
Expand description
Commit offsets on broker for the provided list of partitions.
offsets should contain
topic, partition,
offset and possibly
metadata. The
offset should be the offset where consumption will
resume, i.e., the last processed offset + 1.
If `offsets is NULL the current partition assignment will be used instead.
If `async is false this operation will block until the broker offset commit is done, returning the resulting success or error code.
If a rd_kafka_conf_set_offset_commit_cb() offset commit callback has been configured the callback will be enqueued for a future call to rd_kafka_poll(), rd_kafka_consumer_poll() or similar.
Returns An error code indiciating if the commit was successful, or successfully scheduled if asynchronous, or failed. RD_KAFKA_RESP_ERR__FATAL is returned if the consumer has raised a fatal error.
FIXME: Update below documentation.
RD_KAFKA_RESP_ERR_STALE_MEMBER_EPOCH is returned, when
using group.protocol=consumer
, if the commit failed because the
member has switched to a new member epoch.
This error code can be retried.
Partition level error is also set in the `offsets.
RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID is returned, when
using group.protocol=consumer
, if the member has been
removed from the consumer group
This error code is permanent, uncommitted messages will be
reprocessed by this or a different member and committed there.
Partition level error is also set in the `offsets.