Class RabbitTemplate.DefaultTemplateConsumer
protected class RabbitTemplate.DefaultTemplateConsumer : RabbitTemplate.AbstractTemplateConsumer, IBasicConsumer
- Inheritance
-
DefaultBasicConsumerRabbitTemplate.DefaultTemplateConsumer
- Implements
-
IBasicConsumer
- Inherited Members
-
DefaultBasicConsumer.m_eventLockDefaultBasicConsumer.m_consumerCancelledDefaultBasicConsumer.OnCancel()DefaultBasicConsumer.ConsumerTagDefaultBasicConsumer.IsRunningDefaultBasicConsumer.ShutdownReasonDefaultBasicConsumer.ModelDefaultBasicConsumer.ConsumerCancelled
Constructors
DefaultTemplateConsumer(IModel, CountdownEvent, TaskCompletionSource<Delivery>, string, CancellationToken)
public DefaultTemplateConsumer(IModel channel, CountdownEvent latch, TaskCompletionSource<Delivery> completionSource, string queueName, CancellationToken cancelationToken)
Parameters
channelIModellatchCountdownEventcompletionSourceTaskCompletionSource<Delivery>queueNamestringcancelationTokenCancellationToken
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
consumerTagstringConsumer tag this consumer is registered.
HandleBasicConsumeOk(string)
Called upon successful registration of the consumer with the broker.
public override void HandleBasicConsumeOk(string consumerTag)
Parameters
consumerTagstringConsumer 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
consumerTagstringdeliveryTagulongredeliveredboolexchangestringroutingKeystringpropertiesIBasicPropertiesbodybyte[]
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.
HandleModelShutdown(object, ShutdownEventArgs)
Called when the model shuts down.
public override void HandleModelShutdown(object model, ShutdownEventArgs reason)
Parameters
modelobjectCommon AMQP model.
reasonShutdownEventArgsInformation about the reason why a particular model, session, or connection was destroyed.