Class EventingBasicConsumer
Experimental class exposing an IBasicConsumer's methods as separate events.
Implements
Inherited Members
Namespace: RabbitMQ.Client.Events
Assembly: RabbitMQ.Client.dll
Syntax
public class EventingBasicConsumer : DefaultBasicConsumer, IBasicConsumer
Constructors
| Edit this page View SourceEventingBasicConsumer(IModel)
Constructor which sets the Model property to the given value.
Declaration
public EventingBasicConsumer(IModel model)
Parameters
Type | Name | Description |
---|---|---|
IModel | model |
Methods
| Edit this page View SourceHandleBasicCancelOk(string)
Fires when the server confirms successful consumer cancelation.
Declaration
public override void HandleBasicCancelOk(string consumerTag)
Parameters
Type | Name | Description |
---|---|---|
string | consumerTag |
Overrides
| Edit this page View SourceHandleBasicConsumeOk(string)
Fires when the server confirms successful consumer cancelation.
Declaration
public override void HandleBasicConsumeOk(string consumerTag)
Parameters
Type | Name | Description |
---|---|---|
string | consumerTag |
Overrides
| Edit this page View SourceHandleBasicDeliver(string, ulong, bool, string, string, IBasicProperties, ReadOnlyMemory<byte>)
Invoked when a delivery arrives for the consumer.
Declaration
public override void 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 |
Overrides
Remarks
Handlers must copy or fully use delivery body before returning. Accessing the body at a later point is unsafe as its memory can be already released.
HandleModelShutdown(object, ShutdownEventArgs)
Fires the Shutdown event.
Declaration
public override void HandleModelShutdown(object model, ShutdownEventArgs reason)
Parameters
Type | Name | Description |
---|---|---|
object | model | |
ShutdownEventArgs | reason |
Overrides
Events
| Edit this page View SourceReceived
Event fired when a delivery arrives for the consumer.
Declaration
public event EventHandler<BasicDeliverEventArgs> Received
Event Type
Type | Description |
---|---|
EventHandler<BasicDeliverEventArgs> |
Remarks
Handlers must copy or fully use delivery body before returning. Accessing the body at a later point is unsafe as its memory can be already released.
Registered
Fires when the server confirms successful consumer cancelation.
Declaration
public event EventHandler<ConsumerEventArgs> Registered
Event Type
Type | Description |
---|---|
EventHandler<ConsumerEventArgs> |
Shutdown
Fires on model (channel) shutdown, both client and server initiated.
Declaration
public event EventHandler<ShutdownEventArgs> Shutdown
Event Type
Type | Description |
---|---|
EventHandler<ShutdownEventArgs> |
Unregistered
Fires when the server confirms successful consumer cancelation.
Declaration
public event EventHandler<ConsumerEventArgs> Unregistered
Event Type
Type | Description |
---|---|
EventHandler<ConsumerEventArgs> |