AMQP changes for C++ Claim Based Security - also fixed session close issue that affected reliability #1833
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.
This pull request introduces several important changes to the
azure_core_amqp
andazure_messaging_eventhubs
SDKs. The most significant updates involve adding lifetime parameters to various structs and implementations to ensure proper borrowing and memory management. Additionally, there are some minor improvements and refactorings to enhance code clarity and error handling.Lifetime Parameter Additions:
sdk/core/azure_core_amqp/src/cbs.rs
: Added lifetime parameter'a
to theCbsImplementation
type alias andAmqpClaimsBasedSecurity
struct to ensure proper borrowing ofAmqpSession
. [1] [2]sdk/core/azure_core_amqp/src/fe2o3/cbs.rs
: Added lifetime parameter'a
toFe2o3ClaimsBasedSecurity
struct and its methods to ensure proper borrowing ofAmqpSession
.sdk/core/azure_core_amqp/src/noop.rs
: Added lifetime parameter'a
and aPhantomData
field toNoopAmqpClaimsBasedSecurity
struct to ensure proper borrowing ofAmqpSession
. [1] [2] [3]Refactorings and Improvements:
sdk/core/azure_core_amqp/src/fe2o3/connection.rs
: Simplified error handling and removed unnecessaryunwrap
calls by usingif let
instead ofok_or_else
. [1] [2]sdk/eventhubs/azure_messaging_eventhubs/src/consumer/mod.rs
andsdk/eventhubs/azure_messaging_eventhubs/src/producer/mod.rs
: UpdatedAmqpClaimsBasedSecurity::new
calls to pass a reference toAmqpSession
instead of taking ownership. [1] [2]