Changed AMQP message receive model to require explicit delivery accept/reject. #1974
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.
Updated the infrastructure for receiving AMQP messages to require that message deliveries be explicitly accepted or rejected - this is not needed for Eventhubs but will be a requirement for ServiceBus.
This PR also includes an enhancement to the AMQP receiver to set and retrieve the link credit mode - this will almost certainly be needed to implement batch receive.
Please note that much of this infrastructure is not currently tested (and almost certainly doesn't work correctly) because we don't have full live test support.
This PR also includes the start of tests for AMQP connection APIs. but this functionality is disabled because we don't have CI pipeline support for starting the test AMQP broker.
Bonus gratuitous changes: I removed the word "test" from a number of test functions because it's redundant.
CoPilot summary:
This pull request includes several changes to the
azure_core_amqp
package, focusing on improving the handling of AMQP deliveries and enhancing the test infrastructure. The changes introduce new structs and traits for better abstraction and add new methods to existing traits. Additionally, some tests have been disabled temporarily until the CI environment can support them.Improvements to AMQP delivery handling:
Fe2o3AmqpDelivery
struct and implementedAmqpDeliveryApis
trait for it insdk/core/azure_core_amqp/src/fe2o3/messaging/messaging_types.rs
.AmqpDelivery
struct andAmqpDeliveryApis
trait insdk/core/azure_core_amqp/src/messaging.rs
to abstract delivery handling.Enhancements to AMQP receiver:
sdk/core/azure_core_amqp/src/fe2o3/receiver.rs
. [1] [2]AmqpReceiverApis
trait to include new delivery-related methods insdk/core/azure_core_amqp/src/receiver.rs
. [1] [2]Test infrastructure improvements:
sdk/core/azure_core_amqp/src/connection.rs
until the AMQP test broker can be started in CI.sdk/core/azure_core_amqp/src/connection.rs
. [1] [2]Additional changes:
tokio
as a dev dependency insdk/core/azure_core_amqp/Cargo.toml
.sdk/core/azure_core_amqp/src/fe2o3/connection.rs
.These changes collectively enhance the robustness and maintainability of the
azure_core_amqp
package.