-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] When topic is terminated. Client must not retry connecting. Pen…
…ding messages should be failed (#1128) ### Motivation GoLang Pulsar client library has no support for Topic termination. When a topic is terminated following should happen at client library side. 1. Producers should stop reconnecting. As once topic is terminated, it is permanent. 2. All the pending messages should be failed. ### Modifications If reconnect is failing with TopicTerminated error. Run through the pending messages queue and complete the callback. After that exit the reconnect loop and set producer state as closing. Marking producer state producerClosing will ensure that new messages are immediately failed. Co-authored-by: Prashant Kumar <[email protected]>
- Loading branch information
1 parent
ef0ba67
commit ec846ff
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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