Package com.rabbitmq.client.amqp
Interface Consumer
- All Superinterfaces:
AutoCloseable
,Resource
API to consume messages from a RabbitMQ queue.
Instances are configured and created with a ConsumerBuilder
.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Context for message processing.static interface
Contract to process a message.Nested classes/interfaces inherited from interface com.rabbitmq.client.amqp.Resource
Resource.State, Resource.StateListener
-
Method Summary
-
Method Details
-
pause
void pause()Pause the consumer to stop receiving messages. -
unsettledMessageCount
long unsettledMessageCount()Return the number of unsettled messages.- Returns:
- unsettled message count
-
unpause
void unpause()Request to receive messages again. -
close
void close()Close the consumer with its resources.- Specified by:
close
in interfaceAutoCloseable
-