You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm maintaining a C++ kafka client sdk that wraps librdkafka, and it used rd_kafka_broker_any() (in rdkafka_broker.c) to check if there is any up broker.
Though it's an internal function, it's not a static function, so the sdk explicitly declared this function to call it.
I thought it's not a proper way, so I want to
use error_cb to check if brokers are all down by checking ERR__ALL_BROKERS_DOWN;
use stats_cb to parse json to find if exists some broker that broker[].state == UP.
But the previous maintainer thought it's too complicated to define a callback, parse json or just do some string operations in stats_cb, etc. And it seems not better than just call rd_kafka_broker_any(), except that rd_kafka_broker_destroy() (which is another internal function or macro) must be called to reduce refcnt.
Is there a simpler way to check if brokers recovered from all down ?
Additional, is there any needs to call rd_kafka_produce() to send message to the produce queue in dr_msg_cb when err == RD_KAFKA_ERR__MSG_TIMED_OUT? And if there is other error like ERR_LEADER_NOT_AVAILABLE in dr_msg_cb, and I call rd_kafka_produce() to enqueue the message again, will repeated message produced happen?
Appreciate you response and help.
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
librdkafka version (release number or git tag): 1.0.1
Apache Kafka version: 1.1.0
librdkafka client configuration: <REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
Operating system: <REPLACE with e.g., Centos 5 (x64)>
Provide logs (with debug=.. as necessary) from librdkafka
Provide broker log excerpts
Critical issue
The text was updated successfully, but these errors were encountered:
Read the FAQ first: https://github.com/edenhill/librdkafka/wiki/FAQ
Description
I'm maintaining a C++ kafka client sdk that wraps librdkafka, and it used
rd_kafka_broker_any()
(inrdkafka_broker.c
) to check if there is any up broker.Though it's an internal function, it's not a static function, so the sdk explicitly declared this function to call it.
I thought it's not a proper way, so I want to
ERR__ALL_BROKERS_DOWN
;broker[].state == UP
.Just like #1801.
But the previous maintainer thought it's too complicated to define a callback, parse json or just do some string operations in stats_cb, etc. And it seems not better than just call
rd_kafka_broker_any()
, except thatrd_kafka_broker_destroy()
(which is another internal function or macro) must be called to reduce refcnt.Is there a simpler way to check if brokers recovered from all down ?
Additional, is there any needs to call
rd_kafka_produce()
to send message to the produce queue in dr_msg_cb whenerr == RD_KAFKA_ERR__MSG_TIMED_OUT
? And if there is other error likeERR_LEADER_NOT_AVAILABLE
in dr_msg_cb, and I callrd_kafka_produce()
to enqueue the message again, will repeated message produced happen?Appreciate you response and help.
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
1.0.1
1.1.0
<REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
<REPLACE with e.g., Centos 5 (x64)>
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: