Interface Consumer.Context
- Enclosing interface:
Consumer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept()
Accept the message (AMQP 1.0accepted
outcome).void
discard()
Discard the message (AMQP 1.0rejected
outcome).void
Discard the message with annotations to combine with the existing message annotations.void
requeue()
Requeue the message (AMQP 1.0released
outcome).void
Requeue the message with annotations to combine with the existing message annotations.
-
Method Details
-
accept
void accept()Accept the message (AMQP 1.0accepted
outcome).This means the message has been processed and the broker can delete it.
-
discard
void discard()Discard the message (AMQP 1.0rejected
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.
-
discard
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.
Annotation keys must start with the
x-opt-
prefix.This maps to the AMQP 1.0
modified{delivery-failed = true, undeliverable-here = true}
outcome.- Parameters:
annotations
- message annotations to combine with existing ones- See Also:
-
requeue
void requeue()Requeue the message (AMQP 1.0released
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.
-
requeue
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.
Annotation keys must start with the
x-opt-
prefix.This maps to the AMQP 1.0
modified{delivery-failed = false, undeliverable-here = false}
outcome.- Parameters:
annotations
- message annotations to combine with existing ones- See Also:
-