Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection State #418

Closed
twaters opened this issue Nov 11, 2015 · 5 comments
Closed

Connection State #418

twaters opened this issue Nov 11, 2015 · 5 comments

Comments

@twaters
Copy link

twaters commented Nov 11, 2015

The event callback can tell me when the connection to the broker has failed. But is there a way to know when the connection is re-established? The only thing I can see at the moment is a debug log.

@edenhill
Copy link
Contributor

Nope, not currently.

What this usually boils down to is some event mechanism for monitoring availability of the leader brokers for your desired partitions, eg #137

I guess that's what you are after?

@twaters
Copy link
Author

twaters commented Nov 11, 2015

Yep, something like that is exactly what I'm looking for.

@jonathanwang2005
Copy link

+1. It will be very useful to have an event notification when a broker is available after ALL_BROKERS_DOWN.

@edenhill
Copy link
Contributor

edenhill commented Apr 4, 2017

We probably want these events:

  • BROKER_ADDED - hostname, id
  • [BROKER_REMOVED (brokers are currently not removed from librdkafka) - hostname, id, reason]
  • BROKER_UP - hostname, id
  • BROKER_DOWN - hostname, id, reason
  • ALL_BROKERS_DOWN - reason
  • PARTITION_LEADER_UP - topic, partition, hostname, id, reason
  • PARTITION_LEADER_DOWN - topic, partition, hostname, id
  • GROUP_COORDINATOR_UP - hostname, id
  • GROUP_COORDINATOR_DOWN - hostname, id, reason

@briot
Copy link
Contributor

briot commented Nov 24, 2017

I like the proposal with the various kinds of events.

The scenario I currently have is the following: I have two brokers, and a topic with multiple partitions, but replication_factory=1 (the problem can be generalized with more brokers and higher replication factory).

When one of the two brokers goes down, I am getting a msg_timeout error (as expected) for my high-level consumer. But the error callback does not provide any information as to which broker is down. So my program must assume they are all down, and let listeners know they will not be getting new messages for the time being. Would be nice to have more detailed information, and the proposed PARTITION_LEADER_DOWN error would be useful !

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants