Class RabbitMQConsumer
- All Implemented Interfaces:
MutinyDelegate,ReadStream<RabbitMQMessage>,StreamBase
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()pipe()io.smallrye.mutiny.Uni<Void>pipeTo(WriteStream<RabbitMQMessage> dst) Pipe thisReadStreamto theWriteStream.Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).voidVariant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.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 interfaceMutinyDelegate- Specified by:
getDelegatein interfaceReadStream<RabbitMQMessage>- Specified by:
getDelegatein interfaceStreamBase- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
pipe
- Specified by:
pipein interfaceReadStream<RabbitMQMessage>- Returns:
- a pipe
-
pipeTo
Description copied from interface:ReadStreamPipe thisReadStreamto theWriteStream.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
handlerwill be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeToin interfaceReadStream<RabbitMQMessage>- Parameters:
dst- the destination write stream- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
Description copied from interface:ReadStreamBlocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).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).
- Specified by:
pipeToAndAwaitin interfaceReadStream<RabbitMQMessage>- Parameters:
dst- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
Description copied from interface:ReadStreamVariant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.This method subscribes on the result of
ReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)but you don't need to compose it with other operations.- Specified by:
pipeToAndForgetin interfaceReadStream<RabbitMQMessage>- Parameters:
dst- the destination write stream
-
exceptionHandler
- Specified by:
exceptionHandlerin interfaceReadStream<RabbitMQMessage>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
exceptionHandler- the exception handler- Returns:
-
handler
- Specified by:
handlerin interfaceReadStream<RabbitMQMessage>- Parameters:
messageArrived-- Returns:
-
pause
- Specified by:
pausein interfaceReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
resume
- Specified by:
resumein interfaceReadStream<RabbitMQMessage>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
- Specified by:
endHandlerin interfaceReadStream<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 interfaceReadStream<RabbitMQMessage>- Parameters:
amount-- Returns:
- a reference to this, so the API can be used fluently
-
toMulti
- Specified by:
toMultiin interfaceReadStream<RabbitMQMessage>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-