-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix the default retry letter and dead letter topic name #10129
fix the default retry letter and dead letter topic name #10129
Conversation
The problem with this change is that by renaming the default, a user who upgrades the client will suddenly have the DLQ messages routed to a different topic, and this could potentially lead to loose these messages. |
Currently, the default name of dead letter topic is {TopicName}-{Subscription}-DLQ while |
/pulsarbot run-failure-checks |
@wangjialing218 We need to handle the compatibility issues when users upgrade to the new Pulsar Client. As @merlimat mentioned, this will lead to data loss when upgrading to the new Pulsar Client. |
@merlimat @codelipenghui Currently a cosumer with retry message enable could receive another topic's retry message due to the same retry letter topic name. |
@wangjialing218 This will cause compatible issues because users might topic1 and topic2 as the retry topic name and DLQ name, but after upgrade to the new client version, the client will subscribe to a new retry topic topic3 and the message which need to send to the DLQ will send to a new topic topic4, this is why we need to consider the compatible issue. |
46c4bd2
to
25afc89
Compare
@codelipenghui @merlimat Add compatible check. If old name of DLQ and retry topic exists, using old topics. |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBuilderImpl.java
Outdated
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
0a403bb
to
fba5f8f
Compare
@eolivelli please review this PR again |
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.
Looks good to me.
I would like to point out that with this change it is possibile to upgrade to the new version safely but in case of downgrade the user will probably have surprise.
Nice work. Thanks for your contribution
@codelipenghui PTAL |
Motivation
Fixes #9327
Modifications
Correct the default retry letter and dead letter topic name depend on full topic name