Modern C++ Kafka API
ConsumerConfig.h
1 #pragma once
2 
3 #include <kafka/Project.h>
4 
5 #include <kafka/ClientConfig.h>
6 
7 
8 namespace KAFKA_API { namespace clients { namespace consumer {
9 
13 class ConsumerConfig: public Config
14 {
15 public:
16  ConsumerConfig() = default;
17  ConsumerConfig(const ConsumerConfig&) = default;
18  explicit ConsumerConfig(const PropertiesMap& kvMap): Config(kvMap) {}
19 
20 
26  static const constexpr char* GROUP_ID = "group.id";
27 
31  static const constexpr char* ENABLE_AUTO_COMMIT = "enable.auto.commit";
32 
39  static const constexpr char* AUTO_OFFSET_RESET = "auto.offset.reset";
40 
45  static const constexpr char* ENABLE_PARTITION_EOF = "enable.partition.eof";
46 
51  static const constexpr char* MAX_POLL_RECORDS = "max.poll.records";
52 
58  static const constexpr char* QUEUED_MIN_MESSAGES = "queued.min.messages";
59 
65  static const constexpr char* SESSION_TIMEOUT_MS = "session.timeout.ms";
66 
72  static const constexpr char* ISOLATION_LEVEL = "isolation.level";
73 
74  /*
75  * The name of one or more partition assignment strategies.
76  * The elected group leader will use a strategy supported by all members of the group to assign partitions to group members.
77  * Available options: range, roundrobin, cooperative-sticky
78  * Default value: range,roundrobin
79  */
80  static const constexpr char* PARTITION_ASSIGNMENT_STRATEGY = "partition.assignment.strategy";
81 };
82 
83 } } } // end of KAFKA_API::clients::consumer
84 
Configuration for Kafka clients.
Definition: ClientConfig.h:14
Configuration for the Kafka Consumer.
Definition: ConsumerConfig.h:14
static constexpr const char * QUEUED_MIN_MESSAGES
Minimum number of messages per topic/partition tries to maintain in the local consumer queue.
Definition: ConsumerConfig.h:58
static constexpr const char * AUTO_OFFSET_RESET
This property controls the behavior of the consumer when it starts reading a partition for which it d...
Definition: ConsumerConfig.h:39
static constexpr const char * ENABLE_PARTITION_EOF
Emit RD_KAFKA_RESP_ERR_PARTITION_EOF event whenever the consumer reaches the end of a partition.
Definition: ConsumerConfig.h:45
static constexpr const char * ENABLE_AUTO_COMMIT
Automatically commits previously polled offsets on each poll operation.
Definition: ConsumerConfig.h:31
static constexpr const char * GROUP_ID
Group identifier.
Definition: ConsumerConfig.h:26
static constexpr const char * SESSION_TIMEOUT_MS
Client group session and failure detection timeout.
Definition: ConsumerConfig.h:65
static constexpr const char * MAX_POLL_RECORDS
This controls the maximum number of records that a single call to poll() will return.
Definition: ConsumerConfig.h:51
static constexpr const char * ISOLATION_LEVEL
Control how to read messages written transactionally.
Definition: ConsumerConfig.h:72