C# Class Burrow.BurrowConsumer

Inheritance: RabbitMQ.Client.QueueingBasicConsumer, IDisposable
Exibir arquivo Open project: vanthoainguyen/Burrow.NET

Protected Properties

Property Type Description
_status ConsumerStatus
_watcher IRabbitWatcher

Public Methods

Method Description
BurrowConsumer ( IModel channel, IMessageHandler messageHandler, IRabbitWatcher watcher, bool autoAck, int batchSize ) : System

Initialize an object of BurrowConsumer

Dispose ( ) : void

Protected Methods

Method Description
BurrowConsumer ( IModel channel, IMessageHandler messageHandler, IRabbitWatcher watcher, bool autoAck, int batchSize, bool startThread ) : System

Initialize an object of BurrowConsumer

CloseQueue ( ) : void
Dequeue ( ) : RabbitMQ.Client.Events.BasicDeliverEventArgs
DoAck ( RabbitMQ.Client.Events.BasicDeliverEventArgs basicDeliverEventArgs, IBasicConsumer subscriptionInfo ) : void
StartConsumerThread ( string threadName ) : void
WhenChannelShutdown ( object sender, RabbitMQ.Client.ShutdownEventArgs reason ) : void

Private Methods

Method Description
HandleMessageDeliveryInSameThread ( RabbitMQ.Client.Events.BasicDeliverEventArgs basicDeliverEventArgs ) : void
HandleMessageDeliveryInSeperatedThread ( RabbitMQ.Client.Events.BasicDeliverEventArgs basicDeliverEventArgs ) : void
MessageHandlerHandlingComplete ( RabbitMQ.Client.Events.BasicDeliverEventArgs eventArgs ) : void
MessageInProgressCount ( ) : int
MessageWasNotHandled ( RabbitMQ.Client.Events.BasicDeliverEventArgs eventArgs ) : void
WaitAndHandleMessageDelivery ( Action handler ) : void

Method Details

BurrowConsumer() public method

Initialize an object of BurrowConsumer
public BurrowConsumer ( IModel channel, IMessageHandler messageHandler, IRabbitWatcher watcher, bool autoAck, int batchSize ) : System
channel IModel RabbitMQ.Client channel
messageHandler IMessageHandler An instance of message handler to handle the message from queue
watcher IRabbitWatcher
autoAck bool If set to true, the msg will be acked after processed
batchSize int
return System

BurrowConsumer() protected method

Initialize an object of BurrowConsumer
protected BurrowConsumer ( IModel channel, IMessageHandler messageHandler, IRabbitWatcher watcher, bool autoAck, int batchSize, bool startThread ) : System
channel IModel RabbitMQ.Client channel
messageHandler IMessageHandler An instance of message handler to handle the message from queue
watcher IRabbitWatcher
autoAck bool If set to true, the msg will be acked after processed
batchSize int
startThread bool Whether should start the consuming thread straight away
return System

CloseQueue() protected method

protected CloseQueue ( ) : void
return void

Dequeue() protected method

protected Dequeue ( ) : RabbitMQ.Client.Events.BasicDeliverEventArgs
return RabbitMQ.Client.Events.BasicDeliverEventArgs

Dispose() public method

public Dispose ( ) : void
return void

DoAck() protected method

protected DoAck ( RabbitMQ.Client.Events.BasicDeliverEventArgs basicDeliverEventArgs, IBasicConsumer subscriptionInfo ) : void
basicDeliverEventArgs RabbitMQ.Client.Events.BasicDeliverEventArgs
subscriptionInfo IBasicConsumer
return void

StartConsumerThread() protected method

protected StartConsumerThread ( string threadName ) : void
threadName string
return void

WhenChannelShutdown() protected method

protected WhenChannelShutdown ( object sender, RabbitMQ.Client.ShutdownEventArgs reason ) : void
sender object
reason RabbitMQ.Client.ShutdownEventArgs
return void

Property Details

_status protected_oe property

protected ConsumerStatus _status
return ConsumerStatus

_watcher protected_oe property

protected IRabbitWatcher _watcher
return IRabbitWatcher