Class EventingBasicConsumer
Experimental class exposing an IBasicConsumer's methods as separate events.
public class EventingBasicConsumer : DefaultBasicConsumer, IBasicConsumer
- Inheritance
-
EventingBasicConsumer
- Implements
- Inherited Members
Constructors
EventingBasicConsumer(IModel)
Constructor which sets the Model property to the given value.
public EventingBasicConsumer(IModel model)
Parameters
model
IModel
Methods
HandleBasicCancelOk(string)
Fires when the server confirms successful consumer cancelation.
public override void HandleBasicCancelOk(string consumerTag)
Parameters
consumerTag
string
HandleBasicConsumeOk(string)
Fires when the server confirms successful consumer cancelation.
public override void HandleBasicConsumeOk(string consumerTag)
Parameters
consumerTag
string
HandleBasicDeliver(string, ulong, bool, string, string, IBasicProperties, ReadOnlyMemory<byte>)
Invoked when a delivery arrives for the consumer.
public override void 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>
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.
public override void HandleModelShutdown(object model, ShutdownEventArgs reason)
Parameters
model
objectreason
ShutdownEventArgs
Events
Received
Event fired when a delivery arrives for the consumer.
public event EventHandler<BasicDeliverEventArgs> Received
Event Type
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.
public event EventHandler<ConsumerEventArgs> Registered
Event Type
Shutdown
Fires on model (channel) shutdown, both client and server initiated.
public event EventHandler<ShutdownEventArgs> Shutdown
Event Type
Unregistered
Fires when the server confirms successful consumer cancelation.
public event EventHandler<ConsumerEventArgs> Unregistered