Fix consume 503 handling#849
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses the handling of 503 errors by improving the protocol error handling and notifications when consuming messages. Additionally, it refines the regex parsing for subscription and publication commands and adds new logging events and documentation for JetStream notifications.
- Updated error-handling logic and notification usage in message consumption.
- Improved regex patterns for SUB and PUB command parsing in the test mock server.
- Added extended logging events and documentation for various JetStream notifications.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/NATS.Client.TestUtilities/MockServer.cs | Updated logger handling; improved regex for SUB and PUB commands with new default encoding. |
| tests/NATS.Client.JetStream.Tests/DirectGetTest.cs | Added tests for direct get responses with 503 and no reply scenarios. |
| tests/NATS.Client.JetStream.Tests/ConsumeResponseTest.cs | Added tests to verify handling of various error headers including 503 responses. |
| src/NATS.Client.JetStream/NatsJSOrderedConsumer.cs | Revised timeout notification to use a default instance. |
| src/NATS.Client.JetStream/NatsJSOpts.cs | Extended documentation for notifications in consumption options. |
| src/NATS.Client.JetStream/NatsJSLogEvents.cs | Added new logging events for "NoResponders" and "MessageSizeExceedsMaxBytes". |
| src/NATS.Client.JetStream/Internal/NatsJSFetch.cs | Updated timeout notification usage. |
| src/NATS.Client.JetStream/Internal/NatsJSConsume.cs | Revised error handling with reordered header condition checks and added notifications. |
| src/NATS.Client.JetStream/INatsJSNotification.cs | Defined new notification record types with default instances. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
mtmk
added a commit
that referenced
this pull request
May 13, 2025
Merged
This was referenced Mar 2, 2026
This was referenced Jul 13, 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.
No description provided.