3 #include <kafka/Project.h>
5 #include <kafka/Error.h>
6 #include <kafka/RdKafkaHelper.h>
7 #include <kafka/Types.h>
9 #include <librdkafka/rdkafka.h>
14 namespace KAFKA_API {
namespace clients {
namespace consumer {
20 enum class RebalanceEventType { PartitionsAssigned, PartitionsRevoked };
25 using RebalanceCallback = std::function<void(RebalanceEventType eventType,
const TopicPartitions& topicPartitions)>;
30 #if COMPILER_SUPPORTS_CPP_17
31 const inline RebalanceCallback NullRebalanceCallback = RebalanceCallback{};
33 const static RebalanceCallback NullRebalanceCallback = RebalanceCallback{};
39 using OffsetCommitCallback = std::function<void(
const TopicPartitionOffsets& topicPartitionOffsets,
const Error& error)>;
44 #if COMPILER_SUPPORTS_CPP_17
45 const inline OffsetCommitCallback NullOffsetCommitCallback = OffsetCommitCallback{};
47 const static OffsetCommitCallback NullOffsetCommitCallback = OffsetCommitCallback{};
58 const rd_kafka_consumer_group_metadata_t* rawHandle()
const {
return _rkConsumerGroupMetadata.get(); }
61 rd_kafka_consumer_group_metadata_unique_ptr _rkConsumerGroupMetadata;