Show / Hide Table of Contents

Class RabbitMqMessageConsumer

Inheritance
System.Object
RabbitMqMessageConsumer
Implements
IRabbitMqMessageConsumer
ITransientDependency
IDisposable
Namespace: Volo.Abp.RabbitMQ
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
Type Name Description
IConnectionPool connectionPool
AbpTimer 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
System.Object

ConnectionName

Declaration
protected string ConnectionName { get; }
Property Value
Type Description
System.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 AbpTimer Timer { get; }
Property Value
Type Description
AbpTimer

Methods

BindAsync(String)

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

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
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
System.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(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
Type Description
Task

UnbindAsync(String)

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

Implements

IRabbitMqMessageConsumer
ITransientDependency
IDisposable

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft