-
Notifications
You must be signed in to change notification settings - Fork 16
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
TopicAutocreate only works if there's at least one topic on broker #18
Comments
Hi orenorgad, I have a couple of questions:
Thanks, |
1.Well, producing with kafka-console-producer acts the same as creating a topic via kafka-topics.sh. Bruce is still stuck until I write a new text event which creates a topic. If I just run the kafka-console-producer without pushing an event, bruce is still "hanging".
Nov 13 21:26:40 ip-10-0-2-15 bruce[13774]: Initial metadata request failed for all known brokers, waiting 66783 milliseconds before retry |
By looking at router_thread.cc, metadata is expected to have at least 1 item in it to break without failure. But when there are no topics just yet metadata will be empty. Thanks for helping Dave. |
This looks like an oversight on my part. Thanks for discovering the problem! Bruce's metadata handling code should accept without complaint a metadata response containing no topics. That would allow the router thread to break out of its loop trying to get a satisfactory metadata response, and handle the topic autocreation. I'll add fixing this issue to my to-do list but it may be a while before I get to it, since I'm currently swamped with things unrelated to bruce. In the meantime, please feel free to submit a patch. Thanks, |
I took a closer look at the problem, and fixing it turned out to be pretty straightforward. Above is a patch containing a fix (to be applied to bruce version 1.0.28), along with some minor code cleanup. Please give it a try and let me know if you run into any issues. I tested it out, and it works for me. A while ago, I created Dory, which is a fork of Bruce (see https://github.com/dspeterson/dory ). I recommend giving Dory a try, since it is now the focus of all of my development efforts. I created a new release of Dory containing the above fix, so it should not suffer from the problem you reported. Hopefully, if(we) will also merge the above fix into bruce some time soon. I'll ping them about it. Dave |
If you are building Bruce with the latest version of SCons, you will also need the above fix to work around a build error. Dory already has this fix, so it should build without problems regardless of your SCons version. |
Thanks Dave! we will give it a try. |
Hi there, I'm trying to troubleshoot a bruce behavior which I cannot explain.
For some reason, bruce works well with topic autocreate only if there's already at least one topic existing on kafka broker. After firing a few events into bruce for several topics nothing happens and topics are not auto created. Only as I create a dummy topic, that the other topics get created and the event are coming in.
Am I missing something?
*running with both --topic_autocreate & auto.create.topics.enable=true
Thanks in advance,
Oren
The text was updated successfully, but these errors were encountered: