Class RabbitMQClient
- java.lang.Object
-
- io.vertx.mutiny.rabbitmq.RabbitMQClient
-
public class RabbitMQClient extends Object
NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<RabbitMQClient>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description RabbitMQClient(io.vertx.rabbitmq.RabbitMQClient delegate)
RabbitMQClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<ReadStream<io.vertx.rabbitmq.RabbitMQConfirmation>>
addConfirmListener(int maxQueueSize)
Add a Confirm Listener to the channel.ReadStream<io.vertx.rabbitmq.RabbitMQConfirmation>
addConfirmListenerAndAwait(int maxQueueSize)
Blocking variant ofaddConfirmListener(int)
.void
addConfirmListenerAndForget(int maxQueueSize)
Variant ofaddConfirmListener(int)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
basicAck(long deliveryTag, boolean multiple)
Acknowledge one or several received messages.Void
basicAckAndAwait(long deliveryTag, boolean multiple)
Blocking variant ofbasicAck(long,boolean)
.void
basicAckAndForget(long deliveryTag, boolean multiple)
Variant ofbasicAck(long,boolean)
that ignores the result of the operation.io.smallrye.mutiny.Uni<RabbitMQConsumer>
basicConsumer(String queue)
Unlike the bare Vert.x variant, this method returns aUni
.io.smallrye.mutiny.Uni<RabbitMQConsumer>
basicConsumer(String queue, io.vertx.rabbitmq.QueueOptions options)
Create a consumer with the givenoptions
.RabbitMQConsumer
basicConsumerAndAwait(String queue)
Blocking variant ofbasicConsumer(String)
.RabbitMQConsumer
basicConsumerAndAwait(String queue, io.vertx.rabbitmq.QueueOptions options)
Blocking variant ofbasicConsumer(String,QueueOptions)
.void
basicConsumerAndForget(String queue)
Variant ofbasicConsumer(String)
that ignores the result of the operation.void
basicConsumerAndForget(String queue, io.vertx.rabbitmq.QueueOptions options)
Variant ofbasicConsumer(String,QueueOptions)
that ignores the result of the operation.io.smallrye.mutiny.Uni<RabbitMQMessage>
basicGet(String queue, boolean autoAck)
Retrieve a message from a queue using AMQP.Basic.GetRabbitMQMessage
basicGetAndAwait(String queue, boolean autoAck)
Blocking variant ofbasicGet(String,boolean)
.void
basicGetAndForget(String queue, boolean autoAck)
Variant ofbasicGet(String,boolean)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
basicNack(long deliveryTag, boolean multiple, boolean requeue)
Reject one or several received messages.Void
basicNackAndAwait(long deliveryTag, boolean multiple, boolean requeue)
Blocking variant ofbasicNack(long,boolean,boolean)
.void
basicNackAndForget(long deliveryTag, boolean multiple, boolean requeue)
Variant ofbasicNack(long,boolean,boolean)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
basicPublish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Publish a message.io.smallrye.mutiny.Uni<Void>
basicPublish(String exchange, String routingKey, Buffer body)
Publish a message.Void
basicPublishAndAwait(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Blocking variant ofbasicPublish(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer)
.Void
basicPublishAndAwait(String exchange, String routingKey, Buffer body)
Blocking variant ofbasicPublish(String,String,io.vertx.mutiny.core.buffer.Buffer)
.void
basicPublishAndForget(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Variant ofbasicPublish(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.void
basicPublishAndForget(String exchange, String routingKey, Buffer body)
Variant ofbasicPublish(String,String,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
basicPublishWithDeliveryTag(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Consumer<Long> deliveryTagHandler)
Publish a message.Void
basicPublishWithDeliveryTagAndAwait(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Consumer<Long> deliveryTagHandler)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#basicPublishWithDeliveryTag(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer,Consumer
.) void
basicPublishWithDeliveryTagAndForget(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Consumer<Long> deliveryTagHandler)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#basicPublishWithDeliveryTag(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer,Consumer
that ignores the result of the operation.) io.smallrye.mutiny.Uni<Void>
basicQos(int prefetchCount)
Request a specific prefetchCount "quality of service" settings for this channel.io.smallrye.mutiny.Uni<Void>
basicQos(int prefetchCount, boolean global)
Request a specific prefetchCount "quality of service" settings for this channel.io.smallrye.mutiny.Uni<Void>
basicQos(int prefetchSize, int prefetchCount, boolean global)
Request specific "quality of service" settings.Void
basicQosAndAwait(int prefetchCount)
Blocking variant ofbasicQos(int)
.Void
basicQosAndAwait(int prefetchCount, boolean global)
Blocking variant ofbasicQos(int,boolean)
.Void
basicQosAndAwait(int prefetchSize, int prefetchCount, boolean global)
Blocking variant ofbasicQos(int,int,boolean)
.void
basicQosAndForget(int prefetchCount)
Variant ofbasicQos(int)
that ignores the result of the operation.void
basicQosAndForget(int prefetchCount, boolean global)
Variant ofbasicQos(int,boolean)
that ignores the result of the operation.void
basicQosAndForget(int prefetchSize, int prefetchCount, boolean global)
Variant ofbasicQos(int,int,boolean)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
confirmSelect()
Enables publisher acknowledgements on this channel.Void
confirmSelectAndAwait()
Blocking variant ofconfirmSelect()
.void
confirmSelectAndForget()
Variant ofconfirmSelect()
that ignores the result of the operation.static RabbitMQClient
create(Vertx vertx)
static RabbitMQClient
create(Vertx vertx, io.vertx.rabbitmq.RabbitMQOptions config)
boolean
equals(Object o)
io.smallrye.mutiny.Uni<Void>
exchangeBind(String destination, String source, String routingKey)
Bind an exchange to an exchange.io.smallrye.mutiny.Uni<Void>
exchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments)
Bind an exchange to an exchange.Void
exchangeBindAndAwait(String destination, String source, String routingKey)
Blocking variant ofexchangeBind(String,String,String)
.Void
exchangeBindAndAwait(String destination, String source, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeBind(String,String,String,Map
.) void
exchangeBindAndForget(String destination, String source, String routingKey)
Variant ofexchangeBind(String,String,String)
that ignores the result of the operation.void
exchangeBindAndForget(String destination, String source, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeBind(String,String,String,Map
that ignores the result of the operation.) io.smallrye.mutiny.Uni<Void>
exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete)
Declare an exchange.io.smallrye.mutiny.Uni<Void>
exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, io.vertx.core.json.JsonObject config)
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.Void
exchangeDeclareAndAwait(String exchange, String type, boolean durable, boolean autoDelete)
Blocking variant ofexchangeDeclare(String,String,boolean,boolean)
.Void
exchangeDeclareAndAwait(String exchange, String type, boolean durable, boolean autoDelete, io.vertx.core.json.JsonObject config)
Blocking variant ofexchangeDeclare(String,String,boolean,boolean,JsonObject)
.void
exchangeDeclareAndForget(String exchange, String type, boolean durable, boolean autoDelete)
Variant ofexchangeDeclare(String,String,boolean,boolean)
that ignores the result of the operation.void
exchangeDeclareAndForget(String exchange, String type, boolean durable, boolean autoDelete, io.vertx.core.json.JsonObject config)
Variant ofexchangeDeclare(String,String,boolean,boolean,JsonObject)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
exchangeDelete(String exchange)
Delete an exchange, without regard for whether it is in use or not.Void
exchangeDeleteAndAwait(String exchange)
Blocking variant ofexchangeDelete(String)
.void
exchangeDeleteAndForget(String exchange)
Variant ofexchangeDelete(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
exchangeUnbind(String destination, String source, String routingKey)
Unbind an exchange from an exchange.io.smallrye.mutiny.Uni<Void>
exchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments)
Unbind an exchange from an exchange.Void
exchangeUnbindAndAwait(String destination, String source, String routingKey)
Blocking variant ofexchangeUnbind(String,String,String)
.Void
exchangeUnbindAndAwait(String destination, String source, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeUnbind(String,String,String,Map
.) void
exchangeUnbindAndForget(String destination, String source, String routingKey)
Variant ofexchangeUnbind(String,String,String)
that ignores the result of the operation.void
exchangeUnbindAndForget(String destination, String source, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeUnbind(String,String,String,Map
that ignores the result of the operation.) io.vertx.rabbitmq.RabbitMQClient
getDelegate()
int
hashCode()
boolean
isConnected()
boolean
isOpenChannel()
io.smallrye.mutiny.Uni<Long>
messageCount(String queue)
Returns the number of messages in a queue ready to be delivered.Long
messageCountAndAwait(String queue)
Blocking variant ofmessageCount(String)
.void
messageCountAndForget(String queue)
Variant ofmessageCount(String)
that ignores the result of the operation.static RabbitMQClient
newInstance(io.vertx.rabbitmq.RabbitMQClient arg)
io.smallrye.mutiny.Uni<Void>
queueBind(String queue, String exchange, String routingKey)
Bind a queue to an exchangeio.smallrye.mutiny.Uni<Void>
queueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Bind a queue to an exchangeVoid
queueBindAndAwait(String queue, String exchange, String routingKey)
Blocking variant ofqueueBind(String,String,String)
.Void
queueBindAndAwait(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueBind(String,String,String,Map
.) void
queueBindAndForget(String queue, String exchange, String routingKey)
Variant ofqueueBind(String,String,String)
that ignores the result of the operation.void
queueBindAndForget(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueBind(String,String,String,Map
that ignores the result of the operation.) io.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeclareOk>
queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Declare a queueio.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeclareOk>
queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.json.JsonObject config)
Declare a queue with config optionscom.rabbitmq.client.AMQP.Queue.DeclareOk
queueDeclareAndAwait(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Blocking variant ofqueueDeclare(String,boolean,boolean,boolean)
.com.rabbitmq.client.AMQP.Queue.DeclareOk
queueDeclareAndAwait(String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.json.JsonObject config)
Blocking variant ofqueueDeclare(String,boolean,boolean,boolean,JsonObject)
.void
queueDeclareAndForget(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Variant ofqueueDeclare(String,boolean,boolean,boolean)
that ignores the result of the operation.void
queueDeclareAndForget(String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.json.JsonObject config)
Variant ofqueueDeclare(String,boolean,boolean,boolean,JsonObject)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>
queueDeclareAuto()
Actively declare a server-named exclusive, autodelete, non-durable queue.io.vertx.core.json.JsonObject
queueDeclareAutoAndAwait()
Blocking variant ofqueueDeclareAuto()
.void
queueDeclareAutoAndForget()
Variant ofqueueDeclareAuto()
that ignores the result of the operation.io.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeleteOk>
queueDelete(String queue)
Delete a queue, without regard for whether it is in use or has messages on itcom.rabbitmq.client.AMQP.Queue.DeleteOk
queueDeleteAndAwait(String queue)
Blocking variant ofqueueDelete(String)
.void
queueDeleteAndForget(String queue)
Variant ofqueueDelete(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeleteOk>
queueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty)
Delete a queuecom.rabbitmq.client.AMQP.Queue.DeleteOk
queueDeleteIfAndAwait(String queue, boolean ifUnused, boolean ifEmpty)
Blocking variant ofqueueDeleteIf(String,boolean,boolean)
.void
queueDeleteIfAndForget(String queue, boolean ifUnused, boolean ifEmpty)
Variant ofqueueDeleteIf(String,boolean,boolean)
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
queueUnbind(String queue, String exchange, String routingKey)
Unbind a queue from an exchangeio.smallrye.mutiny.Uni<Void>
queueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Unbind a queue from an exchangeVoid
queueUnbindAndAwait(String queue, String exchange, String routingKey)
Blocking variant ofqueueUnbind(String,String,String)
.Void
queueUnbindAndAwait(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueUnbind(String,String,String,Map
.) void
queueUnbindAndForget(String queue, String exchange, String routingKey)
Variant ofqueueUnbind(String,String,String)
that ignores the result of the operation.void
queueUnbindAndForget(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueUnbind(String,String,String,Map
that ignores the result of the operation.) io.smallrye.mutiny.Uni<Void>
start()
Start the rabbitMQ client.Void
startAndAwait()
Blocking variant ofstart()
.void
startAndForget()
Variant ofstart()
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
stop()
Stop the rabbitMQ client.Void
stopAndAwait()
Blocking variant ofstop()
.void
stopAndForget()
Variant ofstop()
that ignores the result of the operation.String
toString()
io.smallrye.mutiny.Uni<Void>
waitForConfirms()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.io.smallrye.mutiny.Uni<Void>
waitForConfirms(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses.Void
waitForConfirmsAndAwait()
Blocking variant ofwaitForConfirms()
.Void
waitForConfirmsAndAwait(long timeout)
Blocking variant ofwaitForConfirms(long)
.void
waitForConfirmsAndForget()
Variant ofwaitForConfirms()
that ignores the result of the operation.void
waitForConfirmsAndForget(long timeout)
Variant ofwaitForConfirms(long)
that ignores the result of the operation.
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<RabbitMQClient> __TYPE_ARG
-
-
Constructor Detail
-
RabbitMQClient
public RabbitMQClient(io.vertx.rabbitmq.RabbitMQClient delegate)
-
RabbitMQClient
public RabbitMQClient(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.rabbitmq.RabbitMQClient getDelegate()
-
create
public static RabbitMQClient create(Vertx vertx)
- Parameters:
vertx
- the vertx instance- Returns:
- the client
-
create
public static RabbitMQClient create(Vertx vertx, io.vertx.rabbitmq.RabbitMQOptions config)
- Parameters:
vertx
- the vertx instanceconfig
- the client config- Returns:
- the client
-
basicAck
public io.smallrye.mutiny.Uni<Void> basicAck(long deliveryTag, boolean multiple)
Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver method containing the received message being acknowledged.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
deliveryTag
-multiple
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicAckAndAwait
public Void basicAckAndAwait(long deliveryTag, boolean multiple)
Blocking variant ofbasicAck(long,boolean)
.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).
- Parameters:
deliveryTag
-multiple
-- Returns:
- the Void instance produced by the operation.
-
basicAckAndForget
public void basicAckAndForget(long deliveryTag, boolean multiple)
Variant ofbasicAck(long,boolean)
that ignores the result of the operation.This method subscribes on the result of
basicAck(long,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicAck(long,boolean)
but you don't need to compose it with other operations.- Parameters:
deliveryTag
-multiple
-
-
basicNack
public io.smallrye.mutiny.Uni<Void> basicNack(long deliveryTag, boolean multiple, boolean requeue)
Reject one or several received messages.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
deliveryTag
-multiple
-requeue
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicNackAndAwait
public Void basicNackAndAwait(long deliveryTag, boolean multiple, boolean requeue)
Blocking variant ofbasicNack(long,boolean,boolean)
.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).
- Parameters:
deliveryTag
-multiple
-requeue
-- Returns:
- the Void instance produced by the operation.
-
basicNackAndForget
public void basicNackAndForget(long deliveryTag, boolean multiple, boolean requeue)
Variant ofbasicNack(long,boolean,boolean)
that ignores the result of the operation.This method subscribes on the result of
basicNack(long,boolean,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicNack(long,boolean,boolean)
but you don't need to compose it with other operations.- Parameters:
deliveryTag
-multiple
-requeue
-
-
basicGet
public io.smallrye.mutiny.Uni<RabbitMQMessage> basicGet(String queue, boolean autoAck)
Retrieve a message from a queue using AMQP.Basic.GetUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-autoAck
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicGetAndAwait
public RabbitMQMessage basicGetAndAwait(String queue, boolean autoAck)
Blocking variant ofbasicGet(String,boolean)
.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).
- Parameters:
queue
-autoAck
-- Returns:
- the RabbitMQMessage instance produced by the operation.
-
basicGetAndForget
public void basicGetAndForget(String queue, boolean autoAck)
Variant ofbasicGet(String,boolean)
that ignores the result of the operation.This method subscribes on the result of
basicGet(String,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicGet(String,boolean)
but you don't need to compose it with other operations.- Parameters:
queue
-autoAck
-
-
basicConsumer
public io.smallrye.mutiny.Uni<RabbitMQConsumer> basicConsumer(String queue)
Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicConsumerAndAwait
public RabbitMQConsumer basicConsumerAndAwait(String queue)
Blocking variant ofbasicConsumer(String)
.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).
- Parameters:
queue
-- Returns:
- the RabbitMQConsumer instance produced by the operation.
-
basicConsumerAndForget
public void basicConsumerAndForget(String queue)
Variant ofbasicConsumer(String)
that ignores the result of the operation.This method subscribes on the result of
basicConsumer(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicConsumer(String)
but you don't need to compose it with other operations.- Parameters:
queue
-
-
basicConsumer
public io.smallrye.mutiny.Uni<RabbitMQConsumer> basicConsumer(String queue, io.vertx.rabbitmq.QueueOptions options)
Create a consumer with the givenoptions
.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
- the name of a queueoptions
- options for queue- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicConsumerAndAwait
public RabbitMQConsumer basicConsumerAndAwait(String queue, io.vertx.rabbitmq.QueueOptions options)
Blocking variant ofbasicConsumer(String,QueueOptions)
.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).
- Parameters:
queue
- the name of a queueoptions
- options for queue- Returns:
- the RabbitMQConsumer instance produced by the operation.
-
basicConsumerAndForget
public void basicConsumerAndForget(String queue, io.vertx.rabbitmq.QueueOptions options)
Variant ofbasicConsumer(String,QueueOptions)
that ignores the result of the operation.This method subscribes on the result of
basicConsumer(String,QueueOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicConsumer(String,QueueOptions)
but you don't need to compose it with other operations.- Parameters:
queue
- the name of a queueoptions
- options for queue
-
basicPublish
public io.smallrye.mutiny.Uni<Void> basicPublish(String exchange, String routingKey, Buffer body)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
exchange
-routingKey
-body
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicPublishAndAwait
public Void basicPublishAndAwait(String exchange, String routingKey, Buffer body)
Blocking variant ofbasicPublish(String,String,io.vertx.mutiny.core.buffer.Buffer)
.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).
- Parameters:
exchange
-routingKey
-body
-- Returns:
- the Void instance produced by the operation.
-
basicPublishAndForget
public void basicPublishAndForget(String exchange, String routingKey, Buffer body)
Variant ofbasicPublish(String,String,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.This method subscribes on the result of
basicPublish(String,String,io.vertx.mutiny.core.buffer.Buffer)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicPublish(String,String,io.vertx.mutiny.core.buffer.Buffer)
but you don't need to compose it with other operations.- Parameters:
exchange
-routingKey
-body
-
-
addConfirmListener
public io.smallrye.mutiny.Uni<ReadStream<io.vertx.rabbitmq.RabbitMQConfirmation>> addConfirmListener(int maxQueueSize)
Add a Confirm Listener to the channel. Note that this will automatically call confirmSelect, it is not necessary to call that too.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
maxQueueSize
- maximum size of the queue of confirmations- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
addConfirmListenerAndAwait
public ReadStream<io.vertx.rabbitmq.RabbitMQConfirmation> addConfirmListenerAndAwait(int maxQueueSize)
Blocking variant ofaddConfirmListener(int)
.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).
- Parameters:
maxQueueSize
- maximum size of the queue of confirmations- Returns:
- the ReadStream
instance produced by the operation.
-
addConfirmListenerAndForget
public void addConfirmListenerAndForget(int maxQueueSize)
Variant ofaddConfirmListener(int)
that ignores the result of the operation.This method subscribes on the result of
addConfirmListener(int)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromaddConfirmListener(int)
but you don't need to compose it with other operations.- Parameters:
maxQueueSize
- maximum size of the queue of confirmations
-
confirmSelect
public io.smallrye.mutiny.Uni<Void> confirmSelect()
Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish() will have to be confirmed.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
confirmSelectAndAwait
public Void confirmSelectAndAwait()
Blocking variant ofconfirmSelect()
.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.
-
confirmSelectAndForget
public void confirmSelectAndForget()
Variant ofconfirmSelect()
that ignores the result of the operation.This method subscribes on the result of
confirmSelect()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconfirmSelect()
but you don't need to compose it with other operations.
-
waitForConfirms
public io.smallrye.mutiny.Uni<Void> waitForConfirms()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker. This will incur slight performance loss at the expense of higher write consistency. If desired, multiple calls to basicPublish() can be batched before confirming.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
waitForConfirmsAndAwait
public Void waitForConfirmsAndAwait()
Blocking variant ofwaitForConfirms()
.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.
-
waitForConfirmsAndForget
public void waitForConfirmsAndForget()
Variant ofwaitForConfirms()
that ignores the result of the operation.This method subscribes on the result of
waitForConfirms()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwaitForConfirms()
but you don't need to compose it with other operations.
-
waitForConfirms
public io.smallrye.mutiny.Uni<Void> waitForConfirms(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
timeout
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
waitForConfirmsAndAwait
public Void waitForConfirmsAndAwait(long timeout)
Blocking variant ofwaitForConfirms(long)
.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).
- Parameters:
timeout
-- Returns:
- the Void instance produced by the operation.
-
waitForConfirmsAndForget
public void waitForConfirmsAndForget(long timeout)
Variant ofwaitForConfirms(long)
that ignores the result of the operation.This method subscribes on the result of
waitForConfirms(long)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwaitForConfirms(long)
but you don't need to compose it with other operations.- Parameters:
timeout
-
-
basicQos
public io.smallrye.mutiny.Uni<Void> basicQos(int prefetchCount)
Request a specific prefetchCount "quality of service" settings for this channel.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimited- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicQosAndAwait
public Void basicQosAndAwait(int prefetchCount)
Blocking variant ofbasicQos(int)
.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).
- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimited- Returns:
- the Void instance produced by the operation.
-
basicQosAndForget
public void basicQosAndForget(int prefetchCount)
Variant ofbasicQos(int)
that ignores the result of the operation.This method subscribes on the result of
basicQos(int)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicQos(int)
but you don't need to compose it with other operations.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimited
-
basicQos
public io.smallrye.mutiny.Uni<Void> basicQos(int prefetchCount, boolean global)
Request a specific prefetchCount "quality of service" settings for this channel.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicQosAndAwait
public Void basicQosAndAwait(int prefetchCount, boolean global)
Blocking variant ofbasicQos(int,boolean)
.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).
- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
- the Void instance produced by the operation.
-
basicQosAndForget
public void basicQosAndForget(int prefetchCount, boolean global)
Variant ofbasicQos(int,boolean)
that ignores the result of the operation.This method subscribes on the result of
basicQos(int,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicQos(int,boolean)
but you don't need to compose it with other operations.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer
-
basicQos
public io.smallrye.mutiny.Uni<Void> basicQos(int prefetchSize, int prefetchCount, boolean global)
Request specific "quality of service" settings. These settings impose limits on the amount of data the server will deliver to consumers before requiring acknowledgements. Thus they provide a means of consumer-initiated flow control.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
prefetchSize
- maximum amount of content (measured in octets) that the server will deliver, 0 if unlimitedprefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicQosAndAwait
public Void basicQosAndAwait(int prefetchSize, int prefetchCount, boolean global)
Blocking variant ofbasicQos(int,int,boolean)
.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).
- Parameters:
prefetchSize
- maximum amount of content (measured in octets) that the server will deliver, 0 if unlimitedprefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
- the Void instance produced by the operation.
-
basicQosAndForget
public void basicQosAndForget(int prefetchSize, int prefetchCount, boolean global)
Variant ofbasicQos(int,int,boolean)
that ignores the result of the operation.This method subscribes on the result of
basicQos(int,int,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicQos(int,int,boolean)
but you don't need to compose it with other operations.- Parameters:
prefetchSize
- maximum amount of content (measured in octets) that the server will deliver, 0 if unlimitedprefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer
-
exchangeDeclare
public io.smallrye.mutiny.Uni<Void> exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete)
Declare an exchange.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
exchange
-type
-durable
-autoDelete
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
exchangeDeclareAndAwait
public Void exchangeDeclareAndAwait(String exchange, String type, boolean durable, boolean autoDelete)
Blocking variant ofexchangeDeclare(String,String,boolean,boolean)
.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).
- Parameters:
exchange
-type
-durable
-autoDelete
-- Returns:
- the Void instance produced by the operation.
-
exchangeDeclareAndForget
public void exchangeDeclareAndForget(String exchange, String type, boolean durable, boolean autoDelete)
Variant ofexchangeDeclare(String,String,boolean,boolean)
that ignores the result of the operation.This method subscribes on the result of
exchangeDeclare(String,String,boolean,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexchangeDeclare(String,String,boolean,boolean)
but you don't need to compose it with other operations.- Parameters:
exchange
-type
-durable
-autoDelete
-
-
exchangeDeclare
public io.smallrye.mutiny.Uni<Void> exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, io.vertx.core.json.JsonObject config)
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
exchange
-type
-durable
-autoDelete
-config
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
exchangeDeclareAndAwait
public Void exchangeDeclareAndAwait(String exchange, String type, boolean durable, boolean autoDelete, io.vertx.core.json.JsonObject config)
Blocking variant ofexchangeDeclare(String,String,boolean,boolean,JsonObject)
.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).
- Parameters:
exchange
-type
-durable
-autoDelete
-config
-- Returns:
- the Void instance produced by the operation.
-
exchangeDeclareAndForget
public void exchangeDeclareAndForget(String exchange, String type, boolean durable, boolean autoDelete, io.vertx.core.json.JsonObject config)
Variant ofexchangeDeclare(String,String,boolean,boolean,JsonObject)
that ignores the result of the operation.This method subscribes on the result of
exchangeDeclare(String,String,boolean,boolean,JsonObject)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexchangeDeclare(String,String,boolean,boolean,JsonObject)
but you don't need to compose it with other operations.- Parameters:
exchange
-type
-durable
-autoDelete
-config
-
-
exchangeDelete
public io.smallrye.mutiny.Uni<Void> exchangeDelete(String exchange)
Delete an exchange, without regard for whether it is in use or not.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
exchange
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
exchangeDeleteAndAwait
public Void exchangeDeleteAndAwait(String exchange)
Blocking variant ofexchangeDelete(String)
.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).
- Parameters:
exchange
-- Returns:
- the Void instance produced by the operation.
-
exchangeDeleteAndForget
public void exchangeDeleteAndForget(String exchange)
Variant ofexchangeDelete(String)
that ignores the result of the operation.This method subscribes on the result of
exchangeDelete(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexchangeDelete(String)
but you don't need to compose it with other operations.- Parameters:
exchange
-
-
exchangeBind
public io.smallrye.mutiny.Uni<Void> exchangeBind(String destination, String source, String routingKey)
Bind an exchange to an exchange.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
-source
-routingKey
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
exchangeBindAndAwait
public Void exchangeBindAndAwait(String destination, String source, String routingKey)
Blocking variant ofexchangeBind(String,String,String)
.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).
- Parameters:
destination
-source
-routingKey
-- Returns:
- the Void instance produced by the operation.
-
exchangeBindAndForget
public void exchangeBindAndForget(String destination, String source, String routingKey)
Variant ofexchangeBind(String,String,String)
that ignores the result of the operation.This method subscribes on the result of
exchangeBind(String,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexchangeBind(String,String,String)
but you don't need to compose it with other operations.- Parameters:
destination
-source
-routingKey
-
-
exchangeBind
public io.smallrye.mutiny.Uni<Void> exchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments)
Bind an exchange to an exchange.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
exchangeBindAndAwait
public Void exchangeBindAndAwait(String destination, String source, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeBind(String,String,String,Map
.) 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).
- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
- the Void instance produced by the operation.
-
exchangeBindAndForget
public void exchangeBindAndForget(String destination, String source, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeBind(String,String,String,Map
that ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeBind(String,String,String,Map
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeBind(String,String,String,Map
but you don't need to compose it with other operations.) - Parameters:
destination
-source
-routingKey
-arguments
-
-
exchangeUnbind
public io.smallrye.mutiny.Uni<Void> exchangeUnbind(String destination, String source, String routingKey)
Unbind an exchange from an exchange.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
-source
-routingKey
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
exchangeUnbindAndAwait
public Void exchangeUnbindAndAwait(String destination, String source, String routingKey)
Blocking variant ofexchangeUnbind(String,String,String)
.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).
- Parameters:
destination
-source
-routingKey
-- Returns:
- the Void instance produced by the operation.
-
exchangeUnbindAndForget
public void exchangeUnbindAndForget(String destination, String source, String routingKey)
Variant ofexchangeUnbind(String,String,String)
that ignores the result of the operation.This method subscribes on the result of
exchangeUnbind(String,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexchangeUnbind(String,String,String)
but you don't need to compose it with other operations.- Parameters:
destination
-source
-routingKey
-
-
exchangeUnbind
public io.smallrye.mutiny.Uni<Void> exchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments)
Unbind an exchange from an exchange.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
exchangeUnbindAndAwait
public Void exchangeUnbindAndAwait(String destination, String source, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeUnbind(String,String,String,Map
.) 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).
- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
- the Void instance produced by the operation.
-
exchangeUnbindAndForget
public void exchangeUnbindAndForget(String destination, String source, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeUnbind(String,String,String,Map
that ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeUnbind(String,String,String,Map
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.rabbitmq.RabbitMQClient#exchangeUnbind(String,String,String,Map
but you don't need to compose it with other operations.) - Parameters:
destination
-source
-routingKey
-arguments
-
-
queueDeclareAuto
public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> queueDeclareAuto()
Actively declare a server-named exclusive, autodelete, non-durable queue.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueDeclareAutoAndAwait
public io.vertx.core.json.JsonObject queueDeclareAutoAndAwait()
Blocking variant ofqueueDeclareAuto()
.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 JsonObject instance produced by the operation.
-
queueDeclareAutoAndForget
public void queueDeclareAutoAndForget()
Variant ofqueueDeclareAuto()
that ignores the result of the operation.This method subscribes on the result of
queueDeclareAuto()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueueDeclareAuto()
but you don't need to compose it with other operations.
-
queueBind
public io.smallrye.mutiny.Uni<Void> queueBind(String queue, String exchange, String routingKey)
Bind a queue to an exchangeUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-exchange
-routingKey
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueBindAndAwait
public Void queueBindAndAwait(String queue, String exchange, String routingKey)
Blocking variant ofqueueBind(String,String,String)
.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).
- Parameters:
queue
-exchange
-routingKey
-- Returns:
- the Void instance produced by the operation.
-
queueBindAndForget
public void queueBindAndForget(String queue, String exchange, String routingKey)
Variant ofqueueBind(String,String,String)
that ignores the result of the operation.This method subscribes on the result of
queueBind(String,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueueBind(String,String,String)
but you don't need to compose it with other operations.- Parameters:
queue
-exchange
-routingKey
-
-
queueBind
public io.smallrye.mutiny.Uni<Void> queueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Bind a queue to an exchangeUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueBindAndAwait
public Void queueBindAndAwait(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueBind(String,String,String,Map
.) 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).
- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
- the Void instance produced by the operation.
-
queueBindAndForget
public void queueBindAndForget(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueBind(String,String,String,Map
that ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.rabbitmq.RabbitMQClient#queueBind(String,String,String,Map
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.rabbitmq.RabbitMQClient#queueBind(String,String,String,Map
but you don't need to compose it with other operations.) - Parameters:
queue
-exchange
-routingKey
-arguments
-
-
queueUnbind
public io.smallrye.mutiny.Uni<Void> queueUnbind(String queue, String exchange, String routingKey)
Unbind a queue from an exchangeUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-exchange
-routingKey
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueUnbindAndAwait
public Void queueUnbindAndAwait(String queue, String exchange, String routingKey)
Blocking variant ofqueueUnbind(String,String,String)
.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).
- Parameters:
queue
-exchange
-routingKey
-- Returns:
- the Void instance produced by the operation.
-
queueUnbindAndForget
public void queueUnbindAndForget(String queue, String exchange, String routingKey)
Variant ofqueueUnbind(String,String,String)
that ignores the result of the operation.This method subscribes on the result of
queueUnbind(String,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueueUnbind(String,String,String)
but you don't need to compose it with other operations.- Parameters:
queue
-exchange
-routingKey
-
-
queueUnbind
public io.smallrye.mutiny.Uni<Void> queueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Unbind a queue from an exchangeUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueUnbindAndAwait
public Void queueUnbindAndAwait(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueUnbind(String,String,String,Map
.) 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).
- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
- the Void instance produced by the operation.
-
queueUnbindAndForget
public void queueUnbindAndForget(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#queueUnbind(String,String,String,Map
that ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.rabbitmq.RabbitMQClient#queueUnbind(String,String,String,Map
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.rabbitmq.RabbitMQClient#queueUnbind(String,String,String,Map
but you don't need to compose it with other operations.) - Parameters:
queue
-exchange
-routingKey
-arguments
-
-
messageCount
public io.smallrye.mutiny.Uni<Long> messageCount(String queue)
Returns the number of messages in a queue ready to be delivered.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
messageCountAndAwait
public Long messageCountAndAwait(String queue)
Blocking variant ofmessageCount(String)
.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).
- Parameters:
queue
-- Returns:
- the Long instance produced by the operation.
-
messageCountAndForget
public void messageCountAndForget(String queue)
Variant ofmessageCount(String)
that ignores the result of the operation.This method subscribes on the result of
messageCount(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frommessageCount(String)
but you don't need to compose it with other operations.- Parameters:
queue
-
-
start
public io.smallrye.mutiny.Uni<Void> start()
Start the rabbitMQ client. Create the connection and the channel.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
startAndAwait
public Void startAndAwait()
Blocking variant ofstart()
.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.
-
startAndForget
public void startAndForget()
-
stop
public io.smallrye.mutiny.Uni<Void> stop()
Stop the rabbitMQ client. Close the connection and its channel.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
stopAndAwait
public Void stopAndAwait()
Blocking variant ofstop()
.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.
-
stopAndForget
public void stopAndForget()
-
isConnected
public boolean isConnected()
- Returns:
- true when the connection is open, false otherwise
-
isOpenChannel
public boolean isOpenChannel()
- Returns:
- true when the connection is open, false otherwise
-
basicPublish
public io.smallrye.mutiny.Uni<Void> basicPublish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
exchange
-routingKey
-properties
-body
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicPublishAndAwait
public Void basicPublishAndAwait(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Blocking variant ofbasicPublish(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer)
.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).
- Parameters:
exchange
-routingKey
-properties
-body
-- Returns:
- the Void instance produced by the operation.
-
basicPublishAndForget
public void basicPublishAndForget(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Variant ofbasicPublish(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.This method subscribes on the result of
basicPublish(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombasicPublish(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer)
but you don't need to compose it with other operations.- Parameters:
exchange
-routingKey
-properties
-body
-
-
basicPublishWithDeliveryTag
public io.smallrye.mutiny.Uni<Void> basicPublishWithDeliveryTag(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Consumer<Long> deliveryTagHandler)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect. The deliveryTagHandler will be called before the message is sent, which is necessary because the confirmation may arrive asynchronously before the resultHandler is called.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
exchange
-routingKey
-properties
-body
-deliveryTagHandler
- callback to capture the deliveryTag for this message. Note that this will be called synchronously in the context of the client before the result is known.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
basicPublishWithDeliveryTagAndAwait
public Void basicPublishWithDeliveryTagAndAwait(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Consumer<Long> deliveryTagHandler)
Blocking variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#basicPublishWithDeliveryTag(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer,Consumer
.) 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).
- Parameters:
exchange
-routingKey
-properties
-body
-deliveryTagHandler
- callback to capture the deliveryTag for this message. Note that this will be called synchronously in the context of the client before the result is known.- Returns:
- the Void instance produced by the operation.
-
basicPublishWithDeliveryTagAndForget
public void basicPublishWithDeliveryTagAndForget(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Consumer<Long> deliveryTagHandler)
Variant ofio.vertx.mutiny.rabbitmq.RabbitMQClient#basicPublishWithDeliveryTag(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer,Consumer
that ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.rabbitmq.RabbitMQClient#basicPublishWithDeliveryTag(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer,Consumer
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.rabbitmq.RabbitMQClient#basicPublishWithDeliveryTag(String,String,BasicProperties,io.vertx.mutiny.core.buffer.Buffer,Consumer
but you don't need to compose it with other operations.) - Parameters:
exchange
-routingKey
-properties
-body
-deliveryTagHandler
- callback to capture the deliveryTag for this message. Note that this will be called synchronously in the context of the client before the result is known.
-
queueDeclare
public io.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeclareOk> queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Declare a queueUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-durable
-exclusive
-autoDelete
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueDeclareAndAwait
public com.rabbitmq.client.AMQP.Queue.DeclareOk queueDeclareAndAwait(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Blocking variant ofqueueDeclare(String,boolean,boolean,boolean)
.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).
- Parameters:
queue
-durable
-exclusive
-autoDelete
-- Returns:
- the DeclareOk instance produced by the operation.
-
queueDeclareAndForget
public void queueDeclareAndForget(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Variant ofqueueDeclare(String,boolean,boolean,boolean)
that ignores the result of the operation.This method subscribes on the result of
queueDeclare(String,boolean,boolean,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueueDeclare(String,boolean,boolean,boolean)
but you don't need to compose it with other operations.- Parameters:
queue
-durable
-exclusive
-autoDelete
-
-
queueDeclare
public io.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeclareOk> queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.json.JsonObject config)
Declare a queue with config optionsUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-durable
-exclusive
-autoDelete
-config
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueDeclareAndAwait
public com.rabbitmq.client.AMQP.Queue.DeclareOk queueDeclareAndAwait(String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.json.JsonObject config)
Blocking variant ofqueueDeclare(String,boolean,boolean,boolean,JsonObject)
.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).
- Parameters:
queue
-durable
-exclusive
-autoDelete
-config
-- Returns:
- the DeclareOk instance produced by the operation.
-
queueDeclareAndForget
public void queueDeclareAndForget(String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.json.JsonObject config)
Variant ofqueueDeclare(String,boolean,boolean,boolean,JsonObject)
that ignores the result of the operation.This method subscribes on the result of
queueDeclare(String,boolean,boolean,boolean,JsonObject)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueueDeclare(String,boolean,boolean,boolean,JsonObject)
but you don't need to compose it with other operations.- Parameters:
queue
-durable
-exclusive
-autoDelete
-config
-
-
queueDelete
public io.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeleteOk> queueDelete(String queue)
Delete a queue, without regard for whether it is in use or has messages on itUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueDeleteAndAwait
public com.rabbitmq.client.AMQP.Queue.DeleteOk queueDeleteAndAwait(String queue)
Blocking variant ofqueueDelete(String)
.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).
- Parameters:
queue
-- Returns:
- the DeleteOk instance produced by the operation.
-
queueDeleteAndForget
public void queueDeleteAndForget(String queue)
Variant ofqueueDelete(String)
that ignores the result of the operation.This method subscribes on the result of
queueDelete(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueueDelete(String)
but you don't need to compose it with other operations.- Parameters:
queue
-
-
queueDeleteIf
public io.smallrye.mutiny.Uni<com.rabbitmq.client.AMQP.Queue.DeleteOk> queueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty)
Delete a queueUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
queue
-ifUnused
-ifEmpty
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queueDeleteIfAndAwait
public com.rabbitmq.client.AMQP.Queue.DeleteOk queueDeleteIfAndAwait(String queue, boolean ifUnused, boolean ifEmpty)
Blocking variant ofqueueDeleteIf(String,boolean,boolean)
.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).
- Parameters:
queue
-ifUnused
-ifEmpty
-- Returns:
- the DeleteOk instance produced by the operation.
-
queueDeleteIfAndForget
public void queueDeleteIfAndForget(String queue, boolean ifUnused, boolean ifEmpty)
Variant ofqueueDeleteIf(String,boolean,boolean)
that ignores the result of the operation.This method subscribes on the result of
queueDeleteIf(String,boolean,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueueDeleteIf(String,boolean,boolean)
but you don't need to compose it with other operations.- Parameters:
queue
-ifUnused
-ifEmpty
-
-
newInstance
public static RabbitMQClient newInstance(io.vertx.rabbitmq.RabbitMQClient arg)
-
-