Support retry letter topic - #359
Merged
Merged
Conversation
wolfstudy
requested review from
merlimat and
wolfstudy
and removed request for
merlimat
August 25, 2020 01:14
wuYin
marked this pull request as draft
August 27, 2020 03:05
…LQ RECEIPT handler to blocking connection's event loop.
wuYin
marked this pull request as ready for review
August 27, 2020 06:58
wolfstudy
reviewed
Sep 9, 2020
| } | ||
| } | ||
| }() | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Background:
- Retry topic producer, User topic consumer, they two use same connection instance to interact with broker.
- Request channel, Response channel, they two are listened in a single
select{}loop by a connection.
When message need to be redelivery:
- Retry topic producer called
SendAsync(), wrapped User topic consumer AckID logic as callback into message handler. - connection send cmd
SENDto broker. - Broker send cmd
SEND_RECEIPTto connection. - connection received and call callback
- callback called
AckID(), then connection want to send cmdACKto broker.
in the meantime,select{}was stucked in step 3 and executingSEND_RECEIPThandler,incomingRequestsChnever be chosen, when it fulled with 10 Ack requests, finnally lead to dead block.
Asynchronized reuquest & response channels in connection, this block will be resolved.
wolfstudy
approved these changes
Sep 9, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #353
Motivation
Follow pulsar#6449 to support retry letter topic in go client
Modifications
Add
retryRouterfor sending reconsume messages to retry letter topicAdd
ReconsumeLater(msg Message, delay time.Duration)to Consumer interfaceAdd configureable retry letter topic name in
DLQPolicyenable it explicitly while creating consumer, default unenable
Add 2
TestRLQ*test casesVerifying this change
Documentation
pulsar doc: retry-letter-topic