Skip to content
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

Simplify the logic reading session-id by making it final #35822

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

anuchandy
Copy link
Member

@anuchandy anuchandy commented Jul 11, 2023

The ServiceBusSessionReceiver is constructed (only) by the SeviceBusSessionManager. When SeviceBusSessionManager constructs ServiceBusSessionReceiver, the manager already knows the session's id with which the new receiver object will be associated. It means the receiver does not need to read the session-id via the (cached) Reactor chain each time someone asks; the sessionId can be a final String in the receiver.

Note: If there is no session Id on the link upon link's activation, then the manager will never create the ServiceBusSessionReceiver, as the Mono, ServiceBusReceiveLink::getSessionId(), that is supposed to emit sessionId terminates to completion, it needs to emit a value for the manager to create receiver object.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@anuchandy anuchandy merged commit 54d92a3 into Azure:main Jul 11, 2023
17 checks passed
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