[fix][client] retry letter producer respect auto schema#19051
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19051 +/- ##
============================================
+ Coverage 47.11% 47.53% +0.41%
- Complexity 10595 10733 +138
============================================
Files 710 711 +1
Lines 69423 69459 +36
Branches 7449 7453 +4
============================================
+ Hits 32709 33015 +306
+ Misses 33037 32750 -287
- Partials 3677 3694 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
congbobo184
left a comment
There was a problem hiding this comment.
could you please make the test simple and specific?
|
|
||
| @Cleanup | ||
| PulsarClient newPulsarClient = newPulsarClient(lookupUrl.toString(), 0);// Creates new client connection | ||
| Consumer<FooV2> deadLetterConsumer = newPulsarClient.newConsumer(Schema.AVRO(FooV2.class)) |
There was a problem hiding this comment.
why we should use deadLetterConsumer?
There was a problem hiding this comment.
I follow the test pattern from testRetryTopic and testAutoConsumeSchemaDeadLetter. Even testRetryTopic set up the DLQ.
May you directly submit a patch onto this pull request?
| .ackTimeout(1, TimeUnit.SECONDS) | ||
| .enableRetry(true) | ||
| .receiverQueueSize(100) | ||
| .deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(maxRedeliveryCount).build()) |
There was a problem hiding this comment.
we don't need to test dead letter right?
eolivelli
left a comment
There was a problem hiding this comment.
Lgtm
This approach is better.
The downside is that auto produce Schema validates the input, that is already validated and we are wadting some resources.
We can follow up with some enhancements
|
@congbobo184 I saw your patch and it seems code style check failed now. I'll try to fix it in hours. |
|
Thank you! |
|
Hi @tisonkun I found that the Files Changed have been dirty, could you deal with it? |
|
@poorbarcode aha. It's due to a rebase on merge master commit. I can fix it later. |
Signed-off-by: tison <wander4096@gmail.com> Co-authored-by: dibulidohu <dibulidohu@tencent.com>
Signed-off-by: tison <wander4096@gmail.com>
3764ccb to
1c507ed
Compare
|
@poorbarcode updated. FWIW, the process is:
|
|
A weird error: https://github.com/apache/pulsar/actions/runs/3787043645/jobs/6439462375 I'm trying rerun, but it seems an unexpected error. cc @yaalsn IIRC jacoco report is introduced by you. |
|
Merging... |
|
@tisonkun It seems that it passed after you rerun the job. Did you modify any code before the rerun? |
|
@yaalsn No. |

Verifying this change
Add a new test
testAutoConsumeSchemaRetryLetter.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: