Skip to content

[ServiceBus/EventHub] unique message/correlation ID for mgmt ops #39516

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

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

swathipil
Copy link
Member

@swathipil swathipil commented Jan 31, 2025

fixes: #39515

Incrementing next_message_id for mgmt ops as we do currently results in the same message ID (0) being used across all messages when renewing locks and other ops such as CBS. This becomes an issue when trying to correlate messages to renew locks/etc., since theIDs are not unique.

Updating message/correlation IDs to unique values so that we don't run into this issue.

Also copied over pyamqp changes from SB to EH, to make sure these are sync'ed.

TODO:

  • add tests (try testing peek messages with multithreads and ensure that all peeked messages have unique IDs)

@swathipil swathipil changed the title [ServiceBus/EventHub] unique message ID for mgmt ops [ServiceBus/EventHub] unique message/correlation ID for mgmt ops Jan 31, 2025
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@swathipil
Copy link
Member Author

/azp run python - servicebus - tests

@swathipil
Copy link
Member Author

/azp run python - eventhub - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@swathipil
Copy link
Member Author

/azp run python - servicebus - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@swathipil swathipil marked this pull request as ready for review February 11, 2025 21:38
@swathipil swathipil requested a review from annatisch as a code owner February 11, 2025 21:38
@swathipil swathipil merged commit b2aa265 into Azure:main Feb 11, 2025
32 checks passed
@swathipil swathipil deleted the swathipil/sb/eh/mgmt-op-msg-uniq-id branch February 11, 2025 21:38
l0lawrence pushed a commit to l0lawrence/azure-sdk-for-python that referenced this pull request Feb 19, 2025
…re#39516)

* [SB] Msg IDs on mgmt/cbs ops should be unique

* copy over sb pyamqp to eh

* add tests

* remove disable local auth for tests ci run
cRui861 pushed a commit that referenced this pull request Feb 27, 2025
)

* [SB] Msg IDs on mgmt/cbs ops should be unique

* copy over sb pyamqp to eh

* add tests

* remove disable local auth for tests ci run
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.

Service Bus: CorrelationID is subject to multi-threading issues
4 participants