### Setup Keycloak and RabbitMQ Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/Test/OAuth2/README.md Start Keycloak and RabbitMQ for testing purposes. ```bash ./.ci/oauth2/setup.sh keycloak ``` -------------------------------- ### Setup UAA and RabbitMQ Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/Test/OAuth2/README.md Start UAA and RabbitMQ for testing purposes. ```bash ./.ci/oauth2/setup.sh uaa ``` -------------------------------- ### Run CI Setup Script Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Execute the Ubuntu GitHub Actions setup script, which can also be used for local test environment setup. ```shell ./.ci/ubuntu/gha-setup.sh ``` -------------------------------- ### Build RabbitMQ Node from Source Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Commands to clone the RabbitMQ server repository, build the node, and start the broker. Assumes Make is available. ```shell git clone https://github.com/rabbitmq/rabbitmq-server.git rabbitmq-server cd rabbitmq-server # assumes Make is available make co cd deps/rabbit make make run-broker ``` -------------------------------- ### IChannel.BasicConsumeAsync Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Asynchronously starts a queue consumption. ```APIDOC ## POST /rabbitmq/channel/basic/consume ### Description Asynchronously starts consuming messages from a queue. ### Method POST ### Endpoint /rabbitmq/channel/basic/consume ### Parameters #### Request Body - **queue** (string) - Required - The name of the queue to consume from. - **autoAck** (boolean) - Required - Whether to automatically acknowledge messages. - **consumerTag** (string) - Required - A unique tag for the consumer. - **noLocal** (boolean) - Optional - If true, prevents the server from sending messages published by the same connection. Defaults to false. - **exclusive** (boolean) - Optional - If true, makes the consumer exclusive to the queue. Defaults to false. - **arguments** (object) - Optional - Additional arguments for the consumer. - **consumer** (IAsyncBasicConsumer) - Required - The asynchronous consumer implementation. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. ### Request Example ```json { "queue": "my-queue", "autoAck": true, "consumerTag": "my-consumer", "noLocal": false, "exclusive": false, "arguments": {}, "consumer": "" } ``` ### Response #### Success Response (200) - **string** (string) - The consumer tag assigned by the server. #### Response Example ```json { "consumerTag": "my-consumer" } ``` ``` -------------------------------- ### Build and Test RabbitMQ .NET Client on Windows Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/CONTRIBUTING.md Clone the repository and use PowerShell scripts to set up the environment, install RabbitMQ, and run tests. Note that toxiproxy tests are not executed with this method. ```powershell git clone --recurse-submodules https://github.com/rabbitmq/rabbitmq-dotnet-client cd rabbitmq-dotnet-client .\.ci\windows\gha-setup.ps1 # On Windows. Note that this installs RabbitMQ .\build.ps1 -RunTests:$true ``` -------------------------------- ### Run Keycloak Test Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/Test/OAuth2/README.md Execute the test suite against Keycloak. Ensure Keycloak and RabbitMQ are started before running. ```bash ./.ci/oauth2/test.sh keycloak ``` -------------------------------- ### Run UAA Test Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/Test/OAuth2/README.md Execute the test suite against UAA. Ensure UAA and RabbitMQ are started before running. ```bash ./.ci/oauth2/test.sh uaa ``` -------------------------------- ### Update RabbitMQ .NET Client Docs Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/APIDOCS.md This script outlines the steps to update and push the RabbitMQ .NET client documentation. It requires Git and docfx to be installed and configured. ```powershell cd C:\path\to\rabbitmq-dotnet-client` git submodule update --init pushd _site git remote add origin-ssh git@github.com:rabbitmq/rabbitmq-dotnet-client.git git fetch --all git checkout --track origin-ssh/gh-pages popd .\build.ps1 -RunTests:$false docfx.exe pushd _site git commit -a -m 'rabbitmq-dotnet-client docs vX.Y.Z' git push origin-ssh popd git commit -a -m 'rabbitmq-dotnet-client docs vX.Y.Z' git push ``` -------------------------------- ### Run RabbitMQ Node in Docker Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Start a RabbitMQ management container using Docker. This container will be used for running tests. ```shell docker run -d --hostname rabbitmq01 --name rabbitmq01 -p 15672:15672 -p 5672:5672 rabbitmq:3-management ``` -------------------------------- ### IChannel.BasicCancelAsync Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Asynchronously cancels a previously started consumer. ```APIDOC ## POST /rabbitmq/channel/basic/cancel ### Description Asynchronously cancels a consumer with the specified consumer tag. ### Method POST ### Endpoint /rabbitmq/channel/basic/cancel ### Parameters #### Request Body - **consumerTag** (string) - Required - The tag of the consumer to cancel. - **noWait** (boolean) - Optional - If true, the server will not respond. Defaults to false. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. ### Request Example ```json { "consumerTag": "my-consumer-tag", "noWait": false } ``` ### Response #### Success Response (200) - **Task** (Task) - A task representing the asynchronous operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Build and Test RabbitMQ .NET Client on Linux Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/CONTRIBUTING.md Clone the repository, set up dependencies including toxiproxy, and then build and test the project using make commands. Ensure your Docker environment is correctly configured. ```shell git clone --recurse-submodules https://github.com/rabbitmq/rabbitmq-dotnet-client cd rabbitmq-dotnet-client # On any Linux distribution with Docker installed ./.ci/ubuntu/gha-setup.sh toxiproxy pull make build make test ``` -------------------------------- ### Configure ConnectionFactory Options Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/AGENTS.md Set up a ConnectionFactory with various configuration options for host, port, credentials, timeouts, recovery, performance, and TLS. ```csharp var factory = new ConnectionFactory { HostName = "localhost", Port = 5672, VirtualHost = "/", UserName = "guest", Password = "guest", // Timeouts RequestedHeartbeat = TimeSpan.FromSeconds(60), ContinuationTimeout = TimeSpan.FromSeconds(20), HandshakeContinuationTimeout = TimeSpan.FromSeconds(10), RequestedConnectionTimeout = TimeSpan.FromSeconds(30), // Recovery AutomaticRecoveryEnabled = true, TopologyRecoveryEnabled = true, NetworkRecoveryInterval = TimeSpan.FromSeconds(5), // Performance RequestedChannelMax = 2047, RequestedFrameMax = 0, // unlimited MaxInboundMessageBodySize = 64 * 1024 * 1024, ConsumerDispatchConcurrency = 1, // TLS Ssl = new SslOption { Enabled = false } }; ``` -------------------------------- ### Configure CreateChannelOptions Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/AGENTS.md Define per-channel configuration options, including publisher confirmations and consumer dispatch concurrency. ```csharp var options = new CreateChannelOptions( publisherConfirmationsEnabled: true, publisherConfirmationTrackingEnabled: true, outstandingPublisherConfirmationsRateLimiter: rateLimiter, consumerDispatchConcurrency: 1 ); ``` -------------------------------- ### Build RabbitMQ .NET Client on Windows Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Use this PowerShell script to build the RabbitMQ .NET client on Windows. ```powershell build.ps1 ``` -------------------------------- ### Filter Tests by Name on MacOS/Linux Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Run specific tests on MacOS or Linux using NUnit filter expressions. This example filters tests containing 'TestAmqpUriParseFail' in their name. ```shell dotnet test projects/Test/Unit.csproj --filter "Name~TestAmqpUriParseFail" ``` -------------------------------- ### Build RabbitMQ .NET Client on MacOS/Linux Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Use this command to build all projects for the RabbitMQ .NET client on MacOS and Linux. ```shell dotnet build ./Build.csproj ``` -------------------------------- ### AmqpTcpEndpoint Constructors and Properties Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Details on how to create and configure AmqpTcpEndpoint instances, including host, port, and SSL options, as well as accessing endpoint properties. ```APIDOC ## AmqpTcpEndpoint ### Description Represents a TCP endpoint for AMQP connections, allowing configuration of host, port, and SSL. ### Constructors - **AmqpTcpEndpoint(string hostName, int portOrMinusOne = -1)**: Initializes a new instance with a hostname and an optional port. - **AmqpTcpEndpoint(string hostName, int portOrMinusOne, RabbitMQ.Client.SslOption ssl)**: Initializes a new instance with a hostname, optional port, and SSL options. - **AmqpTcpEndpoint(System.Uri uri)**: Initializes a new instance using a URI. - **AmqpTcpEndpoint(System.Uri uri, RabbitMQ.Client.SslOption ssl)**: Initializes a new instance using a URI and SSL options. ### Methods - **Clone() -> object**: Creates a clone of the current endpoint. - **CloneWithHostname(string hostname) -> RabbitMQ.Client.AmqpTcpEndpoint**: Creates a clone with a specified hostname. ### Properties - **HostName** (string): Gets or sets the hostname of the endpoint. - **MaxInboundMessageSize** (uint): Gets the maximum inbound message size. - **Port** (int): Gets or sets the port number of the endpoint. - **Protocol** (RabbitMQ.Client.IProtocol): Gets the protocol used by the endpoint. - **Ssl** (RabbitMQ.Client.SslOption): Gets or sets the SSL options for the endpoint. ``` -------------------------------- ### Run RabbitMQ .NET Client Benchmarks Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/CONTRIBUTING.md Execute benchmarks for the RabbitMQ .NET client using 'dotnet run' with a specific project and filter. Ensure you are in the correct directory. ```shell dotnet run --configuration Release --project ./projects/Benchmarks/ --filter Networking_BasicDeliver_LongLivedConnection ``` -------------------------------- ### Filter Tests by Fully Qualified Name on MacOS/Linux Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Run specific tests on MacOS or Linux using NUnit filter expressions. This example filters tests matching the fully qualified name 'RabbitMQ.Client.Unit.TestHeartbeats'. ```shell dotnet test projects/Test/Unit.csproj --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestHeartbeats" ``` -------------------------------- ### Trigger Local Build (6.x) Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RELEASE.md Commands to clean the repository and build the project locally for the 6.x branch. This includes building the solution and pushing the NuGet package. ```bash cd path\to\rabbitmq-dotnet-client git checkout v6.X.Y git clean -xffd .\build.bat dotnet build ./RabbitMQDotNetClient.sln --configuration Release --property:CONCOURSE_CI_BUILD=true dotnet nuget push -k NUGET_API_KEY -s https://api.nuget.org/v3/index.json ./packages/RabbitMQ.Client.6.X.Y.nupkg ``` -------------------------------- ### AsyncDefaultBasicConsumer Methods Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Asynchronous methods for default basic consumer behavior. ```APIDOC ## AsyncDefaultBasicConsumer Methods ### Description Provides default implementations for asynchronous basic consumer event handling, including cancellation and delivery. ### Methods - `HandleBasicCancelAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicCancelOkAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicConsumeOkAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicDeliverAsync(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IReadOnlyBasicProperties properties, ReadOnlyMemory body, CancellationToken cancellationToken)` - `OnCancelAsync(string[] consumerTags, CancellationToken cancellationToken)` ### Parameters #### HandleBasicCancelAsync - **consumerTag** (string) - Required - The tag of the consumer to cancel. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. #### HandleBasicCancelOkAsync - **consumerTag** (string) - Required - The tag of the consumer for which cancel confirmation is received. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. #### HandleBasicConsumeOkAsync - **consumerTag** (string) - Required - The tag of the consumer for which consume confirmation is received. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. #### HandleBasicDeliverAsync - **consumerTag** (string) - Required - The tag of the consumer receiving the message. - **deliveryTag** (ulong) - Required - The delivery tag of the message. - **redelivered** (bool) - Required - Indicates if the message has been redelivered. - **exchange** (string) - Required - The exchange the message was published to. - **routingKey** (string) - Required - The routing key used for the message. - **properties** (IReadOnlyBasicProperties) - Required - The message properties. - **body** (ReadOnlyMemory) - Required - The message body. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. #### OnCancelAsync - **consumerTags** (string[]) - Required - An array of consumer tags that have been cancelled. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. ### Returns - `Task` - Represents the asynchronous operation. ``` -------------------------------- ### Run All Tests on MacOS/Linux/BSD Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Execute all tests for the RabbitMQ .NET client on MacOS, Linux, or BSD using the make command. Note that this does not run the OAuth2 test suite. ```shell make test ``` -------------------------------- ### RabbitMQ.Client.ConnectionConfig Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Configuration for establishing a RabbitMQ connection. ```APIDOC ## RabbitMQ.Client.ConnectionConfig ### Description Holds configuration settings for creating a RabbitMQ connection. ### Properties - **AuthMechanisms** (System.Collections.Generic.IEnumerable) - Gets the collection of authentication mechanisms to use. - **ClientProperties** (System.Collections.Generic.IDictionary) - Gets the client properties to send during connection establishment. ``` -------------------------------- ### Utility Methods and Properties Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Reference for static utility methods and properties in the RabbitMQ .NET client library. ```APIDOC ## Utility Methods and Properties ### Description This section covers static utility methods and properties available in the RabbitMQ .NET client library for parsing addresses, handling timestamps, and configuring default socket factories. ### AmqpTcpEndpoint Methods - **static AmqpTcpEndpoint.Parse(string address)**: Parses a single RabbitMQ connection string into an `AmqpTcpEndpoint` object. - **static AmqpTcpEndpoint.ParseMultiple(string addresses)**: Parses multiple RabbitMQ connection strings into an array of `AmqpTcpEndpoint` objects. ### AmqpTimestamp Operators - **static AmqpTimestamp.operator !=(AmqpTimestamp left, AmqpTimestamp right)**: Compares two `AmqpTimestamp` objects for inequality. - **static AmqpTimestamp.operator ==(AmqpTimestamp left, AmqpTimestamp right)**: Compares two `AmqpTimestamp` objects for equality. ### ConnectionFactory Properties and Methods - **static ConnectionFactory.DefaultAddressFamily.get**: Gets the default address family for socket connections. - **static ConnectionFactory.DefaultAddressFamily.set**: Sets the default address family for socket connections. - **static ConnectionFactory.DefaultAmqpUriSslProtocols.get**: Gets the default SSL protocols for AMQP URIs. - **static ConnectionFactory.DefaultAmqpUriSslProtocols.set**: Sets the default SSL protocols for AMQP URIs. - **static ConnectionFactoryBase.DefaultSocketFactory(System.Net.Sockets.AddressFamily addressFamily)**: Creates a default socket factory for the specified address family. ``` -------------------------------- ### AsyncEventingBasicConsumer Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Details on the asynchronous basic consumer. ```APIDOC ## AsyncEventingBasicConsumer ### Description An asynchronous consumer for basic messages. ### Constructor - **AsyncEventingBasicConsumer(RabbitMQ.Client.IChannel channel)** - Initializes a new instance with the specified channel. ``` -------------------------------- ### IChannelExtensions.BasicPublishAsync Overloads Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Unshipped.net8.0.txt Extension methods for publishing messages asynchronously to RabbitMQ exchanges. ```APIDOC static RabbitMQ.Client.IChannelExtensions.BasicPublishAsync(this RabbitMQ.Client.IChannel! channel, RabbitMQ.Client.CachedString! exchange, RabbitMQ.Client.CachedString! routingKey, bool mandatory, System.ReadOnlyMemory body, System.IDisposable? bodyOwner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static RabbitMQ.Client.IChannelExtensions.BasicPublishAsync(this RabbitMQ.Client.IChannel! channel, RabbitMQ.Client.CachedString! exchange, RabbitMQ.Client.CachedString! routingKey, System.ReadOnlyMemory body, System.IDisposable? bodyOwner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static RabbitMQ.Client.IChannelExtensions.BasicPublishAsync(this RabbitMQ.Client.IChannel! channel, string! exchange, string! routingKey, bool mandatory, System.ReadOnlyMemory body, System.IDisposable? bodyOwner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static RabbitMQ.Client.IChannelExtensions.BasicPublishAsync(this RabbitMQ.Client.IChannel! channel, string! exchange, string! routingKey, System.ReadOnlyMemory body, System.IDisposable? bodyOwner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static RabbitMQ.Client.IChannelExtensions.BasicPublishAsync(this RabbitMQ.Client.IChannel! channel, RabbitMQ.Client.PublicationAddress! addr, T basicProperties, System.ReadOnlyMemory body, System.IDisposable? bodyOwner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask ``` -------------------------------- ### OAuth2 Client Builder Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client.OAuth2/PublicAPI.Shipped.txt Use OAuth2ClientBuilder to configure and create an IOAuth2Client instance. ```APIDOC ## OAuth2ClientBuilder ### Description Provides a fluent interface for building an OAuth2 client. ### Methods #### OAuth2ClientBuilder(string! clientId, string! clientSecret, System.Uri? tokenEndpoint = null, System.Uri? issuer = null) Constructor for OAuth2ClientBuilder. #### AddRequestParameter(string param, string paramValue) -> RabbitMQ.Client.OAuth2.OAuth2ClientBuilder Adds a custom parameter to the token request. #### SetScope(string scope) -> RabbitMQ.Client.OAuth2.OAuth2ClientBuilder Sets the OAuth2 scope for the token request. #### SetHttpClientHandler(System.Net.Http.HttpClientHandler! handler) -> RabbitMQ.Client.OAuth2.OAuth2ClientBuilder! Sets a custom HttpClientHandler for the client. #### BuildAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask Asynchronously builds and returns an IOAuth2Client instance. ``` -------------------------------- ### SSL Options Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Options for configuring SSL/TLS connections. ```APIDOC ## RabbitMQ.Client.SslOption.ClientCertificateContext ### Description Gets or sets the client certificate context for SSL connections. ### Method `ClientCertificateContext.get` `ClientCertificateContext.set` ### Parameters - **value** (System.Net.Security.SslStreamCertificateContext) - The SSL stream certificate context. ``` -------------------------------- ### AsyncDefaultBasicConsumer Methods Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Default implementation methods for asynchronous basic consumers, handling message delivery and cancellations. ```APIDOC ## AsyncDefaultBasicConsumer Methods ### Description Default implementation methods for asynchronous basic consumers, handling message delivery and cancellations. ### Methods - `HandleBasicCancelAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicCancelOkAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicConsumeOkAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicDeliverAsync(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IReadOnlyBasicProperties properties, ReadOnlyMemory body, CancellationToken cancellationToken)` - `OnCancelAsync(string[] consumerTags, CancellationToken cancellationToken)` ### Return Type - `Task` for all methods. ``` -------------------------------- ### IChannel.BasicQosAsync Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Asynchronously sets the quality of service for the channel. ```APIDOC ## POST /rabbitmq/channel/basic/qos ### Description Asynchronously configures the quality of service (QoS) for message delivery on the channel. ### Method POST ### Endpoint /rabbitmq/channel/basic/qos ### Parameters #### Request Body - **prefetchSize** (uint) - Optional - The total number of bytes that are not yet acknowledged by the client. Defaults to 0. - **prefetchCount** (ushort) - Optional - The number of messages that are not yet acknowledged by the client. Defaults to 0. - **global** (boolean) - Optional - If true, the QoS settings apply to the entire connection; otherwise, they apply only to the current channel. Defaults to false. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. ### Request Example ```json { "prefetchSize": 0, "prefetchCount": 10, "global": false } ``` ### Response #### Success Response (200) - **Task** (Task) - A task representing the asynchronous operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### RabbitMQActivitySource Configuration Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Configuration for enabling routing key as operation name in RabbitMQActivitySource. ```APIDOC ## RabbitMQActivitySource.UseRoutingKeyAsOperationName ### Description Gets or sets a boolean value indicating whether to use the routing key as the operation name for tracing. ### Method `static` ### Endpoint `RabbitMQ.Client.RabbitMQActivitySource.UseRoutingKeyAsOperationName` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **bool** - `true` if the routing key is used as the operation name; otherwise, `false`. #### Response Example None ``` -------------------------------- ### Create Channel Options Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Options for creating a new channel, including publisher confirmations and consumer dispatch concurrency. ```APIDOC ## RabbitMQ.Client.CreateChannelOptions.CreateChannelOptions ### Description Initializes a new instance of the CreateChannelOptions class. ### Method Constructor ### Parameters - **publisherConfirmationsEnabled** (bool) - Required - Enables publisher confirmations. - **publisherConfirmationTrackingEnabled** (bool) - Required - Enables tracking of publisher confirmations. - **outstandingPublisherConfirmationsRateLimiter** (System.Threading.RateLimiting.RateLimiter?) - Optional - Rate limiter for outstanding publisher confirmations. - **consumerDispatchConcurrency** (ushort?) - Optional - The concurrency level for consumer dispatch. Defaults to 1. ``` ```APIDOC ## RabbitMQ.Client.CreateChannelOptions Properties ### Description Properties to configure channel creation options. ### Fields - **ConsumerDispatchConcurrency** (`ushort?`) - The concurrency level for consumer dispatch. - **OutstandingPublisherConfirmationsRateLimiter** (`System.Threading.RateLimiting.RateLimiter?`) - Rate limiter for outstanding publisher confirmations. - **PublisherConfirmationsEnabled** (`bool`) - Indicates if publisher confirmations are enabled. - **PublisherConfirmationTrackingEnabled** (`bool`) - Indicates if publisher confirmation tracking is enabled. ``` -------------------------------- ### RabbitMQ Client Interfaces and Factories Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Documentation for key interfaces and factory classes used in the RabbitMQ .NET client. ```APIDOC ## RabbitMQ Client Interfaces and Factories This section covers essential interfaces and factory classes for interacting with RabbitMQ. ### ExchangeType Represents exchange types in RabbitMQ. ### ExternalMechanism * **Constructor**: `ExternalMechanism()` ### ExternalMechanismFactory * **Constructor**: `ExternalMechanismFactory()` * **Method**: `GetInstance()` - Returns an instance of `IAuthMechanism`. * **Property**: `Name` (string) - The name of the mechanism. ### Headers Represents message headers. ### IAmqpHeader * **Property**: `ProtocolClassId` (ushort) ### IAmqpWriteable * **Method**: `GetRequiredBufferSize()` - Returns the required buffer size. * **Method**: `WriteTo(System.Span span)` - Writes data to the provided span. ### IAsyncBasicConsumer * **Property**: `Channel` (IChannel) ### IAuthMechanism Interface for authentication mechanisms. ### IAuthMechanismFactory * **Method**: `GetInstance()` - Returns an instance of `IAuthMechanism`. * **Property**: `Name` (string) - The name of the mechanism. ### IBasicProperties Interface for basic message properties. * **Properties**: `AppId` (string), `ClusterId` (string), `ContentEncoding` (string), `ContentType` (string), `CorrelationId` (string), `DeliveryMode` (byte), `Expiration` (string), `Headers` (Headers), `MessageId` (string), `Priority` (byte), `ReplyTo` (string), `Timestamp` (DateTime), `Type` (string), `UserId` (string) * **Methods**: `ClearAppId()`, `ClearClusterId()`, `ClearContentEncoding()`, `ClearContentType()`, `ClearCorrelationId()`, `ClearDeliveryMode()`, `ClearExpiration()`, `ClearHeaders()`, `ClearMessageId()`, `ClearPriority()`, `ClearReplyTo()`, `ClearTimestamp()`, `ClearType()`, `ClearUserId()` ``` -------------------------------- ### IConnectionFactory Interface Methods Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Methods for creating and configuring connections to RabbitMQ. ```APIDOC ## IConnectionFactory Interface Methods ### Description Factory methods for creating connections and configuring connection parameters. ### Methods - **AuthMechanismFactory(IEnumerable mechanismNames)**: Creates an authentication mechanism factory. ### Properties - **ClientProperties** (System.Collections.Generic.IDictionary) - Get/Set client-defined properties for new connections. - **ClientProvidedName** (string) - Get/Set the client-provided name for new connections. ``` -------------------------------- ### Basic Publish Async Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Asynchronous methods for publishing messages to RabbitMQ. ```APIDOC ## RabbitMQ.Client.IChannelExtensions.BasicPublishAsync ### Description Asynchronously publishes a message to the specified exchange with routing key. ### Method `static BasicPublishAsync` ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **channel** (RabbitMQ.Client.IChannel!) - Required - The channel to use for publishing. - **exchange** (RabbitMQ.Client.CachedString! or string!) - Required - The exchange to publish to. - **routingKey** (RabbitMQ.Client.CachedString! or string!) - Required - The routing key for the message. - **mandatory** (bool) - Optional - Indicates if the message must be routed to a queue. - **body** (System.ReadOnlyMemory) - Required - The message body. - **cancellationToken** (System.Threading.CancellationToken) - Optional - A token to observe for cancellation requests. - **addr** (RabbitMQ.Client.PublicationAddress!) - Required - The publication address. - **basicProperties** (T) - Required - The basic properties for the message. ### Request Example ```json { "exchange": "my_exchange", "routingKey": "my_routing_key", "body": "SGVsbG8gV29ybGQh" } ``` ### Response #### Success Response (200) Returns a `System.Threading.Tasks.ValueTask` indicating the completion of the asynchronous operation. ``` -------------------------------- ### CreateChannelOptions Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Options for creating a new channel, including publisher confirmations and consumer dispatch concurrency. ```APIDOC ## RabbitMQ.Client.CreateChannelOptions.CreateChannelOptions ### Description Initializes a new instance of the CreateChannelOptions class with specified settings. ### Method Constructor ### Parameters - **publisherConfirmationsEnabled** (bool) - Required - Enables publisher confirmations. - **publisherConfirmationTrackingEnabled** (bool) - Required - Enables tracking of publisher confirmations. - **outstandingPublisherConfirmationsRateLimiter** (System.Threading.RateLimiting.RateLimiter?) - Optional - A rate limiter for outstanding publisher confirmations. - **consumerDispatchConcurrency** (ushort?) - Optional - The concurrency level for dispatching consumer messages. Defaults to 1. ``` ```APIDOC ## RabbitMQ.Client.CreateChannelOptions ### Description Provides properties to configure channel creation options. ### Properties - **ConsumerDispatchConcurrency** (ushort?) - The concurrency level for dispatching consumer messages. - **OutstandingPublisherConfirmationsRateLimiter** (System.Threading.RateLimiting.RateLimiter?) - A rate limiter for outstanding publisher confirmations. - **PublisherConfirmationsEnabled** (bool) - Indicates if publisher confirmations are enabled. - **PublisherConfirmationTrackingEnabled** (bool) - Indicates if publisher confirmation tracking is enabled. ``` -------------------------------- ### Create Final Release Tag Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RELEASE.md Create a signed Git tag for the final release. Ensure the GPG key ID is correct. ```bash git tag -a -s -u B1B82CC0CF84BA70147EBD05D99DE30E43EAE440 -m 'rabbitmq-dotnet-client v7.X.Y' 'v7.X.Y' ``` -------------------------------- ### Create RC Release Tag Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RELEASE.md Create a signed Git tag for a release candidate. Ensure the GPG key ID is correct. ```bash git tag -a -s -u B1B82CC0CF84BA70147EBD05D99DE30E43EAE440 -m 'rabbitmq-dotnet-client v7.X.Y-rc.1' 'v7.X.Y-rc.1' ``` -------------------------------- ### Run All Tests on Windows Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Execute all tests for the RabbitMQ .NET client on Windows using the build script. Note that this does not run the OAuth2 test suite. ```powershell build.ps1 -RunTests ``` -------------------------------- ### IChannel.BasicPublishAsync Overloads Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Unshipped.net8.0.txt Asynchronous methods for publishing messages to RabbitMQ exchanges. ```APIDOC RabbitMQ.Client.IChannel.BasicPublishAsync(RabbitMQ.Client.CachedString! exchange, RabbitMQ.Client.CachedString! routingKey, bool mandatory, TProperties basicProperties, System.ReadOnlyMemory body, System.IDisposable? bodyOwner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask RabbitMQ.Client.IChannel.BasicPublishAsync(string! exchange, string! routingKey, bool mandatory, TProperties basicProperties, System.ReadOnlyMemory body, System.IDisposable? bodyOwner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask ``` -------------------------------- ### ConnectionFactoryBase Constructor and Properties Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Information about the base connection factory class, including its constructor and socket factory property. ```APIDOC ## ConnectionFactoryBase ### Constructor - **Description**: Initializes a new instance of the `ConnectionFactoryBase` class. - **Signature**: `RabbitMQ.Client.ConnectionFactoryBase()` ### SocketFactory - **Description**: A factory for creating TCP clients, used for establishing network connections. - **Type**: System.Func ``` -------------------------------- ### RabbitMQ Tracing Options Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Configuration options for RabbitMQ tracing. ```APIDOC ## RabbitMQ.Client.RabbitMQTracingOptions.RabbitMQTracingOptions ### Description Initializes a new instance of the RabbitMQTracingOptions class. ### Method Constructor ``` ```APIDOC ## RabbitMQ.Client.RabbitMQTracingOptions Properties ### Description Properties to configure tracing behavior. ### Fields - **UsePublisherAsParent** (`bool`) - Gets or sets a value indicating whether to use the publisher as the parent span. - **UseRoutingKeyAsOperationName** (`bool`) - Gets or sets a value indicating whether to use the routing key as the operation name. ``` ```APIDOC ## RabbitMQ.Client.RabbitMQActivitySource.TracingOptions ### Description Gets or sets the tracing options for RabbitMQ activities. ### Method `static TracingOptions.get` `static TracingOptions.set` ### Parameters - **value** (RabbitMQ.Client.RabbitMQTracingOptions!) - The tracing options to set. ``` ```APIDOC ## RabbitMQ.Client.RabbitMQActivitySource Constants ### Description Constants for RabbitMQ activity source names. ### Fields - **PublisherSourceName** (`string!`) - The activity source name for publishers. - **SubscriberSourceName** (`string!`) - The activity source name for subscribers. ``` -------------------------------- ### Credentials and Authentication Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Details on how to provide and manage credentials for RabbitMQ connections, including custom credential providers and authentication mechanisms. ```APIDOC ## Class: RabbitMQ.Client.BasicCredentialsProvider ### Description A basic implementation of a credentials provider that stores username and password. ### Constructor - **BasicCredentialsProvider(string? name, string userName, string password)**: Initializes a new instance of the BasicCredentialsProvider class. ### Methods - **GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default)**: Asynchronously retrieves the credentials. - Returns: A Task representing the asynchronous operation. ### Properties - **Name**: Gets the name of the credentials provider. - Type: string ## Class: RabbitMQ.Client.Credentials ### Description Represents the credentials used for authenticating with RabbitMQ. ### Constructor - **Credentials(string name, string userName, string password, System.TimeSpan? validUntil)**: Initializes a new instance of the Credentials class. ### Properties - **Name**: Gets the name of the credentials. - Type: string - **UserName**: Gets the username. - Type: string - **Password**: Gets the password. - Type: string - **ValidUntil**: Gets the expiration time of the credentials. - Type: System.TimeSpan? ## Interface: RabbitMQ.Client.ICredentialsProvider ### Description Interface for providing credentials to establish a connection. ### Methods - **GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default)**: Asynchronously retrieves the credentials. - Returns: A Task representing the asynchronous operation. ### Properties - **Name**: Gets the name of the credentials provider. - Type: string ## Class: RabbitMQ.Client.ExternalMechanism ### Description Represents the external authentication mechanism. ### Methods - **HandleChallengeAsync(byte[]? challenge, RabbitMQ.Client.ConnectionConfig config, System.Threading.CancellationToken cancellationToken = default)**: Handles the challenge-response authentication process asynchronously. - Parameters: - challenge (byte[]?): The challenge data from the server. - config (RabbitMQ.Client.ConnectionConfig): The connection configuration. - cancellationToken (System.Threading.CancellationToken): Token to monitor for cancellation requests. - Returns: A Task representing the asynchronous operation, containing the response to the challenge. ## Class: RabbitMQ.Client.PlainMechanism ### Description Represents the PLAIN authentication mechanism. ### Methods - **HandleChallengeAsync(byte[]? challenge, RabbitMQ.Client.ConnectionConfig config, System.Threading.CancellationToken cancellationToken = default)**: Handles the challenge-response authentication process asynchronously. - Parameters: - challenge (byte[]?): The challenge data from the server. - config (RabbitMQ.Client.ConnectionConfig): The connection configuration. - cancellationToken (System.Threading.CancellationToken): Token to monitor for cancellation requests. - Returns: A Task representing the asynchronous operation, containing the response to the challenge. ## Class: RabbitMQ.Client.ConnectionFactory ### Properties - **CredentialsProvider**: Gets or sets the credentials provider for the connection factory. - Type: RabbitMQ.Client.ICredentialsProvider? ## Class: RabbitMQ.Client.ConnectionConfig ### Properties - **CredentialsProvider**: Gets the credentials provider for the connection configuration. - Type: RabbitMQ.Client.ICredentialsProvider - **ConsumerDispatchConcurrency**: Gets the concurrency level for consumer dispatch. - Type: ushort ## Constants - **RabbitMQ.Client.Constants.DefaultConsumerDispatchConcurrency**: The default consumer dispatch concurrency. - Value: 1 - Type: ushort ``` -------------------------------- ### Run Tests with Custom RabbitMQCTL Path Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Execute tests using a custom path to the rabbitmqctl executable. This is useful when running RabbitMQ from source or a non-standard location. ```shell RABBITMQ_RABBITMQCTL_PATH=/path/to/rabbitmqctl dotnet test projects/Test/Unit.csproj ``` -------------------------------- ### BasicPublishAsync Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Asynchronous methods for publishing messages to RabbitMQ. ```APIDOC ## RabbitMQ.Client.IChannelExtensions.BasicPublishAsync ### Description Asynchronously publishes a message to the specified exchange with the given routing key. ### Method POST (conceptual, as it's an extension method) ### Endpoint N/A (Extension Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **channel** (RabbitMQ.Client.IChannel!) - Required - The channel to use for publishing. - **exchange** (RabbitMQ.Client.CachedString! or string!) - Required - The exchange to publish to. - **routingKey** (RabbitMQ.Client.CachedString! or string!) - Required - The routing key for the message. - **mandatory** (bool) - Optional - If true, the message must be routable or it will be returned. - **body** (System.ReadOnlyMemory) - Required - The message body. - **cancellationToken** (System.Threading.CancellationToken) - Optional - A token to observe for cancellation requests. - **addr** (RabbitMQ.Client.PublicationAddress!) - Required (for generic overload) - The publication address. - **basicProperties** (T) - Required (for generic overload) - The basic properties for the message. ### Request Example ```json { "exchange": "my-exchange", "routingKey": "my-routing-key", "body": "SGVsbG8gV29ybGQh", "mandatory": false } ``` ### Response #### Success Response (200) Returns a ValueTask representing the asynchronous operation. #### Response Example (No specific response body for this operation, success is indicated by the ValueTask completing.) ``` -------------------------------- ### RabbitMQActivitySource Context Management Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Methods for extracting and injecting context for distributed tracing. ```APIDOC ## RabbitMQActivitySource Context Management ### ContextExtractor #### Get - **Type**: `System.Func!` - **Description**: Gets the function used to extract tracing context from basic properties. #### Set - **Type**: `void` - **Description**: Sets the function used to extract tracing context from basic properties. ### ContextInjector #### Get - **Type**: `System.Action!>`! - **Description**: Gets the action used to inject tracing context into a dictionary. #### Set - **Type**: `void` - **Description**: Sets the action used to inject tracing context into a dictionary. ``` -------------------------------- ### RabbitMQ Client Interfaces and Classes Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Details on key interfaces and classes used in the RabbitMQ .NET client. ```APIDOC ## ExchangeType ### Description Represents the type of an exchange. --- ## ExternalMechanism ### Description Represents the external authentication mechanism. ### Constructors - `ExternalMechanism()` --- ## ExternalMechanismFactory ### Description Factory for creating `ExternalMechanism` instances. ### Methods - `GetInstance()` -> `RabbitMQ.Client.IAuthMechanism` ### Properties - `Name` (string) - The name of the mechanism. --- ## Headers ### Description Represents message headers. --- ## IAmqpHeader ### Description Interface for AMQP headers. ### Properties - `ProtocolClassId` (ushort) - The protocol class ID. --- ## IAmqpWriteable ### Description Interface for objects that can be written to a byte span. ### Methods - `GetRequiredBufferSize()` -> `int` - `WriteTo(System.Span span)` -> `int` --- ## IAsyncBasicConsumer ### Description Interface for asynchronous basic consumers. ### Properties - `Channel` (`RabbitMQ.Client.IChannel`) - The channel associated with the consumer. --- ## IAuthMechanism ### Description Interface for authentication mechanisms. --- ## IAuthMechanismFactory ### Description Interface for authentication mechanism factories. ### Methods - `GetInstance()` -> `RabbitMQ.Client.IAuthMechanism` ### Properties - `Name` (string) - The name of the mechanism factory. --- ## IBasicProperties ### Description Interface for basic message properties. ### Properties - `AppId` (string) - The application identifier. - `ClusterId` (string) - The cluster identifier. - `ContentEncoding` (string) - The content encoding. - `ContentType` (string) - The content type. - `CorrelationId` (string) - The correlation identifier. - `DeliveryMode` (byte) - The delivery mode. - `Expiration` (string) - The expiration time. - `Headers` (`RabbitMQ.Client.Headers`) - The message headers. - `MessageId` (string) - The message identifier. - `Priority` (byte) - The message priority. - `ReplyTo` (string) - The reply-to address. - `Timestamp` (`System.DateTimeOffset`) - The timestamp of the message. - `Type` (string) - The message type. - `UserId` (string) - The user identifier. ### Methods - `ClearAppId()` - `ClearClusterId()` - `ClearContentEncoding()` - `ClearContentType()` - `ClearCorrelationId()` - `ClearDeliveryMode()` - `ClearExpiration()` - `ClearHeaders()` - `ClearMessageId()` - `ClearPriority()` - `ClearReplyTo()` - `ClearTimestamp()` - `ClearType()` - `ClearUserId()` ``` -------------------------------- ### Connection Factory Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.net8.0.txt Factory for creating RabbitMQ connections. ```APIDOC ## RabbitMQ.Client.ConnectionFactory.CreateConnectionAsync ### Description Asynchronously creates a RabbitMQ connection. ### Method `static CreateConnectionAsync` ### Parameters - **endpointResolver** (RabbitMQ.Client.IEndpointResolver!) - Required - The endpoint resolver to use. - **clientProvidedName** (string?) - Optional - A name provided by the client for the connection. - **cancellationToken** (System.Threading.CancellationToken) - Optional - A token to observe for cancellation requests. ### Response #### Success Response (200) Returns a `System.Threading.Tasks.Task` representing the asynchronous operation. ``` -------------------------------- ### AddRabbitMQInstrumentation Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client.OpenTelemetry/PublicAPI.Unshipped.txt Extension method to add RabbitMQ instrumentation to the TracerProviderBuilder. ```APIDOC ## AddRabbitMQInstrumentation ### Description Adds RabbitMQ instrumentation to the OpenTelemetry TracerProviderBuilder. This allows for automatic collection of traces for RabbitMQ operations. ### Method `static OpenTelemetry.Trace.OpenTelemetryExtensions.AddRabbitMQInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configure)` ### Endpoint N/A (This is a library extension method, not a network endpoint) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Example usage within OpenTelemetry setup services.AddOpenTelemetryTracing(builder => { builder.AddRabbitMQInstrumentation(options => { // Configure tracing options if needed // options.SomeOption = ...; }); // Other configurations... }); ``` ### Response #### Success Response (200) Returns the modified `TracerProviderBuilder` for chaining. #### Response Example N/A (This method modifies the builder in place and returns it.) ``` -------------------------------- ### Configure Docker for RabbitMQCTL Path Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/RUNNING_TESTS.md Set the RABBITMQ_RABBITMQCTL_PATH environment variable to 'DOCKER:' to instruct the tests to use Docker for executing rabbitmqctl commands. ```shell # Example: RABBITMQ_RABBITMQCTL_PATH=DOCKER:rabbitmq-dotnet-client-rabbitmq ``` -------------------------------- ### IAsyncBasicConsumer Methods Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Asynchronous methods for handling basic consumer events in RabbitMQ. ```APIDOC ## IAsyncBasicConsumer Methods ### Description Methods for handling asynchronous basic consumer events like cancellations, confirmations, and message deliveries. ### Methods - `HandleBasicCancelAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicCancelOkAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicConsumeOkAsync(string consumerTag, CancellationToken cancellationToken)` - `HandleBasicDeliverAsync(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IReadOnlyBasicProperties properties, ReadOnlyMemory body, CancellationToken cancellationToken)` ### Parameters #### HandleBasicCancelAsync - **consumerTag** (string) - Required - The tag of the consumer to cancel. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. #### HandleBasicCancelOkAsync - **consumerTag** (string) - Required - The tag of the consumer for which cancel confirmation is received. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. #### HandleBasicConsumeOkAsync - **consumerTag** (string) - Required - The tag of the consumer for which consume confirmation is received. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. #### HandleBasicDeliverAsync - **consumerTag** (string) - Required - The tag of the consumer receiving the message. - **deliveryTag** (ulong) - Required - The delivery tag of the message. - **redelivered** (bool) - Required - Indicates if the message has been redelivered. - **exchange** (string) - Required - The exchange the message was published to. - **routingKey** (string) - Required - The routing key used for the message. - **properties** (IReadOnlyBasicProperties) - Required - The message properties. - **body** (ReadOnlyMemory) - Required - The message body. - **cancellationToken** (CancellationToken) - Optional - A token to observe for cancellation requests. ### Returns - `Task` - Represents the asynchronous operation. ``` -------------------------------- ### Connection Configuration Source: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/PublicAPI/PublicAPI.Shipped.netstandard2.0.txt Configuration settings for RabbitMQ connections. ```APIDOC ## ConnectionConfig.CredentialsProvider ### Description Gets or sets the credentials provider for the connection. ### Method GET/SET ### Endpoint /connection/config/credentialsProvider ### Response #### Success Response (200) - **RabbitMQ.Client.ICredentialsProvider!** - The credentials provider. ### Response Example ```json { "name": "defaultProvider" } ``` ``` ```APIDOC ## ConnectionConfig.ConsumerDispatchConcurrency ### Description Gets the consumer dispatch concurrency setting for the connection. ### Method GET ### Endpoint /connection/config/consumerDispatchConcurrency ### Response #### Success Response (200) - **ushort** - The consumer dispatch concurrency value. ### Response Example ```json 1 ``` ```