Class DirectMessageListenerContainer.SimpleConsumer
protected class DirectMessageListenerContainer.SimpleConsumer : DefaultBasicConsumer, IBasicConsumer
- Inheritance
-
DefaultBasicConsumerDirectMessageListenerContainer.SimpleConsumer
- Implements
-
IBasicConsumer
- Inherited Members
-
DefaultBasicConsumer.m_eventLockDefaultBasicConsumer.m_consumerCancelledDefaultBasicConsumer.OnCancel()DefaultBasicConsumer.ConsumerTagDefaultBasicConsumer.IsRunningDefaultBasicConsumer.ShutdownReasonDefaultBasicConsumer.ModelDefaultBasicConsumer.ConsumerCancelled
Constructors
SimpleConsumer(DirectMessageListenerContainer, IConnection, IModel, string, ILogger)
public SimpleConsumer(DirectMessageListenerContainer container, IConnection connection, IModel channel, string queue, ILogger logger = null)
Parameters
container
DirectMessageListenerContainerconnection
IConnectionchannel
IModelqueue
stringlogger
ILogger
Properties
AckFailed
public bool AckFailed { get; }
Property Value
AckRequired
public bool AckRequired { get; }
Property Value
AckTimeout
public long AckTimeout { get; }
Property Value
Canceled
public bool Canceled { get; }
Property Value
ConnectionFactory
public IConnectionFactory ConnectionFactory { get; }
Property Value
Epoch
public int Epoch { get; }
Property Value
IsRabbitTxManager
public bool IsRabbitTxManager { get; }
Property Value
LastAck
public long LastAck { get; }
Property Value
LatestDeferredDeliveryTag
public ulong LatestDeferredDeliveryTag { get; }
Property Value
MessagesPerAck
public int MessagesPerAck { get; }
Property Value
PendingAcks
public int PendingAcks { get; }
Property Value
Queue
public string Queue { get; }
Property Value
TargetChanged
public bool TargetChanged { get; }
Property Value
TransactionAttribute
public ITransactionAttribute TransactionAttribute { get; }
Property Value
TransactionManager
public IPlatformTransactionManager TransactionManager { get; }
Property Value
TransactionTemplate
public TransactionTemplate TransactionTemplate { get; }
Property Value
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
stringConsumer 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
stringConsumer 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
stringConsumer 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
stringdeliveryTag
ulongredelivered
boolexchange
stringroutingKey
stringproperties
IBasicPropertiesbody
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
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.