Package com.rabbitmq.client.amqp
Interface Consumer.BatchContext
- All Superinterfaces:
Consumer.Context
- Enclosing interface:
Consumer
Context to accumulate message contexts and settle them at once.
A Consumer.BatchContext
is also a Consumer.Context
: the same methods are available to settle
the messages.
Only "simple" (not batch) message contexts can be added to a batch context. Calling
on a batch context returns the instance itself.invalid reference
Context#batch()
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Consumer.Context context) Add a message context to the batch context.int
size()
Get the current number of message contexts in the batch context.
-
Method Details
-
add
Add a message context to the batch context.- Parameters:
context
- the message context to add
-
size
int size()Get the current number of message contexts in the batch context.- Returns:
- current number of message contexts in the batch
-