Hi,
I have few questions which I want to ask this community.
A>>>>>>>>>>>
I have gone through some threads on reading from different partitions of a topic.
Which approach is better:
1>Redirect messages from different partitions to the shared queue (rd_kafka_queue_new).
Or
2> Without shared queue instead directly calling rd_kafka_consume_start on each partition. Then register same callback method using rd_kafka_consume_callback for each partition.
B>>>>>>>>>>>
After running above scenario, I saw one set of TCP connections between consumer and each of the brokers of the topic. Basically, with creation of one Kafka handle via following API call
rd_kafka_new(RD_KAFKA_CONSUMER, conf,
errstr, sizeof(errstr)))
Using this Kafka handle, I consumed messages from all partitions of a topic.
If I want to read messages from another topic, is it possible to reuse the same Kafka handle created above (so that number of TCP connections are limited) ?
Creating a new Kafka handle per topic works.
C>>>>>>>>>>>
A generic question regarding Kafka. Do you know when a offset for a partition gets reset to 0.
Thanks in advance for your responses.
Hi,
I have few questions which I want to ask this community.
A>>>>>>>>>>>
I have gone through some threads on reading from different partitions of a topic.
Which approach is better:
1>Redirect messages from different partitions to the shared queue (rd_kafka_queue_new).
Or
2> Without shared queue instead directly calling rd_kafka_consume_start on each partition. Then register same callback method using rd_kafka_consume_callback for each partition.
B>>>>>>>>>>>
After running above scenario, I saw one set of TCP connections between consumer and each of the brokers of the topic. Basically, with creation of one Kafka handle via following API call
rd_kafka_new(RD_KAFKA_CONSUMER, conf,
errstr, sizeof(errstr)))
Using this Kafka handle, I consumed messages from all partitions of a topic.
If I want to read messages from another topic, is it possible to reuse the same Kafka handle created above (so that number of TCP connections are limited) ?
Creating a new Kafka handle per topic works.
C>>>>>>>>>>>
A generic question regarding Kafka. Do you know when a offset for a partition gets reset to 0.
Thanks in advance for your responses.