Skip to content

fix(nats): preserve request context value types - #10422

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:reubenbond-fix-nats-request-context-serialization
Aug 10, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:reubenbond-fix-nats-request-context-serialization

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

The NATS stream provider failed when request context contained Boolean or other runtime values because its source-generated JSON envelope duplicated an object-valued context dictionary without metadata for those concrete types.

Keep request context exclusively in the Orleans-serialized batch payload, where runtime types are preserved and from which the receiver already imports context. Add focused round-trip coverage for common primitive and value types across the NATS JSON envelope and Orleans payload.

Fixes: #10244

Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ReubenBond
ReubenBond merged commit fc50ed9 into dotnet:main Aug 10, 2026
71 checks passed
@ReubenBond
ReubenBond deleted the reubenbond-fix-nats-request-context-serialization branch August 10, 2026 21:53
This was referenced Aug 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RequestContext.Set(X, true) occurs an exception in Orleans.Streaming.NATS provider

1 participant