Repository navigation
fix: keep the NATS task subscriber consuming after errors - #6117
Merged
wolf4ood merged 1 commit intoOct 16, 2026
Merged
Conversation
jimmarino
approved these changes
Oct 16, 2026
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.
What this PR changes/adds
NatsSubscriber:again after a pause (1 s by default). Before, it ended the consumer loop silently: the subscriber stopped consuming
for good, with nothing in the logs.
nak()while handling a failed message is logged, and the other messagesof the batch are still handled.
stop()(e.g. from the closed connection) end the loop quietly.Error) are logged before the loop ends.isHealthy(). The subscriber is healthy until it is started; after that, while its loop is running and itsconnection is not closed for good (jnats gave up reconnecting).
NatsTransferProcessTaskSubscriberExtensionandNatsContractNegotiationSubscriberExtensionregister a liveness checkthat reports the subscriber as not live when it is no longer consuming messages, so that the runtime can be
restarted.
Why it does that
A subscriber whose loop had stopped left every new task unprocessed, while the runtime looked healthy.
Further notes
NatsSubscriberTest. Without the fix, the tests for a failing fetch, a failingnak()and anErrorin thehandler fail.
Who will sponsor this feature?
Please @-mention the committer that will sponsor your feature.
Linked Issue(s)
Part of #6116
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.