-
Notifications
You must be signed in to change notification settings - Fork 336
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
[Issue 664] fix ReconsumeLater panic #753
base: master
Are you sure you want to change the base?
Conversation
@shoothzj would you mind enabling the workflows and reviewing them? |
Calling ReconsumeLater without a DLQ policy doesn't make sense in most cases. that sounds some messages could be stuck in an infinite loop forever. |
@shileiyu Yes, I agree. However, there may be careless developers like me who cause the program to run with panic which can even affect the business, this may cut some losses. |
I’m thinking how could we have a better interface to help developers actively avoiding the pitfall. |
@crossoverJie do you think having a default DLQ policy would be a better solution to this issue? |
@shileiyu It's a good idea. |
In Go SDK, we have also made the same settings. When retry is enabled, a default DLQ policy will be created. The essential reason for this panic is that we have not enabled retry, but are trying to use ReconsumeLater
|
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.
LGTM +1
# Conflicts: # pulsar/consumer_test.go
# Conflicts: # pulsar/consumer_test.go
Fixes #664
Motivation
Removing possible panic.
Modifications
Add nil check and more friendly tips.
Verifying this change