-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Messaging]: MessageFlux: adding a retry const that limit retry to terminal completion event #45400
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new retry policy (RETRY_ONLY_COMPLETION
) that retries only on terminal completion events and applies it to V2 MessageFlux
consumers, while bumping the azure-core-amqp
dependency version.
- Adds
MessageFlux.RETRY_ONLY_COMPLETION
policy and plugs it into V2 consumer constructors and tests. - Updates Service Bus and Event Hubs
pom.xml
files toazure-core-amqp:2.10.0-beta.1
. - Registers the new version in
eng/versioning/version_client.txt
.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sdk/servicebus/azure-messaging-servicebus/pom.xml | Bumped azure-core-amqp to 2.10.0-beta.1 |
sdk/eventhubs/azure-messaging-eventhubs/pom.xml | Bumped azure-core-amqp to 2.10.0-beta.1 |
eng/versioning/version_client.txt | Added unreleased_com.azure:azure-core-amqp;2.10.0-beta.1 |
sdk/core/azure-core-amqp/src/main/java/.../MessageFlux.java | Introduced RETRY_ONLY_COMPLETION and its handling logic |
sdk/eventhubs/.../EventHubPartitionAsyncConsumerTest.java | Switched test to use RETRY_ONLY_COMPLETION |
sdk/eventhubs/.../EventHubConsumerAsyncClient.java | Switched client to use RETRY_ONLY_COMPLETION |
Comments suppressed due to low confidence (2)
sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubPartitionAsyncConsumerTest.java:331
- Add unit tests to verify that under
RETRY_ONLY_COMPLETION
, the flux retries on completion but terminates on an error. Currently only the policy switch is tested, not its behavior.
CreditFlowMode.EmissionDriven, MessageFlux.RETRY_ONLY_COMPLETION);
sdk/servicebus/azure-messaging-servicebus/pom.xml:75
- [nitpick] Verify that the
{x-version-update;...}
marker matches thegroupId:artifactId
used by your versioning automation (should it becom.azure:azure-core-amqp
instead ofunreleased_com.azure:azure-core-amqp
?).
<version>2.10.0-beta.1</version> <!-- {x-version-update;unreleased_com.azure:azure-core-amqp;dependency} -->
sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/MessageFlux.java
Show resolved
Hide resolved
ce6b510
to
7e5910c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test? Thank you Anu!
Adding tests in a follow up pr, along with few other logging changes. |
UT added in the pr #45416 |
Originally in legacy V1 stack, the Event Hubs partition receiver used to retry on link "termination by completion" but propagates "terminal error". See the V1 code here on completion retry.
In V2 stack, we let both terminal events (completion, error) to get propagated. While it makes sense to propagate the "terminal error" like in V1 (e.g. ownership lost error), propagating "terminal completion" seems not a great user experience. For example, terminal completion will terminate the partition pump used by the Event Hub Processor, which means load balancer cycle is needed to acquire (claim) that partition again.
This PR changes this behavior to have retry on completion like legacy code.