Show / Hide Table of Contents

Interface IAmqpClient

Represents a client that manages AMQP connection lifecycle and related producer/consumer/subscriber managers.

Inherited Members
IAsyncDisposable.DisposeAsync()
Namespace: CodersRealm.AmqpClient
Assembly: CodersRealm.AmqpClient.dll
Syntax
public interface IAmqpClient : IAsyncDisposable

Properties

ClientId

Gets the unique identifier for this client instance.

Declaration
string ClientId { get; }
Property Value
Type Description
string

Consumers

Gets the manager responsible for creating and managing message consumers for queues.

Declaration
IConsumerManager Consumers { get; }
Property Value
Type Description
IConsumerManager
See Also
IConsumerManager

IsConnected

Gets a bool value indicating whether the client currently has a active connection that has started and is open.

Declaration
bool IsConnected { get; }
Property Value
Type Description
bool
Remarks

Note, it is possible for the connection to be lost and this flag to indicate true (or vise versa) until internal events are trigger that would enable the determination that the connection is closed or open.

IsDisposed

Gets a value indicating whether the client has been disposed.

Declaration
bool IsDisposed { get; }
Property Value
Type Description
bool

IsStarted

Gets a value indicating whether the client has been started.

Declaration
bool IsStarted { get; }
Property Value
Type Description
bool

Producers

Gets the manager responsible for creating and managing message producers.

Declaration
IProducerManager Producers { get; }
Property Value
Type Description
IProducerManager
See Also
IProducerManager

Subscribers

Gets the manager responsible for creating and managing message subscribers for topics.

Declaration
ISubscriberManager Subscribers { get; }
Property Value
Type Description
ISubscriberManager
See Also
ISubscriberManager

Methods

DisposeAsync(CancellationToken)

Asynchronously disposes the client and force a graceful shutdown of resources.

Declaration
ValueTask DisposeAsync(CancellationToken shutdownTimeoutToken)
Parameters
Type Name Description
CancellationToken shutdownTimeoutToken

A cancellation token used to enforce a timeout period, signaling consumers and subscribers to complete their processing.

Returns
Type Description
ValueTask

A ValueTask that represents the asynchronous dispose operation.

Remarks

Set the shutdownTimeout token to cancel after a period of time.

StartAsync()

Starts the client's connection asynchronously.

Declaration
Task StartAsync()
Returns
Type Description
Task

A Task that completes when the connection has been established.

StartAsync(CancellationToken)

Starts the client's connection asynchronously and observes the provided cancellation token.

Declaration
Task StartAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

A token to observe while starting the connection.

Returns
Type Description
Task

A Task that completes when the connection has been established or the operation is cancelled.

In this article
Back to top Generated by DocFX