Interface IProducerManager
Factory abstraction responsible for creating and managing IProducer instances. Implementations create producers for destinations or queues and support deletion and lifecycle observation. All creation methods are asynchronous to allow for remote or I/O-bound producer initialization.
Namespace: CodersRealm.NmsAmqpClient
Assembly: CodersRealm.NmsAmqpClient.dll
Syntax
public interface IProducerManager
Properties
IsDisposed
Gets a value indicating whether this factory has been disposed and no longer can create producers.
Declaration
bool IsDisposed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
CreateAsync()
Create a default producer asynchronously.
Declaration
Task<IProducer> CreateAsync()
Returns
| Type | Description |
|---|---|
| Task<IProducer> | A task that represents the asynchronous operation. The task result contains the created IProducer. |
CreateAsync(IDestination)
Create a producer bound to the specified destination asynchronously.
Declaration
Task<IProducer> CreateAsync(IDestination destination)
Parameters
| Type | Name | Description |
|---|---|---|
| IDestination | destination | The destination to which the producer will send messages. |
Returns
| Type | Description |
|---|---|
| Task<IProducer> | A task that represents the asynchronous operation. The task result contains the created IProducer. |
CreateAsync(ProducerOptions)
Create a producer using the provided ProducerOptions asynchronously.
Declaration
Task<IProducer> CreateAsync(ProducerOptions producerOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| ProducerOptions | producerOptions | Options that control producer configuration and behavior. |
Returns
| Type | Description |
|---|---|
| Task<IProducer> | A task that represents the asynchronous operation. The task result contains the created IProducer. |
CreateAsync(ProducerOptions, ConsumerOptions)
Create a producer using the provided ProducerOptions and associate it with a consumer configured by ConsumerOptions.
Declaration
Task<IProducer> CreateAsync(ProducerOptions producerOptions, ConsumerOptions consumerOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| ProducerOptions | producerOptions | Options that control producer configuration and behavior. |
| ConsumerOptions | consumerOptions | Options that configure an associated consumer where applicable. |
Returns
| Type | Description |
|---|---|
| Task<IProducer> | A task that represents the asynchronous operation. The task result contains the created IProducer. |
CreateAsync(ProducerOptions, SubscriberOptions)
Create a producer using the provided ProducerOptions and associate it with a subscriber configured by SubscriberOptions.
Declaration
Task<IProducer> CreateAsync(ProducerOptions producerOptions, SubscriberOptions subscriberOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| ProducerOptions | producerOptions | Options that control producer configuration and behavior. |
| SubscriberOptions | subscriberOptions | Options that configure an associated subscriber where applicable. |
Returns
| Type | Description |
|---|---|
| Task<IProducer> | A task that represents the asynchronous operation. The task result contains the created IProducer. |
CreateAsync(string)
Create a producer for the specified queue name asynchronously.
Declaration
Task<IProducer> CreateAsync(string queueName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | queueName | The name of the queue to which the producer will send messages. |
Returns
| Type | Description |
|---|---|
| Task<IProducer> | A task that represents the asynchronous operation. The task result contains the created IProducer. |
DeleteAsync(Guid)
Asynchronously deletes (disposes) a producer identified by its tag.
Declaration
Task DeleteAsync(Guid producerTag)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | producerTag | The unique identifier of the producer to delete. |
Returns
| Type | Description |
|---|---|
| Task | A task that represents the asynchronous delete operation. |