Table of Contents

Class DirectMessageListenerContainer.SimpleConsumer

Namespace
Steeltoe.Messaging.RabbitMQ.Listener
Assembly
Steeltoe.Messaging.RabbitMQ.dll
protected class DirectMessageListenerContainer.SimpleConsumer : DefaultBasicConsumer, IBasicConsumer
Inheritance
DefaultBasicConsumer
DirectMessageListenerContainer.SimpleConsumer
Implements
IBasicConsumer
Inherited Members
DefaultBasicConsumer.m_eventLock
DefaultBasicConsumer.m_consumerCancelled
DefaultBasicConsumer.OnCancel()
DefaultBasicConsumer.ConsumerTag
DefaultBasicConsumer.IsRunning
DefaultBasicConsumer.ShutdownReason
DefaultBasicConsumer.Model
DefaultBasicConsumer.ConsumerCancelled

Constructors

SimpleConsumer(DirectMessageListenerContainer, IConnection, IModel, string, ILogger)

public SimpleConsumer(DirectMessageListenerContainer container, IConnection connection, IModel channel, string queue, ILogger logger = null)

Parameters

container DirectMessageListenerContainer
connection IConnection
channel IModel
queue string
logger ILogger

Properties

AckFailed

public bool AckFailed { get; }

Property Value

bool

AckRequired

public bool AckRequired { get; }

Property Value

bool

AckTimeout

public long AckTimeout { get; }

Property Value

long

Canceled

public bool Canceled { get; }

Property Value

bool

ConnectionFactory

public IConnectionFactory ConnectionFactory { get; }

Property Value

IConnectionFactory

Epoch

public int Epoch { get; }

Property Value

int

IsRabbitTxManager

public bool IsRabbitTxManager { get; }

Property Value

bool

LastAck

public long LastAck { get; }

Property Value

long

LatestDeferredDeliveryTag

public ulong LatestDeferredDeliveryTag { get; }

Property Value

ulong

MessagesPerAck

public int MessagesPerAck { get; }

Property Value

int

PendingAcks

public int PendingAcks { get; }

Property Value

int

Queue

public string Queue { get; }

Property Value

string

TargetChanged

public bool TargetChanged { get; }

Property Value

bool

TransactionAttribute

public ITransactionAttribute TransactionAttribute { get; }

Property Value

ITransactionAttribute

TransactionManager

public IPlatformTransactionManager TransactionManager { get; }

Property Value

IPlatformTransactionManager

TransactionTemplate

public TransactionTemplate TransactionTemplate { get; }

Property Value

TransactionTemplate

Methods

HandleBasicCancel(string)

Called when the consumer is cancelled for reasons other than by a basicCancel: e.g. the queue has been deleted (either by this channel or by any other channel). See HandleBasicCancelOk(string) for notification of consumer cancellation due to basicCancel

public override void HandleBasicCancel(string consumerTag)

Parameters

consumerTag string

Consumer tag this consumer is registered.

HandleBasicCancelOk(string)

Called upon successful deregistration of the consumer from the broker.

public override void HandleBasicCancelOk(string consumerTag)

Parameters

consumerTag string

Consumer tag this consumer is registered.

HandleBasicConsumeOk(string)

Called upon successful registration of the consumer with the broker.

public override void HandleBasicConsumeOk(string consumerTag)

Parameters

consumerTag string

Consumer tag this consumer is registered.

HandleBasicDeliver(string, ulong, bool, string, string, IBasicProperties, byte[])

Called each time a message arrives for this consumer.

public override void HandleBasicDeliver(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IBasicProperties properties, byte[] body)

Parameters

consumerTag string
deliveryTag ulong
redelivered bool
exchange string
routingKey string
properties IBasicProperties
body byte[]

Remarks

Does nothing with the passed in information. Note that in particular, some delivered messages may require acknowledgement via BasicAck(ulong, bool). The implementation of this method in this class does NOT acknowledge such messages.

IncrementAndGetEpoch()

public int IncrementAndGetEpoch()

Returns

int

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.