RabbitMqCommandQueue<TMarker> Class
Definition
- Namespace
- Savvyio.Extensions.DependencyInjection.RabbitMQ.Commands
- Assemblies
- Savvyio.Extensions.DependencyInjection.RabbitMQ.dll
Provides a default implementation of the RabbitMqMessage class for messages holding an ICommand implementation.
public class RabbitMqCommandQueue<TMarker> : RabbitMqCommandQueue, IDisposable, IAsyncDisposable, IAsyncHealthCheckProvider<IConnection>, IPointToPointChannel<ICommand, TMarker>, IPointToPointChannel<ICommand>, ISender<ICommand, TMarker>, ISender<ICommand>, IReceiver<ICommand, TMarker>, IReceiver<ICommand>, IDependencyInjectionMarker<TMarker>
Type Parameters
TMarker
- Inheritance
-
objectRabbitMqCommandQueue<TMarker>
- Implements
-
IAsyncHealthCheckProvider<IConnection>IPointToPointChannel<ICommand, TMarker>IDependencyInjectionMarker<TMarker>
- Inherited Members
Examples
The RabbitMqCommandQueue registered by AddRabbitMqCommandQueue is the concrete DI-managed command queue; resolve it to access SendAsync and ReceiveAsync.
using System;
using Microsoft.Extensions.DependencyInjection;
using Savvyio.Commands;
using Savvyio.Extensions.RabbitMQ.Commands;
using Savvyio.Messaging;
namespace ExampleApp;
public class RabbitMqCommandQueueUsage
{
private readonly RabbitMqCommandQueue _queue;
public RabbitMqCommandQueueUsage(RabbitMqCommandQueue queue)
{
_queue = queue;
}
public IPointToPointChannel<ICommand> AsChannel() => _queue;
}
Constructors
| Name | Description |
|---|---|
| RabbitMqCommandQueue(IMarshaller, RabbitMqCommandQueueOptions<TMarker>) | Initializes a new instance of the RabbitMqCommandQueue<TMarker> class. |
See Also
IPointToPointChannel<TRequest, TMarker>