AzureCommandQueue<TMarker> Class
Definition
- Assemblies
- Savvyio.Extensions.DependencyInjection.QueueStorage.dll
Provides a default implementation of the AzureCommandQueue class that is optimized for Dependency Injection.
public class AzureCommandQueue<TMarker> : AzureCommandQueue, IHealthCheckProvider<QueueServiceClient>, IPointToPointChannel<ICommand, TMarker>, IPointToPointChannel<ICommand>, ISender<ICommand, TMarker>, ISender<ICommand>, IReceiver<ICommand, TMarker>, IReceiver<ICommand>, IDependencyInjectionMarker<TMarker>
Type Parameters
TMarker
- Inheritance
-
objectAzureCommandQueue<TMarker>
- Implements
-
IPointToPointChannel<ICommand, TMarker>IDependencyInjectionMarker<TMarker>
- Inherited Members
Examples
AzureCommandQueue<TMarker> is the DI-registered Azure Queue Storage command queue with a lifetime marker. It implements both ISender<ICommand> and IReceiver<ICommand>. Inject it directly or through one of those interfaces to send and receive commands via Azure Storage queues.
using Savvyio.Commands;
using Savvyio.Extensions.QueueStorage.Commands;
using Savvyio.Messaging;
namespace ExampleApp;
public sealed class AzureCommandService
{
private readonly ISender<ICommand> _sender;
private readonly IReceiver<ICommand> _receiver;
public AzureCommandService(AzureCommandQueue queue)
{
_sender = queue;
_receiver = queue;
}
public ISender<ICommand> Sender => _sender;
public IReceiver<ICommand> Receiver => _receiver;
}
Constructors
| Name | Description |
|---|---|
| AzureCommandQueue(IMarshaller, AzureQueueOptions<TMarker>) | Initializes a new instance of the AzureCommandQueue<TMarker> class. |
See Also
IPointToPointChannel<TRequest, TMarker>