Skip to content

fix(azure-servicebus): resolvable list pagination (nextLink) - #903

Merged
NitinKumar004 merged 1 commit into
developmentfrom
fix/azure-servicebus-nextlink
Aug 30, 2026
Merged

fix(azure-servicebus): resolvable list pagination (nextLink)#903
NitinKumar004 merged 1 commit into
developmentfrom
fix/azure-servicebus-nextlink

Conversation

@NitinKumar004

Copy link
Copy Markdown
Collaborator

Problem

Service Bus list responses emitted a literal nextLink placeholder that no route resolves. paginate in server/azure/servicebus/namespace.go set NextLink: "cloudemu-nextpage", and listPageSize is 100. Once a list surface holds more than 100 entities, the pager returns a nextLink the SDK cannot GET, so the remaining items are unreachable. Real Azure returns a resolvable $skip continuation URL.

Fix

paginate now reads a $skip offset from the request, returns that page window, and — when more items remain — emits an absolute nextLink (same path + query with $skip advanced, api-version preserved) that armservicebus pagers GET verbatim until the collection is exhausted. Scheme/host are filled from the request since a server request URL carries neither.

Applies to every list surface paginate serves: namespaces, queues, topics, subscriptions, rules, and authorization rules. Single-page responses (<=100, skip 0) are byte-compatible with before and carry no nextLink.

Test

Adds a real armservicebus SDK e2e test (pagination_sdk_test.go) that creates 150 queues and drives NewListByNamespacePager, asserting the listing spans more than one page and returns every queue exactly once.

Gates

  • go build ./... — clean
  • go test ./server/azure/servicebus/... — pass
  • golangci-lint run ./server/azure/servicebus/... — zero new issues (the 3 pre-existing canonicalheader findings live in the untouched dataplane.go)

Service Bus list responses emitted a literal "cloudemu-nextpage" nextLink that no route resolves, so once a collection exceeded the 100-item page size an armservicebus pager followed an unusable link and the remaining entities were unreachable.

paginate now reads a $skip offset from the request, returns the matching page window, and emits an absolute nextLink (same path + query, $skip advanced) that pagers GET verbatim until the collection is exhausted. Applies to every list surface (namespaces, queues, topics, subscriptions, rules, authorization rules). Single-page (<=100) responses are unchanged and carry no nextLink.

Adds a real armservicebus SDK e2e test that creates 150 queues and asserts the pager returns all of them across multiple pages.
@NitinKumar004
NitinKumar004 merged commit 1b98681 into development Aug 30, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant