Interface IConsumerManager
Manager abstraction responsible for creating and managing IConsumer instances. Implementations provide asynchronous creation methods with various configuration options and support deletion/lifecycle management of created consumers.
Namespace: CodersRealm.NmsAmqpClient
Assembly: CodersRealm.NmsAmqpClient.dll
Syntax
public interface IConsumerManager
Properties
IsDisposed
Gets a value indicating whether this factory has been disposed and can no longer create consumers.
Declaration
bool IsDisposed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
CreateAsync(ConsumerOptions)
Create a consumer asynchronously using the specified ConsumerOptions.
Declaration
Task<IConsumer> CreateAsync(ConsumerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsumerOptions | options | Options that control consumer configuration and behavior. |
Returns
| Type | Description |
|---|---|
| Task<IConsumer> | A task that represents the asynchronous operation. The task result contains the created IConsumer. |
CreateAsync(ConsumerOptions, ResponderOptions)
Asynchronously creates a new consumer-responder instance using the specified consumer and responder options.
Declaration
Task<IConsumer> CreateAsync(ConsumerOptions consumerOptions, ResponderOptions responderOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsumerOptions | consumerOptions | The configuration options that define the behavior and settings for the consumer. Cannot be null. |
| ResponderOptions | responderOptions | The configuration options that specify how the consumer responds to messages. Cannot be null. |
Returns
| Type | Description |
|---|---|
| Task<IConsumer> | A task that represents the asynchronous operation. The task result contains an ISubscriber instance configured with the provided options. |
DeleteAsync(Guid)
Asynchronously deletes (disposes) a consumer identified by its tag.
Declaration
Task DeleteAsync(Guid consumerTag)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | consumerTag | The unique identifier of the consumer to delete. |
Returns
| Type | Description |
|---|---|
| Task | A task that represents the asynchronous delete operation. |