Repository navigation
When topic is terminated. Client must not retry connecting to broker. - #1128
Merged
RobertIndie merged 1 commit intoNov 16, 2023
Merged
Conversation
gunli
reviewed
Nov 14, 2023
pkumar-singh
force-pushed
the
support_topic_termination
branch
from
November 14, 2023 17:52
21d9b7b to
7692e27
Compare
RobertIndie
reviewed
Nov 15, 2023
RobertIndie
left a comment
Member
There was a problem hiding this comment.
Could you add some tests to verify it?
pkumar-singh
force-pushed
the
support_topic_termination
branch
from
November 15, 2023 20:45
7692e27 to
71d01d5
Compare
…essages should be failed
pkumar-singh
force-pushed
the
support_topic_termination
branch
from
November 15, 2023 20:47
71d01d5 to
e5e501a
Compare
Member
Author
Done.! |
1 task done
pkumar-singh
added a commit
to pkumar-singh/pulsar-client-go
that referenced
this pull request
Nov 21, 2023
…ding messages should be failed (apache#1128) 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. 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]>
RobertIndie
pushed a commit
that referenced
this pull request
Dec 8, 2023
…uotaExceededException/ProducerFenced when reconnecting (#1134) Master Issue: #1128 ### Motivation In Java client, when we get TopicNotFound/TopicTerminated/ProducerBlockedQuotaExceededException/ProducerFenced, we should failPendingMessages, and close producer. But in Go client, we forget to handle ProducerBlockedQuotaExceededException/ProducerFenced, and in #1128, we just call sr.done(), actually we should call failPendingMessages(). https://github.com/apache/pulsar-client-go/pull/1128/files https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java#L1663 ### Modifications 1. rename `errMsgTopicNotFount` to `errMsgTopicNotFound` 2. handle TopicTerminated/ProducerBlockedQuotaExceededException/ProducerFenced, call `failPendingMessages()`; --------- Co-authored-by: gunli <[email protected]>
1 task done
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.
Motivation
GoLang Pulsar client library has no support for Topic termination.
When a topic is terminated following should happen at client library side.
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.