Show / Hide Table of Contents

Class RabbitMqMessageConsumer

Inheritance
object
RabbitMqMessageConsumer
Implements
IRabbitMqMessageConsumer
ITransientDependency
IDisposable
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.RabbitMQ
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
Type Name Description
IConnectionPool connectionPool
AbpAsyncTimer timer
IExceptionNotifier exceptionNotifier

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
Type Description
IModel

ChannelSendSyncLock

Declaration
protected object ChannelSendSyncLock { get; }
Property Value
Type Description
object

ConnectionName

Declaration
protected string? ConnectionName { get; }
Property Value
Type Description
string

ConnectionPool

Declaration
protected IConnectionPool ConnectionPool { get; }
Property Value
Type Description
IConnectionPool

ExceptionNotifier

Declaration
protected IExceptionNotifier ExceptionNotifier { get; }
Property Value
Type Description
IExceptionNotifier

Exchange

Declaration
protected ExchangeDeclareConfiguration Exchange { get; }
Property Value
Type Description
ExchangeDeclareConfiguration

Logger

Declaration
public ILogger<RabbitMqMessageConsumer> Logger { get; set; }
Property Value
Type Description
ILogger<RabbitMqMessageConsumer>

Queue

Declaration
protected QueueDeclareConfiguration Queue { get; }
Property Value
Type Description
QueueDeclareConfiguration

QueueBindCommands

Declaration
protected ConcurrentQueue<RabbitMqMessageConsumer.QueueBindCommand> QueueBindCommands { get; }
Property Value
Type Description
ConcurrentQueue<RabbitMqMessageConsumer.QueueBindCommand>

Timer

Declaration
protected AbpAsyncTimer Timer { get; }
Property Value
Type Description
AbpAsyncTimer

Methods

BindAsync(string)

Declaration
public virtual Task BindAsync(string routingKey)
Parameters
Type Name Description
string routingKey
Returns
Type Description
Task

Dispose()

Declaration
public virtual void Dispose()

DisposeChannel()

Declaration
protected virtual void DisposeChannel()

DisposeChannelAsync()

Declaration
protected virtual Task DisposeChannelAsync()
Returns
Type Description
Task

HandleIncomingMessageAsync(object, BasicDeliverEventArgs)

Declaration
protected virtual Task HandleIncomingMessageAsync(object sender, BasicDeliverEventArgs basicDeliverEventArgs)
Parameters
Type Name Description
object sender
BasicDeliverEventArgs basicDeliverEventArgs
Returns
Type Description
Task

Initialize(ExchangeDeclareConfiguration, QueueDeclareConfiguration, string?)

Declaration
public void Initialize(ExchangeDeclareConfiguration exchange, QueueDeclareConfiguration queue, string? connectionName = null)
Parameters
Type Name Description
ExchangeDeclareConfiguration exchange
QueueDeclareConfiguration queue
string connectionName

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
Type Name Description
AbpAsyncTimer timer
Returns
Type Description
Task

TryCreateChannelAsync()

Declaration
protected virtual Task TryCreateChannelAsync()
Returns
Type Description
Task

TrySendQueueBindCommandsAsync()

Declaration
protected virtual Task TrySendQueueBindCommandsAsync()
Returns
Type Description
Task

UnbindAsync(string)

Declaration
public virtual Task UnbindAsync(string routingKey)
Parameters
Type Name Description
string routingKey
Returns
Type Description
Task

Implements

IRabbitMqMessageConsumer
ITransientDependency
IDisposable

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform