Class RabbitMqMessageConsumer
Inheritance
object
RabbitMqMessageConsumer
Implements
System.IDisposable
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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
| Type |
Description |
| System.Collections.Concurrent.ConcurrentBag<T><System.Func<T1, T2, TResult><RabbitMQ.Client.IModel, RabbitMQ.Client.Events.BasicDeliverEventArgs, System.Threading.Tasks.Task>> |
|
Channel
Declaration
protected IModel Channel { get; }
Property Value
| Type |
Description |
| RabbitMQ.Client.IModel |
|
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
| Type |
Description |
| System.Threading.Tasks.Task |
|
Dispose()
Declaration
public virtual void Dispose()
DisposeChannel()
Declaration
protected virtual void DisposeChannel()
DisposeChannelAsync()
Declaration
protected virtual Task DisposeChannelAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
HandleIncomingMessageAsync(object, BasicDeliverEventArgs)
Declaration
protected virtual Task HandleIncomingMessageAsync(object sender, BasicDeliverEventArgs basicDeliverEventArgs)
Parameters
| Type |
Name |
Description |
| object |
sender |
|
| RabbitMQ.Client.Events.BasicDeliverEventArgs |
basicDeliverEventArgs |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
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 |
| System.Func<T1, T2, TResult><RabbitMQ.Client.IModel, RabbitMQ.Client.Events.BasicDeliverEventArgs, System.Threading.Tasks.Task> |
callback |
|
Timer_Elapsed(AbpAsyncTimer)
Declaration
protected virtual Task Timer_Elapsed(AbpAsyncTimer timer)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
TryCreateChannelAsync()
Declaration
protected virtual Task TryCreateChannelAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
TrySendQueueBindCommandsAsync()
Declaration
protected virtual Task TrySendQueueBindCommandsAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
UnbindAsync(string)
Declaration
public virtual Task UnbindAsync(string routingKey)
Parameters
| Type |
Name |
Description |
| string |
routingKey |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Implements
System.IDisposable
Extension Methods