This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
181
stars
126
forks
source link
Implement receiving messages; Changes to eventhubs so that all eventhubs tests pass #6254
Implement AMQP Receiver and get all EventHub tests to pass(!)
The primary set of changes in this PR are a number of assorted changes to EventHubs to adopt the message consumer to the AMQP changes associated with the Rust AMQP stack - these changes are relatively small, mostly adding Open and Close methods to the various AMQP constructs.
In addition, there are changes to the Rust AMQP stack (which are covered in a separate PR into the Rust repo) and a new message_receiver.rs file which contains the wrapper functions for the message receiver.
Github Summary of changes.
This pull request introduces significant refactoring and improvements to the sdk/core/azure-core-amqp module, specifically focusing on the message receiver implementation and its integration with Rust. The most important changes include replacing the existing message receiver with a Rust-based implementation, updating related APIs, and simplifying the codebase.
Implement AMQP Receiver and get all EventHub tests to pass(!)
The primary set of changes in this PR are a number of assorted changes to EventHubs to adopt the message consumer to the AMQP changes associated with the Rust AMQP stack - these changes are relatively small, mostly adding
Open
andClose
methods to the various AMQP constructs.In addition, there are changes to the Rust AMQP stack (which are covered in a separate PR into the Rust repo) and a new message_receiver.rs file which contains the wrapper functions for the message receiver.
Github Summary of changes.
This pull request introduces significant refactoring and improvements to the
sdk/core/azure-core-amqp
module, specifically focusing on the message receiver implementation and its integration with Rust. The most important changes include replacing the existing message receiver with a Rust-based implementation, updating related APIs, and simplifying the codebase.Refactoring and Integration with Rust:
sdk/core/azure-core-amqp/src/impl/rust_amqp/amqp/message_receiver.cpp
: Replaced theMESSAGE_RECEIVER_INSTANCE_TAG
withRustAmqpMessageReceiver
and updated the relevant methods to use the new Rust-based implementation. [1] [2] [3]sdk/core/azure-core-amqp/src/impl/rust_amqp/amqp/private/message_receiver_impl.hpp
: Removed references touAMQP
and updated theUniqueHandleHelper
andMessageReceiverImpl
to use the Rust-based message receiver. [1] [2] [3]API Updates:
sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/azure_core_amqp/src/receiver.rs
: Updated theAmqpReceiverApis
trait to replace themax_message_size
method with adetach
method. [1] [2]sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/azure_core_amqp/src/fe2o3/receiver.rs
: Implemented thedetach
method and removed themax_message_size
method. [1] [2] [3]Code Simplification:
sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/rust_wrapper/src/amqp/connection.rs
: Simplified the setting ofoffered_capabilities
anddesired_capabilities
by using a more concise syntax. [1] [2]sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/rust_wrapper/src/amqp/message_sender.rs
: Added conversion methods betweenReceiverSettleMode
andRustReceiverSettleMode
to streamline the code.Additional Improvements:
sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/rust_wrapper/src/model/message.rs
: Added a conversion method fromAmqpMessage
toRustAmqpMessage
to facilitate easier message handling.sdk/core/azure-core-amqp/test/ut/management_tests.cpp
: Removed an unnecessaryEXPECT_TRUE(false)
statement to clean up the test code.