Table of Contents

Interface IRabbitMqManagementClient

Namespace
Excalibur.Dispatch.Transport.RabbitMQ
Assembly
Excalibur.Dispatch.Transport.RabbitMQ.dll

Client for interacting with the RabbitMQ Management HTTP API.

public interface IRabbitMqManagementClient : IAsyncDisposable
Inherited Members
Extension Methods

Remarks

Provides read and operational access to the RabbitMQ Management plugin's HTTP API for monitoring queue states, exchange configurations, connection details, and performing administrative operations such as queue purging.

This interface follows the Microsoft pattern of keeping interface surface area minimal (5 methods). Additional management operations can be added via extension methods or the GetService(Type) escape hatch for direct HTTP access.

Methods

GetConnectionInfoAsync(string, CancellationToken)

Gets information about a specific connection.

Task<ConnectionInfo> GetConnectionInfoAsync(string connectionName, CancellationToken cancellationToken)

Parameters

connectionName string

The name of the connection.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<ConnectionInfo>

A Task<TResult> representing the asynchronous operation, containing the ConnectionInfo.

Exceptions

ArgumentNullException

Thrown when connectionName is null.

GetExchangeInfoAsync(string, CancellationToken)

Gets information about a specific exchange.

Task<ExchangeInfo> GetExchangeInfoAsync(string exchangeName, CancellationToken cancellationToken)

Parameters

exchangeName string

The name of the exchange.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<ExchangeInfo>

A Task<TResult> representing the asynchronous operation, containing the ExchangeInfo.

Exceptions

ArgumentNullException

Thrown when exchangeName is null.

GetOverviewAsync(CancellationToken)

Gets a high-level overview of the RabbitMQ broker.

Task<BrokerOverview> GetOverviewAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

Task<BrokerOverview>

A Task<TResult> representing the asynchronous operation, containing the BrokerOverview.

GetQueueInfoAsync(string, CancellationToken)

Gets information about a specific queue.

Task<QueueInfo> GetQueueInfoAsync(string queueName, CancellationToken cancellationToken)

Parameters

queueName string

The name of the queue.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<QueueInfo>

A Task<TResult> representing the asynchronous operation, containing the QueueInfo.

Exceptions

ArgumentNullException

Thrown when queueName is null.

PurgeQueueAsync(string, CancellationToken)

Purges all messages from the specified queue.

Task PurgeQueueAsync(string queueName, CancellationToken cancellationToken)

Parameters

queueName string

The name of the queue to purge.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A Task representing the asynchronous purge operation.

Exceptions

ArgumentNullException

Thrown when queueName is null.