Package io.vertx.mutiny.rabbitmq
Class RabbitMQConsumer
- java.lang.Object
-
- io.vertx.mutiny.rabbitmq.RabbitMQConsumer
-
- All Implemented Interfaces:
ReadStream<RabbitMQMessage>,StreamBase
public class RabbitMQConsumer extends Object implements ReadStream<RabbitMQMessage>
A stream of messages from a rabbitmq queue. NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.smallrye.mutiny.vertx.TypeArg<RabbitMQConsumer>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description RabbitMQConsumer(io.vertx.rabbitmq.RabbitMQConsumer delegate)RabbitMQConsumer(Object delegate)
-
Method Summary
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.smallrye.mutiny.vertx.TypeArg<RabbitMQConsumer> __TYPE_ARG
-
-
Constructor Detail
-
RabbitMQConsumer
public RabbitMQConsumer(io.vertx.rabbitmq.RabbitMQConsumer delegate)
-
RabbitMQConsumer
public RabbitMQConsumer(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.rabbitmq.RabbitMQConsumer getDelegate()
- Specified by:
getDelegatein interfaceReadStream<RabbitMQMessage>- Specified by:
getDelegatein interfaceStreamBase
-
pipe
public Pipe<RabbitMQMessage> pipe()
- Specified by:
pipein interfaceReadStream<RabbitMQMessage>
-
pipeTo
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(WriteStream<RabbitMQMessage> dst)
- Specified by:
pipeToin interfaceReadStream<RabbitMQMessage>
-
pipeToAndAwait
public Void pipeToAndAwait(WriteStream<RabbitMQMessage> dst)
- Specified by:
pipeToAndAwaitin interfaceReadStream<RabbitMQMessage>
-
pipeToAndForget
public void pipeToAndForget(WriteStream<RabbitMQMessage> dst)
- Specified by:
pipeToAndForgetin interfaceReadStream<RabbitMQMessage>
-
exceptionHandler
public RabbitMQConsumer exceptionHandler(Consumer<Throwable> exceptionHandler)
- Specified by:
exceptionHandlerin interfaceReadStream<RabbitMQMessage>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
exceptionHandler- the exception handler- Returns:
-
handler
public RabbitMQConsumer handler(Consumer<RabbitMQMessage> messageArrived)
- Specified by:
handlerin interfaceReadStream<RabbitMQMessage>- Parameters:
messageArrived-- Returns:
-
pause
public RabbitMQConsumer pause()
- Specified by:
pausein interfaceReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
resume
public RabbitMQConsumer resume()
- Specified by:
resumein interfaceReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
public RabbitMQConsumer endHandler(Runnable endHandler)
- Specified by:
endHandlerin interfaceReadStream<RabbitMQMessage>- Parameters:
endHandler-- Returns:
-
queueName
public String queueName()
- Returns:
- the name of the queue
-
setQueueName
public RabbitMQConsumer setQueueName(String name)
- Parameters:
name- the name of the queue- Returns:
- a reference to this, so the API can be used fluently
-
consumerTag
public String consumerTag()
- Returns:
- a consumer tag
-
cancel
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> cancel()
Stop message consumption from a queue.The operation is asynchronous. When consumption is stopped, you can also be notified via
endHandler(java.lang.Runnable)Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
cancelAndAwait
public Void cancelAndAwait()
Blocking variant ofcancel().This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
cancelAndForget
public void cancelAndForget()
-
isCancelled
public boolean isCancelled()
- Returns:
trueif cancel() has been called.
-
isPaused
public boolean isPaused()
- Returns:
- is the stream paused?
-
fetch
public RabbitMQConsumer fetch(long amount)
- Specified by:
fetchin interfaceReadStream<RabbitMQMessage>- Parameters:
amount-- Returns:
- a reference to this, so the API can be used fluently
-
toMulti
@CheckReturnValue public io.smallrye.mutiny.Multi<RabbitMQMessage> toMulti()
- Specified by:
toMultiin interfaceReadStream<RabbitMQMessage>
-
toBlockingIterable
public Iterable<RabbitMQMessage> toBlockingIterable()
-
toBlockingStream
public Stream<RabbitMQMessage> toBlockingStream()
-
newInstance
public static RabbitMQConsumer newInstance(io.vertx.rabbitmq.RabbitMQConsumer arg)
-
-