-
Notifications
You must be signed in to change notification settings - Fork 88
WIP: Move direct reply handling to be in subscription manager #878
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: James Thompson <[email protected]>
* nats-io#848 Tweak dependencies Signed-off-by: James Thompson <[email protected]> * Update NATS.Client.Core.csproj Signed-off-by: James Thompson <[email protected]> * Update NATS.Client.Core.csproj Signed-off-by: James Thompson <[email protected]> * Make STJ explicit dependency for JetStream Signed-off-by: James Thompson <[email protected]> * Update NATS.Client.JetStream.csproj Signed-off-by: James Thompson <[email protected]> * Force sdk to 8.0.0 Signed-off-by: James Thompson <[email protected]> * Add newer stj for net 6 Signed-off-by: James Thompson <[email protected]> --------- Signed-off-by: James Thompson <[email protected]>
6813636 to
d22fe57
Compare
| if (_bySid.TryGetValue(sid, out var sidMetadata)) | ||
| { | ||
| // this could come from sidMetadata in the future once records are available | ||
| if (_connection.Opts.RequestReplyMode == NatsRequestReplyMode.Direct) |
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.
i think this should be outside the _bySid check and the lock, no? whole ide of this is to side step the subscription manager internals completely to increase request-reply efficiency.
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.
Yes and no, part of the reason for the change was to get access to the metadata based on subscription id. That metadata can then be used as well as associated with the span etc.
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.
fair enough. keep in mind we also must make sure the impact to apps not using otel must be bare minimum like a simple bool check
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.
Noted, the usage for the metadata is not limited to OTEL but general usage as well.
…ats-io#859) * Add support for `Filter` and `Enrich` for OpenTelemetry activities * Make `internal` methods in `internal Telemetry` `public` * Fix package versions and whatnot * Remove `TracerProviderBuilderExtensions` * Include `Deserialize` in the receive activity * Revert back accidental change * Add `ParentContext` to `NatsInstrumentationContext` * Make `GetActivityContext` public to provide the ability to get context activity context * Make preprocessor directive more accurate * Revert .csproj formatting * Move public artifacts out of the `Internal` namespace/folder * Fix build script --------- Co-authored-by: Ziya Suzen <[email protected]>
d22fe57 to
bd27cae
Compare
Signed-off-by: James Thompson <[email protected]>
bd27cae to
1558878
Compare
|
release/2.7 branch is obsolete now. need to move this change to base main. |
This does some basic refactoring to move the reply task handler to subscription manager so that it can also leverage subscription metadata which is needed for OTEL #871