Interface IAsyncBasicConsumer
Namespace: RabbitMQ.Client
Assembly: RabbitMQ.Client.dll
Syntax
public interface IAsyncBasicConsumer
Properties
| Edit this page View SourceModel
Retrieve the IModel this consumer is associated with, for use in acknowledging received messages, for instance.
Declaration
IModel Model { get; }
Property Value
Type | Description |
---|---|
IModel |
Methods
| Edit this page View SourceHandleBasicCancel(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
Declaration
Task HandleBasicCancel(string consumerTag)
Parameters
Type | Name | Description |
---|---|---|
string | consumerTag | Consumer tag this consumer is registered. |
Returns
Type | Description |
---|---|
Task |
HandleBasicCancelOk(string)
Called upon successful deregistration of the consumer from the broker.
Declaration
Task HandleBasicCancelOk(string consumerTag)
Parameters
Type | Name | Description |
---|---|---|
string | consumerTag | Consumer tag this consumer is registered. |
Returns
Type | Description |
---|---|
Task |
HandleBasicConsumeOk(string)
Called upon successful registration of the consumer with the broker.
Declaration
Task HandleBasicConsumeOk(string consumerTag)
Parameters
Type | Name | Description |
---|---|---|
string | consumerTag | Consumer tag this consumer is registered. |
Returns
Type | Description |
---|---|
Task |
HandleBasicDeliver(string, ulong, bool, string, string, IBasicProperties, ReadOnlyMemory<byte>)
Called each time a message arrives for this consumer.
Declaration
Task HandleBasicDeliver(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IBasicProperties properties, ReadOnlyMemory<byte> body)
Parameters
Type | Name | Description |
---|---|---|
string | consumerTag | |
ulong | deliveryTag | |
bool | redelivered | |
string | exchange | |
string | routingKey | |
IBasicProperties | properties | |
ReadOnlyMemory<byte> | body |
Returns
Type | Description |
---|---|
Task |
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.
Declaration
Task HandleModelShutdown(object model, ShutdownEventArgs reason)
Parameters
Type | Name | Description |
---|---|---|
object | model | Common AMQP model. |
ShutdownEventArgs | reason | Information about the reason why a particular model, session, or connection was destroyed. |
Returns
Type | Description |
---|---|
Task |
Events
| Edit this page View SourceConsumerCancelled
Signalled when the consumer gets cancelled.
Declaration
event AsyncEventHandler<ConsumerEventArgs> ConsumerCancelled
Event Type
Type | Description |
---|---|
AsyncEventHandler<ConsumerEventArgs> |