Skip to content

Add support for message schedules#963

Merged
mtmk merged 2 commits into
mainfrom
2.12/allow-schedule
Sep 26, 2025
Merged

Add support for message schedules#963
mtmk merged 2 commits into
mainfrom
2.12/allow-schedule

Conversation

@mtmk

@mtmk mtmk commented Sep 25, 2025

Copy link
Copy Markdown
Member

This pull request introduces support for the new AllowMsgSchedules property in the JetStream StreamConfig, enabling the scheduling of messages as described in ADR-51. It also adds a corresponding test to verify correct behavior when creating and updating streams with this property.

JetStream StreamConfig enhancements:

  • Added the AllowMsgSchedules boolean property to the StreamConfig class, allowing message scheduling to be enabled or disabled for streams.

Testing improvements:

  • Introduced a new test, AllowMsgSchedules_property_should_be_set_on_stream, which verifies that the AllowMsgSchedules property is correctly set, persisted, and enforces that disabling it after enabling returns the expected error.
  • Added missing import for NATS.Client.TestUtilities in ManageStreamTest.cs to support the new test.

@mtmk
mtmk requested review from Copilot and scottf September 25, 2025 10:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for message scheduling in JetStream by introducing the AllowMsgSchedules property to the StreamConfig class, implementing the new feature described in ADR-51.

  • Added AllowMsgSchedules boolean property to StreamConfig with proper JSON serialization attributes
  • Created comprehensive test coverage to verify property setting, persistence, and error handling when disabling schedules

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 AllowMsgSchedules property with JSON serialization configuration
tests/NATS.Client.JetStream.Tests/ManageStreamTest.cs Added test method and required import to verify message scheduling functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@scottf scottf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# Conflicts:
#	src/NATS.Client.JetStream/Models/StreamConfig.cs
#	tests/NATS.Client.JetStream.Tests/ManageStreamTest.cs
@mtmk
mtmk merged commit 0bebb12 into main Sep 26, 2025
16 of 20 checks passed
@mtmk
mtmk deleted the 2.12/allow-schedule branch September 26, 2025 09:43
mtmk added a commit that referenced this pull request Oct 1, 2025
* Add Prioritized Priority Consumer Policy (#965)
* Add persist mode support (#964)
* Add support for message schedules (#963)
* Add Atomic Publish Support (#962)
* Counter support for server v2.12 (#960)
@mtmk mtmk mentioned this pull request Oct 1, 2025
mtmk added a commit that referenced this pull request Oct 1, 2025
* Add Prioritized Priority Consumer Policy (#965)
* Add persist mode support (#964)
* Add support for message schedules (#963)
* Add Atomic Publish Support (#962)
* Counter support for server v2.12 (#960)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants