Table of Contents

Interface IContext

Namespace
RabbitMQ.AMQP.Client
Assembly
RabbitMQ.AMQP.Client.dll
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()

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.

Message annotations to combine with existing ones.
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.

Message annotations to combine with existing ones.
void Requeue(Dictionary<string, object> annotations)

Parameters

annotations Dictionary<string, object>