Interface IContext
public interface IContext
Methods
Accept()
Accept the message (AMQP 1.0 accepted
outcome).
This means the message has been processed and the broker can delete it.
void Accept()
Batch()
Create a batch context to accumulate message contexts and settle them at once. The message context the batch context is created from is not added to the batch context. @return the created batch context
IBatchContext Batch()
Returns
Discard()
Discard the message (AMQP 1.0 rejected
outcome).
This means the message cannot be processed because it is invalid, the broker can drop it or dead-letter it if it is configured.
void Discard()
Discard(Dictionary<string, object>)
Discard the message with annotations to combine with the existing message annotations.
This means the message cannot be processed because it is invalid, the broker can drop it or dead-letter it if it is configured.
Application-specific annotation keys must start with the x-opt-
prefix.
Annotation keys that the broker understands start with x-
, but not with
x-opt-
. This maps to the AMQP 1.0 modified{delivery-failed = false,
undeliverable-here = false}
outcome.
The annotations can be used only with Quorum queues, see
AMQP 1.0 modified
outcome.
void Discard(Dictionary<string, object> annotations)
Parameters
annotations
Dictionary<string, object>
Requeue()
Requeue the message (AMQP 1.0
released
outcome).
This means the message has not been processed and the broker can requeue it and deliver it to the same or a different consumer.
void Requeue()
Requeue(Dictionary<string, object>)
Requeue the message with annotations to combine with the existing message annotations.
This means the message has not been processed and the broker can requeue it and deliver it to the same or a different consumer.
Application-specific annotation keys must start with the x-opt-
prefix.
Annotation keys that the broker understands start with x-
, but not with
x-opt-
. This maps to the AMQP 1.0 modified{delivery-failed = false,
undeliverable-here = false}
outcome.
The annotations can be used only with Quorum queues, see
AMQP 1.0 modified
outcome.
void Requeue(Dictionary<string, object> annotations)
Parameters
annotations
Dictionary<string, object>