Class RabbitMqMessageConsumer
Inheritance
System.Object
RabbitMqMessageConsumer
Implements
ITransientDependency
IDisposable
Assembly: Volo.Abp.RabbitMQ.dll
Syntax
public class RabbitMqMessageConsumer : object, IRabbitMqMessageConsumer, ITransientDependency, IDisposable
Constructors
RabbitMqMessageConsumer(IConnectionPool, AbpTimer, IExceptionNotifier)
Declaration
public RabbitMqMessageConsumer(IConnectionPool connectionPool, AbpTimer timer, IExceptionNotifier exceptionNotifier)
Parameters
Properties
Callbacks
Declaration
protected ConcurrentBag<Func<IModel, BasicDeliverEventArgs, Task>> Callbacks { get; }
Property Value
Type |
Description |
ConcurrentBag<Func<IModel, BasicDeliverEventArgs, Task>> |
|
Channel
Declaration
protected IModel Channel { get; }
Property Value
ChannelSendSyncLock
Declaration
protected object ChannelSendSyncLock { get; }
Property Value
Type |
Description |
System.Object |
|
ConnectionName
Declaration
protected string ConnectionName { get; }
Property Value
Type |
Description |
System.String |
|
ConnectionPool
Declaration
protected IConnectionPool ConnectionPool { get; }
Property Value
ExceptionNotifier
Declaration
protected IExceptionNotifier ExceptionNotifier { get; }
Property Value
Type |
Description |
IExceptionNotifier |
|
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 AbpTimer Timer { get; }
Property Value
Methods
BindAsync(String)
Declaration
public virtual Task BindAsync(string routingKey)
Parameters
Type |
Name |
Description |
System.String |
routingKey |
|
Returns
Dispose()
Declaration
public virtual void Dispose()
DisposeChannel()
Declaration
protected virtual void DisposeChannel()
HandleIncomingMessage(IModel, BasicDeliverEventArgs)
Declaration
protected virtual Task HandleIncomingMessage(IModel channel, BasicDeliverEventArgs basicDeliverEventArgs)
Parameters
Type |
Name |
Description |
IModel |
channel |
|
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(Object, EventArgs)
Declaration
protected virtual void Timer_Elapsed(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
EventArgs |
e |
|
TryCreateChannel()
Declaration
protected virtual void TryCreateChannel()
TrySendQueueBindCommands()
Declaration
protected virtual void TrySendQueueBindCommands()
TrySendQueueBindCommandsAsync()
Declaration
protected virtual Task TrySendQueueBindCommandsAsync()
Returns
UnbindAsync(String)
Declaration
public virtual Task UnbindAsync(string routingKey)
Parameters
Type |
Name |
Description |
System.String |
routingKey |
|
Returns
Implements
ITransientDependency
IDisposable
Extension Methods