Skip to content

Making a fix to compare sessionid on the message and the sessionid on the link filter in a case-insensitive way.#48759

Merged
yvgopal merged 3 commits intoAzure:mainfrom
yvgopal:vijay/session-process-case-sensitivity-fix
Apr 10, 2026
Merged

Making a fix to compare sessionid on the message and the sessionid on the link filter in a case-insensitive way.#48759
yvgopal merged 3 commits intoAzure:mainfrom
yvgopal:vijay/session-process-case-sensitivity-fix

Conversation

@yvgopal
Copy link
Copy Markdown
Member

@yvgopal yvgopal commented Apr 10, 2026

Service Bus sessionid is not case sensitive. We shouldn't be doing case sensitive comparison between sessionId property on the message and sessionid property on the link.

Copilot AI review requested due to automatic review settings April 10, 2026 02:09
@yvgopal yvgopal requested a review from anuchandy April 10, 2026 02:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Service Bus session ID matching to be case-insensitive (Service Bus session IDs are not case-sensitive) to avoid disposition/link lookup failures when the broker returns a different session ID casing than the message carries.

Changes:

  • Normalize session ID keys (lowercased with Locale.ROOT) in SessionsMessagePump and ServiceBusSessionManager lookup maps.
  • Switch ServiceBusSingleSessionManager session ID comparisons to equalsIgnoreCase.
  • Add/extend tests to cover case-differing session ID scenarios for message settlement and single-session manager behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/SessionsMessagePump.java Normalizes tracked session receiver keys and disposition lookups to be case-insensitive.
sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSingleSessionManager.java Uses case-insensitive session ID comparison for link name/disposition routing.
sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSessionManager.java Normalizes session receiver map keys and lookups for case-insensitive session ID handling.
sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/SessionsMessagePumpIsolatedTest.java Adds a test ensuring settlement succeeds when accepted vs message session ID casing differs.
sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSingleSessionManagerTest.java Adds new unit tests for case-insensitive link name lookup and disposition update.

@yvgopal
Copy link
Copy Markdown
Member Author

yvgopal commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

@yvgopal yvgopal enabled auto-merge (squash) April 10, 2026 20:02
@yvgopal yvgopal merged commit 85e2398 into Azure:main Apr 10, 2026
18 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