[Issue 664] fix ReconsumeLater panic#753
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 |
# 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