-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][client] PIP-409: support producer configuration for retry/dead letter topic producer #24020
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
[improve][client] PIP-409: support producer configuration for retry/dead letter topic producer #24020
Conversation
|
The pip document has been merged, we can continue to review this pr. Thanks for your review. @BewareMyPower @nodece @dao-jun @codelipenghui @shibd @Technoboy- |
lhotari
left a comment
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.
Instead of using java.util.function.Function, I'd suggest using a richer interface so that more context parameters can be added besides the topic name. This pattern would also allow adding more context parameters later without breaking the API in backwards incompatible ways.
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/DeadLetterPolicy.java
Outdated
Show resolved
Hide resolved
|
Great work, @thetumbled. Thanks for making this happen. The PIP-409 solution will help resolve long time issues such as #19463 and #21954. |
lhotari
left a comment
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, good work @thetumbled . Great to see this finally solving many use cases.
Thanks for your review and contributions! |
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ProducerBuilderContext.java
Show resolved
Hide resolved
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ProducerBuilderCustomizer.java
Outdated
Show resolved
Hide resolved
lhotari
left a comment
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.
One remaining issue about naming. Commented added.
fixed, thanks. |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24020 +/- ##
============================================
+ Coverage 73.57% 74.20% +0.62%
+ Complexity 32624 32031 -593
============================================
Files 1877 1862 -15
Lines 139502 144225 +4723
Branches 15299 16433 +1134
============================================
+ Hits 102638 107015 +4377
+ Misses 28908 28764 -144
- Partials 7956 8446 +490
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…ead letter topic producer (apache#24020) Co-authored-by: Lari Hotari <lhotari@apache.org> (cherry picked from commit 302c1d5) (cherry picked from commit 6d47526)
…ead letter topic producer (apache#24020) Co-authored-by: Lari Hotari <lhotari@apache.org> (cherry picked from commit 302c1d5) (cherry picked from commit 6d47526)
…ead letter topic producer (apache#24020) Co-authored-by: Lari Hotari <lhotari@apache.org> (cherry picked from commit 302c1d5)
…ead letter topic producer (apache#24020) Co-authored-by: Lari Hotari <lhotari@apache.org>
PIP: #24022
Fixes #19463
Fixes #21954
Motivation
Currently, we don't support configure the producer of retry/dead letter topic. But enable the chunk message feature
and disable the batch configuration in hard code, which can't handle many situations. For example, when the throughput
of message of retry topic become considerable, the resource consumed by the un-batched messages is pretty large.
There is no reason that we disable the batch message feature.
For better control for the retry/dead letter topic feature, we can support configuration for the producer of
retry/dead letter topic.
Modifications
Support configuration for the producer of retry/dead letter topic.
Verifying this change
(Please pick either of the following options)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: thetumbled#71