-
Notifications
You must be signed in to change notification settings - Fork 67
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
[feat] Support Dead Letter Topic. #139
Conversation
326d60d
to
808d0dc
Compare
@Anonymitaet Could you help review the documents part (i.e. the API docs in |
@BewareMyPower @Anonymitaet Thanks for your reviews. All suggestions have been fixed. PTAL. |
Thanks! LGTM from the doc perspective. |
BTW, let's address comments in this PR in priority to #157. |
I have left the last comments. This PR overall LGTM. Please avoid committing such a huge patch next time. If a PR had many code changes, it would be very hard to review all of them. Some potential issues might not be exposed. |
Get it, Thanks for your professional reviews! |
### Motivation If a schema exists in a topic, but the producer does not know it. He still wanted to send data to the topic. (The scenario in which the DLQ sends a message: Please refer #139 **[Verifying this change][5]**) ### Modifications - When creating a producer with `autoDownloadSchema` param, try to get the schema of that topic and use it. - Support `getSchema` on `LookupService`(HTTP and Binary). ### Verifying this change - Add `LookupServiceTest` unit test to cover `getSchema` logic. - Add `SchemaTest.testAutoDownloadSchema` unit test to cover creating producer success when the topic has a schema. Co-authored-by: Baodi Shi <[email protected]>
Master Issue: #114
Motivation
#77, #114
Modifications
redeliveryCount > DeadLetterPolicy.maxRedeliveryCount
, the message is sent to the DLQ topic and ack this msg.Verifying this change
This change added tests and can be verified as follows:
Add
DeadLetterQueueTest.testInitSubscription
to cover init DLQ topic subscription: [PIP-124] Create init subscription before sending message to DLQ pulsar#13355Add
DeadLetterQueueTest.testAutoSetDLQTopicName
to cover default DLQ topic name.Add
DeadLetterQueueTest.testDLQWithSchema
to cover producer and consumer with the schema scenario.If a topic has a schema, and the consumer uses
AUTO_CONSUME
schema, and DLQTopic also has the same schema. In this case, the DLQ producer fails to create(IncompatibleSchema). Refer to java client same issue: Dead letter producer does not handle AUTO_CONSUME_SCHEMA pulsar#9935.Solution: Depending on [feat] Support auto download schema when create producer. #157, After this, DLQ producers use the
autoDownloadSchema
param when consumers useAUTO_CONSUM
.Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)