[Service Bus] Clarify and sample session listing - #50194
Open
Eldert Grootenboer (EldertGrootenboer) wants to merge 5 commits into
Open
[Service Bus] Clarify and sample session listing#50194Eldert Grootenboer (EldertGrootenboer) wants to merge 5 commits into
Eldert Grootenboer (EldertGrootenboer) wants to merge 5 commits into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 35 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Eldert Grootenboer (EldertGrootenboer)
marked this pull request as ready for review
August 19, 2026 20:23
Eldert Grootenboer (EldertGrootenboer)
requested review from
a team,
Johnathan W (j7nw4r) and
Srini Karri (skarri-microsoft)
as code owners
August 19, 2026 20:23
|
Azure Pipelines: Successfully started running 1 pipeline(s). 35 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Eldert Grootenboer (EldertGrootenboer)
August 19, 2026 20:28
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR clarifies the semantics of Service Bus session listing (default listing vs. listing by session-state update cutoff) and adds end-to-end samples demonstrating both synchronous and asynchronous session listing.
Changes:
- Added new sync/async samples for listing session IDs and linked them from the samples README.
- Updated documentation/comments/tests to use “default listing” terminology and describe the two supported listing modes.
- Renamed and propagated the internal sentinel constant used for “default listing” mode.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverAsyncClientTest.java | Updates terminology and sentinel usage in async session receiver paging tests. |
| sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/implementation/ManagementChannelTests.java | Updates terminology in management-channel tests for the default listing sentinel. |
| sdk/servicebus/azure-messaging-servicebus/src/samples/README.md | Adds sample links for session listing (sync + async). |
| sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ListSessionsSample.java | New synchronous sample demonstrating default listing and cutoff-based listing. |
| sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ListSessionsAsyncSample.java | New asynchronous sample demonstrating default listing and cutoff-based listing. |
| sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverClient.java | Updates public JavaDoc to reflect default listing behavior and cutoff semantics. |
| sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverAsyncClient.java | Updates public JavaDoc and switches no-arg listing to the renamed default-listing sentinel. |
| sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusManagementNode.java | Updates internal JavaDoc to describe default listing vs cutoff mode and sentinel usage. |
| sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ManagementConstants.java | Renames the sentinel constant and updates its documentation to “default listing” semantics. |
| sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ManagementChannel.java | Updates sentinel name in clamping logic/comments for the management operation. |
| sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md | Updates changelog wording for the new/clarified session listing behavior. |
Suppressed comments (2)
sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverClient.java:236
- The JavaDoc for
listSessions(OffsetDateTime)no longer documents the clamping behavior for values at/after the Track 1 sentinel (e.g.,OffsetDateTime.MAX). The implementation still clamps such inputs in the management layer, so the current "updated after the specified time" description is inaccurate for these values.
/**
* Lists the IDs of sessions whose state was set or updated after the specified time.
*
* <p>The returned {@link PagedIterable} fetches additional pages from the broker on demand;
* iterate the {@code PagedIterable} (or call {@link PagedIterable#stream()}) to receive every
sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverAsyncClient.java:341
- The JavaDoc for
listSessions(OffsetDateTime)no longer documents the clamping behavior for values at/after the Track 1 sentinel (e.g.,OffsetDateTime.MAX). The implementation still clamps such inputs in the management layer, so the current "updated after the specified time" description is inaccurate for these values.
/**
* Lists the IDs of sessions whose state was set or updated after the specified time.
*
* <p>The returned {@link PagedFlux} fetches additional pages from the broker on demand using
* cursor-based pagination (server-returned {@code skip} plus {@code lastSessionId} of the
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Eldert Grootenboer (EldertGrootenboer)
marked this pull request as draft
August 19, 2026 20:43
Eldert Grootenboer (EldertGrootenboer)
marked this pull request as ready for review
August 19, 2026 20:44
|
Azure Pipelines: Successfully started running 1 pipeline(s). 35 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Eldert Grootenboer (EldertGrootenboer)
enabled auto-merge (squash)
August 19, 2026 20:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds synchronous and asynchronous samples for listing Service Bus sessions, and corrects the surrounding documentation to describe both supported modes:
sessionStateUpdatedAfterreturns sessions whose stored state was set or updated after the cutoff.Internal sentinel and test names now use "default listing" terminology. No runtime behavior or public API changes.
Testing
mvn --batch-mode -ntp -f sdk/servicebus/azure-messaging-servicebus/pom.xml -DskipTests -Dspotbugs.skip=true test-compile checkstyle:checkRelated implementation: #48956