Interface IAsyncBasicConsumer
public interface IAsyncBasicConsumer
Properties
Model
Retrieve the IModel this consumer is associated with, for use in acknowledging received messages, for instance.
IModel Model { 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
Task HandleBasicCancel(string consumerTag)
Parameters
consumerTag
stringConsumer tag this consumer is registered.
Returns
HandleBasicCancelOk(string)
Called upon successful deregistration of the consumer from the broker.
Task HandleBasicCancelOk(string consumerTag)
Parameters
consumerTag
stringConsumer tag this consumer is registered.
Returns
HandleBasicConsumeOk(string)
Called upon successful registration of the consumer with the broker.
Task HandleBasicConsumeOk(string consumerTag)
Parameters
consumerTag
stringConsumer tag this consumer is registered.
Returns
HandleBasicDeliver(string, ulong, bool, string, string, IBasicProperties, ReadOnlyMemory<byte>)
Called each time a message arrives for this consumer.
Task HandleBasicDeliver(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IBasicProperties properties, ReadOnlyMemory<byte> body)
Parameters
consumerTag
stringdeliveryTag
ulongredelivered
boolexchange
stringroutingKey
stringproperties
IBasicPropertiesbody
ReadOnlyMemory<byte>
Returns
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.
Task HandleModelShutdown(object model, ShutdownEventArgs reason)
Parameters
model
objectCommon AMQP model.
reason
ShutdownEventArgsInformation about the reason why a particular model, session, or connection was destroyed.
Returns
Events
ConsumerCancelled
Signalled when the consumer gets cancelled.
event AsyncEventHandler<ConsumerEventArgs> ConsumerCancelled