Replies: 1 comment
-
Can rd_kafka_subscribe() and rd_kafka_assign() be used together? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
method one:
rd_kafka_resp_err_t err = rd_kafka_subscribe(m_kafka_handle, m_kafka_topic_partition_list);
result:
[root@localhost bin]# ./kafka-consumer-groups.sh --bootstrap-server 10.8.13.170:19092,10.8.13.171:19092,10.8.13.172:19092 --describe --group group1
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
group1 topic1 0 15 15 0 rdkafka-6fd75c14-d682-4e41-9f62-c438f2a168c6 /10.8.13.167 rdkafka
group1 topic1 1 36 36 0 rdkafka-6fd75c14-d682-4e41-9f62-c438f2a168c6 /10.8.13.167 rdkafka
group1 topic1 2 25 25 0 rdkafka-6fd75c14-d682-4e41-9f62-c438f2a168c6 /10.8.13.167 rdkafka
Method Two:
rd_kafka_assign (m_kafka_handle, m_kafka_topic_partition_list);
result:
[root@localhost bin]# ./kafka-consumer-groups.sh --bootstrap-server 10.8.13.170:19092,10.8.13.171:19092,10.8.13.172:19092 --describe --group group1
Consumer group 'group1' has no active members.
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
group1 topic1 1 36 39 3 - - -
group1 topic1 0 15 18 3 - - -
group1 topic1 2 25 28 3 - - -
Beta Was this translation helpful? Give feedback.
All reactions