Package io.vertx.mutiny.rabbitmq
Class RabbitMQConsumer
- java.lang.Object
-
- io.vertx.mutiny.rabbitmq.RabbitMQConsumer
-
- All Implemented Interfaces:
io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>,io.vertx.mutiny.core.streams.StreamBase
public class RabbitMQConsumer extends Object implements io.vertx.mutiny.core.streams.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>cancel()Stop message consumption from a queue.VoidcancelAndAwait()Blocking variant ofcancel().voidcancelAndForget()Variant ofcancel()that ignores the result of the operation.StringconsumerTag()RabbitMQConsumerendHandler(Runnable endHandler)booleanequals(Object o)RabbitMQConsumerexceptionHandler(Consumer<Throwable> exceptionHandler)RabbitMQConsumerfetch(long amount)io.vertx.rabbitmq.RabbitMQConsumergetDelegate()RabbitMQConsumerhandler(Consumer<RabbitMQMessage> messageArrived)inthashCode()booleanisCancelled()booleanisPaused()static RabbitMQConsumernewInstance(io.vertx.rabbitmq.RabbitMQConsumer arg)RabbitMQConsumerpause()io.vertx.mutiny.core.streams.Pipe<RabbitMQMessage>pipe()io.smallrye.mutiny.Uni<Void>pipeTo(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)VoidpipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)voidpipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)StringqueueName()RabbitMQConsumerresume()RabbitMQConsumersetQueueName(String name)Iterable<RabbitMQMessage>toBlockingIterable()Stream<RabbitMQMessage>toBlockingStream()io.smallrye.mutiny.Multi<RabbitMQMessage>toMulti()StringtoString()
-
-
-
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 interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Specified by:
getDelegatein interfaceio.vertx.mutiny.core.streams.StreamBase
-
pipe
public io.vertx.mutiny.core.streams.Pipe<RabbitMQMessage> pipe()
- Specified by:
pipein interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
pipeTo
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)
- Specified by:
pipeToin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
pipeToAndAwait
public Void pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)
- Specified by:
pipeToAndAwaitin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
pipeToAndForget
public void pipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)
- Specified by:
pipeToAndForgetin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
exceptionHandler
public RabbitMQConsumer exceptionHandler(Consumer<Throwable> exceptionHandler)
- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.StreamBase- Parameters:
exceptionHandler- the exception handler- Returns:
-
handler
public RabbitMQConsumer handler(Consumer<RabbitMQMessage> messageArrived)
- Specified by:
handlerin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Parameters:
messageArrived-- Returns:
-
pause
public RabbitMQConsumer pause()
- Specified by:
pausein interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
resume
public RabbitMQConsumer resume()
- Specified by:
resumein interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
public RabbitMQConsumer endHandler(Runnable endHandler)
- Specified by:
endHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<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 interfaceio.vertx.mutiny.core.streams.ReadStream<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 interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
toBlockingIterable
public Iterable<RabbitMQMessage> toBlockingIterable()
-
toBlockingStream
public Stream<RabbitMQMessage> toBlockingStream()
-
newInstance
public static RabbitMQConsumer newInstance(io.vertx.rabbitmq.RabbitMQConsumer arg)
-
-