Package io.vertx.mutiny.rabbitmq
Class RabbitMQConsumer
java.lang.Object
io.vertx.mutiny.rabbitmq.RabbitMQConsumer
- All Implemented Interfaces:
io.smallrye.mutiny.vertx.MutinyDelegate,io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>,io.vertx.mutiny.core.streams.StreamBase
public class RabbitMQConsumer
extends Object
implements io.smallrye.mutiny.vertx.MutinyDelegate, io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
A stream of messages from a rabbitmq queue.
NOTE: This class has been automatically generated from the
original non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRabbitMQConsumer(io.vertx.rabbitmq.RabbitMQConsumer delegate) RabbitMQConsumer(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void> cancel()Stop message consumption from a queue.Blocking variant ofcancel().voidVariant ofcancel()that ignores the result of the operation.endHandler(Runnable endHandler) booleanexceptionHandler(Consumer<Throwable> exceptionHandler) fetch(long amount) io.vertx.rabbitmq.RabbitMQConsumerhandler(Consumer<RabbitMQMessage> messageArrived) inthashCode()booleanbooleanisPaused()static RabbitMQConsumernewInstance(io.vertx.rabbitmq.RabbitMQConsumer arg) pause()io.vertx.mutiny.core.streams.Pipe<RabbitMQMessage> pipe()io.smallrye.mutiny.Uni<Void> pipeTo(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst) pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst) voidpipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst) resume()setQueueName(String name) io.smallrye.mutiny.Multi<RabbitMQMessage> toMulti()toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
RabbitMQConsumer
public RabbitMQConsumer(io.vertx.rabbitmq.RabbitMQConsumer delegate) -
RabbitMQConsumer
-
-
Method Details
-
getDelegate
public io.vertx.rabbitmq.RabbitMQConsumer getDelegate()- Specified by:
getDelegatein interfaceio.smallrye.mutiny.vertx.MutinyDelegate- Specified by:
getDelegatein interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Specified by:
getDelegatein interfaceio.vertx.mutiny.core.streams.StreamBase
-
toString
-
equals
-
hashCode
public int hashCode() -
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
- Specified by:
pipeToAndAwaitin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
pipeToAndForget
- Specified by:
pipeToAndForgetin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
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
- Specified by:
handlerin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Parameters:
messageArrived-- Returns:
-
pause
- Specified by:
pausein interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
resume
- Specified by:
resumein interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
- Specified by:
endHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>- Parameters:
endHandler-- Returns:
-
queueName
- Returns:
- the name of the queue
-
setQueueName
- Parameters:
name- the name of the queue- Returns:
- a reference to this, so the API can be used fluently
-
consumerTag
- Returns:
- a consumer tag
-
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
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
- 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
- Specified by:
toMultiin interfaceio.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-