Add Atomic Publish Support#962
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request implements the new AllowAtomicPublish property for NATS JetStream streams as specified in ADR-50, enabling atomic batch publishing functionality. The changes add the necessary property to the StreamConfig model and include comprehensive testing to verify the feature works correctly.
Key changes:
- Added the
AllowAtomicPublishboolean property toStreamConfigwith proper JSON serialization - Implemented comprehensive tests covering stream creation, retrieval, and updates with the new property
- Added conditional test skipping for NATS server versions prior to 2.12 where this feature is not available
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/NATS.Client.JetStream/Models/StreamConfig.cs | Added AllowAtomicPublish property with JSON serialization attributes |
| tests/NATS.Client.JetStream.Tests/ManageStreamTest.cs | Added comprehensive test coverage and missing using directive |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
# Conflicts: # src/NATS.Client.JetStream/Models/StreamConfig.cs
mtmk
added a commit
that referenced
this pull request
Oct 1, 2025
Merged
mtmk
added a commit
that referenced
this pull request
Oct 1, 2025
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.
This pull request adds support for the new AllowAtomicPublish property in the JetStream stream configuration as described in ADR-50, allowing atomic batch publishing into streams. It also includes comprehensive tests to verify the correct behavior of this property when creating, updating, and retrieving streams.
JetStream Stream Configuration Enhancements:
AllowAtomicPublishproperty to theStreamConfigclass, enabling atomic batch publishing for streams. This property is serialized to JSON asallow_atomicand is ignored when set to its default value.Testing Improvements:
AllowAtomicPublish_property_should_be_set_on_stream, inManageStreamTest.csto verify that theAllowAtomicPublishproperty is correctly set, updated, and persisted on streams. The test is conditionally skipped for NATS server versions earlier than 2.12.usingdirective forNATS.Client.TestUtilitiesin the test file to support the new test.