-
Notifications
You must be signed in to change notification settings - Fork 89
Add support for message schedules #963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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
AllowMsgSchedulesboolean property toStreamConfigwith 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
left a comment
There was a problem hiding this comment.
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
This pull request introduces support for the new
AllowMsgSchedulesproperty in the JetStreamStreamConfig, 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:
AllowMsgSchedulesboolean property to theStreamConfigclass, allowing message scheduling to be enabled or disabled for streams.Testing improvements:
AllowMsgSchedules_property_should_be_set_on_stream, which verifies that theAllowMsgSchedulesproperty is correctly set, persisted, and enforces that disabling it after enabling returns the expected error.NATS.Client.TestUtilitiesinManageStreamTest.csto support the new test.