-
Notifications
You must be signed in to change notification settings - Fork 5.1k
chore(components): fix endless loops #19983
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
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
| } | ||
|
|
||
| } | ||
| } catch (org.apache.kafka.common.errors.InterruptException ie) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oscerd this one seems to be the only reason why the thread is interrupted. Can you double check?
|
those forever loops should also check if the camel consumer has isRunAllowed so they can nicely exit when camel is shutting down or if you stop the route etc |
do you suggest to use that condition in the while loop as well? do you have any example to share by any chance? thanks! |
|
This PR is fine. About the endless while loop (true) then another PR can attempt to correct this. So when Camel is shutting down the consumer is being called in the doStop method. And there it should stop its resources and threads etc. So those forever loops seems to not be stopped gracefully and rely on some thread interrupt that is messy and ugly. Try to do a Or combinations of that. There are some components that does this. |
Okey, thanks for the hint. I will try to have a look and include in this PR if I can, otherwise I'll create a Jira issue to keep track of such an enhancement. |
6e4f75f to
2ad3f5f
Compare
|
@davsclaus @oscerd this should be good now. I've maintained the |
2ad3f5f to
9d8e1ff
Compare
|
LGTM |
|
Thx. LGTM |
9d8e1ff to
93d45cd
Compare
93d45cd to
72ec614
Compare
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.