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

Issues with retry and logging upon exception during consumption #84

Open
blaines opened this issue Mar 21, 2015 · 0 comments
Open

Issues with retry and logging upon exception during consumption #84

blaines opened this issue Mar 21, 2015 · 0 comments

Comments

@blaines
Copy link

blaines commented Mar 21, 2015

I had a misconfiguration with my Hermann consumer which caused an exception to occur:

Hermann::Provider::JavaSimpleConsumer#consume EXCEPTION java.lang.IllegalArgumentException: Invalid path string "/brokers/topics//auditlog_events" caused by empty node name specified @16

Locating the source of this issue was much more difficult than expected because the exception was caught here [1], and retry did not seem to occur at all [2]. I've done some basic debugging to verify that the execution path does in fact call retry but I haven't been able to actually get a retry to occur. retry?:true @max_retries:3 @backoff_time_sec:1

I think there's a few issues with this code:

  1. An exception occurs, and could potentially not be reported because of [3] return unless @logger
  2. retry doesn't appear to be working as expected
  3. rescue might be overzealous, I'm not sure it makes sense to retry any exception
  4. A bonus, it might be beneficial to validate this value prior to execution

For now, I've fixed the cause of the exception in my code, but don't have any specific suggestions yet on how to resolve the listed issues above.

[1] https://github.com/lookout/Hermann/blob/master/lib/hermann/provider/java_simple_consumer.rb#L79
[2] https://github.com/lookout/Hermann/blob/master/lib/hermann/provider/java_simple_consumer.rb#L83
[3] https://github.com/lookout/Hermann/blob/master/lib/hermann/provider/java_simple_consumer.rb#L97

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

No branches or pull requests

1 participant