Class RabbitMqMessageConsumer
Inheritance
RabbitMqMessageConsumer
Assembly: Volo.Abp.RabbitMQ.dll
Syntax
public class RabbitMqMessageConsumer : IRabbitMqMessageConsumer, ITransientDependency, IDisposable
Constructors
RabbitMqMessageConsumer(IConnectionPool, AbpAsyncTimer, IExceptionNotifier)
Declaration
public RabbitMqMessageConsumer(IConnectionPool connectionPool, AbpAsyncTimer timer, IExceptionNotifier exceptionNotifier)
Parameters
Properties
Callbacks
Declaration
protected ConcurrentBag<Func<IModel, BasicDeliverEventArgs, Task>> Callbacks { get; }
Property Value
Channel
Declaration
protected IModel? Channel { get; }
Property Value
ChannelSendSyncLock
Declaration
protected object ChannelSendSyncLock { get; }
Property Value
ConnectionName
Declaration
protected string? ConnectionName { get; }
Property Value
ConnectionPool
Declaration
protected IConnectionPool ConnectionPool { get; }
Property Value
ExceptionNotifier
Declaration
protected IExceptionNotifier ExceptionNotifier { get; }
Property Value
Exchange
Declaration
protected ExchangeDeclareConfiguration Exchange { get; }
Property Value
Logger
Declaration
public ILogger<RabbitMqMessageConsumer> Logger { get; set; }
Property Value
Queue
Declaration
protected QueueDeclareConfiguration Queue { get; }
Property Value
QueueBindCommands
Declaration
protected ConcurrentQueue<RabbitMqMessageConsumer.QueueBindCommand> QueueBindCommands { get; }
Property Value
Timer
Declaration
protected AbpAsyncTimer Timer { get; }
Property Value
Methods
BindAsync(string)
Declaration
public virtual Task BindAsync(string routingKey)
Parameters
Type |
Name |
Description |
string |
routingKey |
|
Returns
Dispose()
Declaration
public virtual void Dispose()
DisposeChannel()
Declaration
protected virtual void DisposeChannel()
DisposeChannelAsync()
Declaration
protected virtual Task DisposeChannelAsync()
Returns
HandleIncomingMessageAsync(object, BasicDeliverEventArgs)
Declaration
protected virtual Task HandleIncomingMessageAsync(object sender, BasicDeliverEventArgs basicDeliverEventArgs)
Parameters
Type |
Name |
Description |
object |
sender |
|
BasicDeliverEventArgs |
basicDeliverEventArgs |
|
Returns
Initialize(ExchangeDeclareConfiguration, QueueDeclareConfiguration, string?)
Declaration
public void Initialize(ExchangeDeclareConfiguration exchange, QueueDeclareConfiguration queue, string? connectionName = null)
Parameters
OnMessageReceived(Func<IModel, BasicDeliverEventArgs, Task>)
Declaration
public virtual void OnMessageReceived(Func<IModel, BasicDeliverEventArgs, Task> callback)
Parameters
Type |
Name |
Description |
Func<IModel, BasicDeliverEventArgs, Task> |
callback |
|
Timer_Elapsed(AbpAsyncTimer)
Declaration
protected virtual Task Timer_Elapsed(AbpAsyncTimer timer)
Parameters
Returns
TryCreateChannelAsync()
Declaration
protected virtual Task TryCreateChannelAsync()
Returns
TrySendQueueBindCommandsAsync()
Declaration
protected virtual Task TrySendQueueBindCommandsAsync()
Returns
UnbindAsync(string)
Declaration
public virtual Task UnbindAsync(string routingKey)
Parameters
Type |
Name |
Description |
string |
routingKey |
|
Returns
Implements
Extension Methods