Skip to content

Rework TermWithReason#1081

Merged
mtmk merged 1 commit into
mainfrom
rick/terminate-reason
Mar 2, 2026
Merged

Rework TermWithReason#1081
mtmk merged 1 commit into
mainfrom
rick/terminate-reason

Conversation

@rickdotnet

Copy link
Copy Markdown
Collaborator

This PR suggests a pattern for API evolution per this comment:

Summary

Add NakDelay and TerminateReason properties to AckOpts with convenience extension methods.

Changes

  • Add NakDelay property to AckOpts for specifying Nak delay
  • Add TerminateReason property to AckOpts for specifying terminate reason
  • Replaced NakAsync overload with extension method NakAsync(this INatsJSMsg<T> msg, TimeSpan delay, ...)
  • Add extension method AckTerminateAsync(this INatsJSMsg<T> msg, string reason, ...)

Breaking Change Rationale

This PR follows the suggestion from #1061:

  • New capabilities use properties on AckOpts instead of adding methods to the interface (non-breaking)
  • Convenience extension methods on INatsJSMsg<T> provide the same DX as direct interface methods, and are testable.

This avoids binary-breaking the interface for each new configuration option.

See also: #1048

@github-actions

Copy link
Copy Markdown

@rickdotnet rickdotnet changed the title Rework AckTerminate Reason Rework TermWithReason Feb 27, 2026
@rickdotnet
rickdotnet requested a review from mtmk February 27, 2026 23:16

@mtmk mtmk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thanks @rickdotnet

@mtmk
mtmk merged commit 8bb0fb7 into main Mar 2, 2026
24 checks passed
@mtmk
mtmk deleted the rick/terminate-reason branch March 2, 2026 12:56
mtmk added a commit that referenced this pull request Mar 13, 2026
* Add optional window_size parameter to StreamSnapshotRequest (#1088)
* Bump Microsoft.Bcl.Memory from 9.0.0 to 9.0.14 (#1089)
* Fix `PingCommand` cancellation (#1086)
* rework terminate reason (#1081)
* Fix OTel network telemetry tags (#1078)
* Add consumer info usage warnings (#1079)
* Add TermWithReason support to AckTerminateAsync (#1048)
* Fix code analyser warning (#1076)
* Add cancelled token handling for consumers (#1068)
* Add validation for unsupported PinnedClient calls (#1063)
* Add see-also references to Orbit packages (#1077)
* Add Synadia.Orbit.Testing.NatsServerProcessManager (#1065)
* Add slow consumer docs (#1073)
* Fix error logs URI rewritten by OnConnectingAsync (#1067)
* Add more tests for JetStream consumer behavior (#1055)
@mtmk mtmk mentioned this pull request Mar 13, 2026
mtmk added a commit that referenced this pull request Mar 13, 2026
* Add optional window_size parameter to StreamSnapshotRequest (#1088)
* Bump Microsoft.Bcl.Memory from 9.0.0 to 9.0.14 (#1089)
* Fix `PingCommand` cancellation (#1086)
* rework terminate reason (#1081)
* Fix OTel network telemetry tags (#1078)
* Add consumer info usage warnings (#1079)
* Add TermWithReason support to AckTerminateAsync (#1048)
* Fix code analyser warning (#1076)
* Add cancelled token handling for consumers (#1068)
* Add validation for unsupported PinnedClient calls (#1063)
* Add see-also references to Orbit packages (#1077)
* Add Synadia.Orbit.Testing.NatsServerProcessManager (#1065)
* Add slow consumer docs (#1073)
* Fix error logs URI rewritten by OnConnectingAsync (#1067)
* Add more tests for JetStream consumer behavior (#1055)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants