Crate azure_core_amqp

Crate azure_core_amqp 

Source
Expand description

§Azure AMQP library for Rust

Azure AMQP crate for consumption of AMQP based packages in the Azure SDK for Rust and C++.

NOTE: THIS IS NOT A GENERAL PURPOSE AMQP LIBRARY AND SHOULD NOT BE USED AS SUCH.

This crate is part of a collection of crates: for more information please refer to https://github.com/azure/azure-sdk-for-rust.

§Testing the AMQP Client

The AMQP package is tested using the standard cargo test command line:

cargo test --package azure_core_amqp --all-features

Certain AMQP tests requires that there be a running AMQP broker on the machine at the time of the test (the tests will run without the broker, the relevant tests will just be skipped).

One existing AMQP broker is the “TestAMQPBroker” from the azure-amqp GitHub repository.

To launch the TestAMQPBroker, there are two ways of installing and running the TestAmqpBroker, Scripted and Manual.

§Scripted Broker Install

Running the broker from a script requires that you first install Powershell. From a running powershell instance, run the powershell script in the sdk/core/azure_core_amqp directory:

./sdk/core/azure_core_amqp/Test-Setup.ps1

This will download the TestAmqpBroker, build it and launch the executable in the background.

Note that this requires that you have the .NET SDK installed on your machine.

You can then run the azure_core_amqp package tests.

Once you have finished running your tests, you run:

./sdk/core/azure_core_amqp/Test-Cleanup.ps1

which will terminate the test broker.

§Manual Broker Install

For Manual testing, first clone the azure-amqp repository to a local directory:

cd <Test Working Directory>
git clone https://github.com/Azure/azure-amqp

Alternately, you can clone to a specific release in the azure-amqp repository:

git clone https://github.com/Azure/azure-amqp.git --branch hotfix

Set an environment variable the test AMQP broker should listen on:

$env:TEST_BROKER_ADDRESS = 'amqp://127.0.0.1:25672'

And launch the test broker:

cd azure-amqp/test/TestAmqpBroker
dotnet run -- $env:TEST_BROKER_ADDRESS

Now, when you run the cargo tests, the networking functionality of the AMQP APIs will be executed.

License: MIT

Re-exports§

pub use error::*;

Modules§

builder
Builders for AMQP types.
error
AMQP error types.
message
AMQP message related types.

Structs§

AmqpClaimsBasedSecurity
Struct representing the Claims-Based Security (CBS) functionality over AMQP.
AmqpConnection
Struct representing an AMQP connection.
AmqpConnectionOptions
Options for configuring an AMQP connection.
AmqpDelivery
An AMQP Delivery.
AmqpDescribed
An AMQP Composite type.
AmqpList
A sequence of AMQP values
AmqpManagement
Struct representing the AMQP management functionality.
AmqpMessage
An AMQP message.
AmqpOrderedMap
An ordered mapping from distinct keys to values.
AmqpReceiver
Struct representing the AMQP receiver functionality.
AmqpReceiverOptions
Options for configuring an AMQP receiver.
AmqpSendOptions
Options for sending an AMQP message.
AmqpSender
An AMQP message sender.
AmqpSenderOptions
AMQP Sender options.
AmqpSession
An AMQP Session.
AmqpSessionOptions
Options for an AMQP Session.
AmqpSource
An AMQP message source.
AmqpSymbol
An AMQP symbol.
AmqpTarget
An AMQP link target.
AmqpTimestamp
AMQP Timestamp.

Enums§

AmqpSendOutcome
Possible outcomes from a Send operation.
AmqpSimpleValue
A simple value type in AMQP 1.0.
AmqpValue
An AMQP value.
ReceiverCreditMode
Represents the mode of issuing credit to the sender in an AMQP receiver.
ReceiverSettleMode
AMQP Receiver settle mode.
SenderSettleMode
AMQP Sender settle mode.

Traits§

AmqpClaimsBasedSecurityApis
Trait defining the asynchronous APIs for Claims-Based Security (CBS) operations over AMQP.
AmqpConnectionApis
Trait defining the asynchronous APIs for AMQP connection operations.
AmqpDeliveryApis
Trait defining the APIs for interacting with an AMQP delivery.
AmqpManagementApis
Trait defining the asynchronous APIs for AMQP management operations.
AmqpReceiverApis
Trait defining the asynchronous APIs for AMQP receiver operations.
AmqpSenderApis
A trait for AMQP Sender operations.
AmqpSessionApis
A trait for AMQP Session operations.