public class RabbitMQConsumer extends Object implements ReadStream<RabbitMQMessage>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<RabbitMQConsumer> |
__TYPE_ARG |
Constructor and Description |
---|
RabbitMQConsumer(Object delegate) |
RabbitMQConsumer(RabbitMQConsumer delegate) |
Modifier and Type | Method and Description |
---|---|
Completable |
cancel()
Stop message consumption from a queue.
|
String |
consumerTag() |
RabbitMQConsumer |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
boolean |
equals(Object o) |
RabbitMQConsumer |
exceptionHandler(Handler<Throwable> exceptionHandler)
Set an exception handler on the read stream.
|
RabbitMQConsumer |
fetch(long amount)
Fetch the specified
amount of elements. |
RabbitMQConsumer |
getDelegate() |
RabbitMQConsumer |
handler(Handler<RabbitMQMessage> messageArrived)
Set a message handler.
|
int |
hashCode() |
boolean |
isCancelled()
Return
true if cancel() has been called. |
boolean |
isPaused() |
static RabbitMQConsumer |
newInstance(RabbitMQConsumer arg) |
RabbitMQConsumer |
pause()
Pause the stream of incoming messages from queue.
|
Pipe<RabbitMQMessage> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
Completable |
pipeTo(WriteStream<RabbitMQMessage> dst)
Pipe this
ReadStream to the WriteStream . |
String |
queueName() |
RabbitMQConsumer |
resume()
Resume reading from a queue.
|
Completable |
rxCancel()
Stop message consumption from a queue.
|
Completable |
rxPipeTo(WriteStream<RabbitMQMessage> dst)
Pipe this
ReadStream to the WriteStream . |
RabbitMQConsumer |
setQueueName(String name)
Set the name of the queue.
|
Flowable<RabbitMQMessage> |
toFlowable() |
Observable<RabbitMQMessage> |
toObservable() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
newInstance
public static final io.vertx.lang.rx.TypeArg<RabbitMQConsumer> __TYPE_ARG
public RabbitMQConsumer(RabbitMQConsumer delegate)
public RabbitMQConsumer(Object delegate)
public RabbitMQConsumer getDelegate()
getDelegate
in interface ReadStream<RabbitMQMessage>
getDelegate
in interface StreamBase
public Observable<RabbitMQMessage> toObservable()
toObservable
in interface ReadStream<RabbitMQMessage>
public Flowable<RabbitMQMessage> toFlowable()
toFlowable
in interface ReadStream<RabbitMQMessage>
public Pipe<RabbitMQMessage> pipe()
WriteStream
.pipe
in interface ReadStream<RabbitMQMessage>
public Completable pipeTo(WriteStream<RabbitMQMessage> dst)
ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
pipeTo
in interface ReadStream<RabbitMQMessage>
dst
- the destination write streampublic Completable rxPipeTo(WriteStream<RabbitMQMessage> dst)
ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
rxPipeTo
in interface ReadStream<RabbitMQMessage>
dst
- the destination write streampublic RabbitMQConsumer exceptionHandler(Handler<Throwable> exceptionHandler)
exceptionHandler
in interface ReadStream<RabbitMQMessage>
exceptionHandler
in interface StreamBase
exceptionHandler
- the exception handlerpublic RabbitMQConsumer handler(Handler<RabbitMQMessage> messageArrived)
handler
in interface ReadStream<RabbitMQMessage>
messageArrived
- public 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 , then incoming messages will be discarded.
pause
in interface ReadStream<RabbitMQMessage>
public RabbitMQConsumer resume()
resume
in interface ReadStream<RabbitMQMessage>
public RabbitMQConsumer endHandler(Handler<Void> endHandler)
endHandler
in interface ReadStream<RabbitMQMessage>
endHandler
- public String queueName()
public RabbitMQConsumer setQueueName(String name)
name
- the name of the queuepublic String consumerTag()
public Completable cancel()
The operation is asynchronous. When consumption is stopped, you can also be notified via endHandler(io.vertx.core.Handler<java.lang.Void>)
public Completable rxCancel()
The operation is asynchronous. When consumption is stopped, you can also be notified via endHandler(io.vertx.core.Handler<java.lang.Void>)
public boolean isCancelled()
true
if cancel() has been called.true
if cancel() has been called.public boolean isPaused()
public RabbitMQConsumer fetch(long amount)
amount
of elements. If the ReadStream
has been paused, reading will
recommence with the specified amount
of items, otherwise the specified amount
will
be added to the current stream demand.fetch
in interface ReadStream<RabbitMQMessage>
amount
- public static RabbitMQConsumer newInstance(RabbitMQConsumer arg)
Copyright © 2022 Eclipse. All rights reserved.