public interface RabbitMQConsumer extends ReadStream<RabbitMQMessage>
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Stop message consumption from a queue.
|
void |
cancel(Handler<AsyncResult<Void>> cancelResult)
Stop message consumption from a queue.
|
String |
consumerTag() |
RabbitMQConsumer |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
RabbitMQConsumer |
exceptionHandler(Handler<Throwable> exceptionHandler)
Set an exception handler on the read stream.
|
RabbitMQConsumer |
handler(Handler<RabbitMQMessage> messageArrived)
Set a message handler.
|
boolean |
isPaused() |
RabbitMQConsumer |
pause()
Pause the stream of incoming messages from queue.
|
RabbitMQConsumer |
resume()
Resume reading from a queue.
|
fetch, pipe, pipeTo, pipeTo
RabbitMQConsumer exceptionHandler(Handler<Throwable> exceptionHandler)
exceptionHandler
in interface ReadStream<RabbitMQMessage>
exceptionHandler
in interface StreamBase
exceptionHandler
- the exception handlerRabbitMQConsumer handler(Handler<RabbitMQMessage> messageArrived)
handler
in interface ReadStream<RabbitMQMessage>
RabbitMQConsumer pause()
The messages will continue to arrive, but they will be stored in a internal queue.
If the queue size would exceed the limit provided by RabbitMQConsumer#size(int)
, then incoming messages will be discarded.
pause
in interface ReadStream<RabbitMQMessage>
RabbitMQConsumer resume()
resume
in interface ReadStream<RabbitMQMessage>
RabbitMQConsumer endHandler(Handler<Void> endHandler)
endHandler
in interface ReadStream<RabbitMQMessage>
String consumerTag()
void cancel()
The operation is asynchronous. When consumption will be stopped, you can by notified via endHandler(Handler)
void cancel(Handler<AsyncResult<Void>> cancelResult)
The operation is asynchronous. When consumption will be stopped, you can by notified via endHandler(Handler)
cancelResult
- contains information about operation status: success/fail.boolean isPaused()
Copyright © 2023 Eclipse. All rights reserved.