Function rd_kafka_assignment

Source
pub unsafe extern "C" fn rd_kafka_assignment(
    rk: *mut rd_kafka_t,
    partitions: *mut *mut rd_kafka_topic_partition_list_t,
) -> rd_kafka_resp_err_t
Expand description

Returns the current partition assignment as set by rd_kafka_assign() or rd_kafka_incremental_assign().

Returns An error code on failure, otherwise \p partitions is updated to point to a newly allocated partition list (possibly empty).

@remark The application is responsible for calling rd_kafka_topic_partition_list_destroy on the returned list.

@remark This assignment represents the partitions assigned through the assign functions and not the partitions assigned to this consumer instance by the consumer group leader. They are usually the same following a rebalance but not necessarily since an application is free to assign any partitions.