C# Class Burrow.Subscription

A wrapper hold reference to RabbitMQ.Client IModel object.

From here you can ack/nack a message or cancel the consumer

ファイルを表示 Open project: vanthoainguyen/Burrow.NET

Public Methods

Method Description
Ack ( IEnumerable deliveryTags ) : void

Ack all messages provided in the list

Ack ( ulong deliveryTag ) : void

Ack a message by its delivery tag

AckAllOutstandingMessages ( ) : void

Beware of using this method. It acks all unacknowledged messages

AckAllUpTo ( ulong deliveryTag ) : void

Ack all messages that have delivery tag less than or equal provided delivery tag

Cancel ( ) : void

Cancel subscription

Nack ( IEnumerable deliveryTags, bool requeue ) : void

Nack all messages privided by delivery tags in the list

Nack ( ulong deliveryTag, bool requeue ) : void

Nack a messages by it's delivery tag

NackAllOutstandingMessages ( bool requeue ) : void

Beware of using this method. It nacks all unacknowledged messages

NackAllUpTo ( ulong deliveryTag, bool requeue ) : void

Nack all messages that have delivery tags less than or equal provided delivery tag

SetChannel ( IModel channel ) : void

Set the IModel (aka channel)

Protected Methods

Method Description
Subscription ( ) : System
Subscription ( IModel channel ) : System

Private Methods

Method Description
CanAckNackAll ( List outstandingList, List list, ulong maxTag ) : bool
TryAck ( IModel channel, ulong deliveryTag, bool multiple, IRabbitWatcher watcher = null ) : void
TryAckOrNack ( string consumerTag, bool ack, IModel channel, ulong deliveryTag, bool multiple, bool requeue, IRabbitWatcher watcher = null ) : void
TryCancel ( Action action, IModel channel, IRabbitWatcher watcher ) : void
TryNack ( IModel channel, ulong deliveryTag, bool multiple, bool requeue, IRabbitWatcher watcher = null ) : void

Method Details

Ack() public method

Ack all messages provided in the list
public Ack ( IEnumerable deliveryTags ) : void
deliveryTags IEnumerable
return void

Ack() public method

Ack a message by its delivery tag
public Ack ( ulong deliveryTag ) : void
deliveryTag ulong
return void

AckAllOutstandingMessages() public method

Beware of using this method. It acks all unacknowledged messages
public AckAllOutstandingMessages ( ) : void
return void

AckAllUpTo() public method

Ack all messages that have delivery tag less than or equal provided delivery tag
public AckAllUpTo ( ulong deliveryTag ) : void
deliveryTag ulong
return void

Cancel() public method

Cancel subscription
public Cancel ( ) : void
return void

Nack() public method

Nack all messages privided by delivery tags in the list
public Nack ( IEnumerable deliveryTags, bool requeue ) : void
deliveryTags IEnumerable
requeue bool
return void

Nack() public method

Nack a messages by it's delivery tag
public Nack ( ulong deliveryTag, bool requeue ) : void
deliveryTag ulong
requeue bool
return void

NackAllOutstandingMessages() public method

Beware of using this method. It nacks all unacknowledged messages
public NackAllOutstandingMessages ( bool requeue ) : void
requeue bool
return void

NackAllUpTo() public method

Nack all messages that have delivery tags less than or equal provided delivery tag
public NackAllUpTo ( ulong deliveryTag, bool requeue ) : void
deliveryTag ulong
requeue bool
return void

SetChannel() public method

Set the IModel (aka channel)
public SetChannel ( IModel channel ) : void
channel IModel
return void

Subscription() protected method

protected Subscription ( ) : System
return System

Subscription() protected method

protected Subscription ( IModel channel ) : System
channel IModel
return System