-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[pulsar-client] Fix send to deadLetterTopic not working when reach maxRedeliverCount #14317
[pulsar-client] Fix send to deadLetterTopic not working when reach maxRedeliverCount #14317
Conversation
Could you please take a look about this? @hangc0276 @congbobo184 |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AbstractSchema.java
Show resolved
Hide resolved
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
@Test | ||
public void testMessageImplGetReaderSchema() { | ||
MessageMetadata builder = new MessageMetadata(); | ||
builder.hasSchemaVersion(); |
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.
@Shawyeok - Why was this line necessary? It seems like it's not doing anything.
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.
Indeed, should I open a PR to remove this line?
…pache#14317) If a message reached maxRedeliverCount, it will send to deadLetterTopic, since 2.8.0, this mechanism is broken, it was introduced in apache#9970
…pache#14317) If a message reached maxRedeliverCount, it will send to deadLetterTopic, since 2.8.0, this mechanism is broken, it was introduced in apache#9970
Motivation
If a message reached maxRedeliverCount, it will send to deadLetterTopic, since
2.8.0
, this mechanism is broken, it was introduced in #9970You can reproduce with code below:
It will log exception below:
Modifications
Make
AbstractSchema#atSchemaVersion
throw NPE only ifsupportSchemaVersioning
is true and schemaVersion is null.Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
Bugfix only
doc
(If this PR contains doc changes)