Class RabbitMQClient


  • public class RabbitMQClient
    extends Object

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • RabbitMQClient

        public RabbitMQClient​(io.vertx.rabbitmq.RabbitMQClient delegate)
      • RabbitMQClient

        public RabbitMQClient​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.rabbitmq.RabbitMQClient getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 instance
        config - 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 of basicAck(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 of basicAck(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 from basicAck(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 of basicNack(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 of basicNack(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 from basicNack(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.Get

        Unlike 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 of basicGet(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 of basicGet(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 from basicGet(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 of basicConsumer(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 of basicConsumer(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 from basicConsumer(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 given options.

        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 queue
        options - 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 of basicConsumer(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 queue
        options - options for queue
        Returns:
        the RabbitMQConsumer instance produced by the operation.
      • basicConsumerAndForget

        public void basicConsumerAndForget​(String queue,
                                           io.vertx.rabbitmq.QueueOptions options)
        Variant of basicConsumer(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 from basicConsumer(String,QueueOptions) but you don't need to compose it with other operations.

        Parameters:
        queue - the name of a queue
        options - 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 of basicPublish(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.
      • 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 of addConfirmListener(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 of addConfirmListener(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 from addConfirmListener(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 of confirmSelect().

        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 of confirmSelect() 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 from confirmSelect() 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 of waitForConfirms().

        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 of waitForConfirms() 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 from waitForConfirms() 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 of waitForConfirms(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 of waitForConfirms(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 from waitForConfirms(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 of basicQos(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 of basicQos(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 from basicQos(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 unlimited
        global - 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 of basicQos(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 unlimited
        global - 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 of basicQos(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 from basicQos(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 unlimited
        global - 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 unlimited
        prefetchCount - maximum number of messages that the server will deliver, 0 if unlimited
        global - 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 of basicQos(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 unlimited
        prefetchCount - maximum number of messages that the server will deliver, 0 if unlimited
        global - 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 of basicQos(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 from basicQos(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 unlimited
        prefetchCount - maximum number of messages that the server will deliver, 0 if unlimited
        global - 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 of exchangeDeclare(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.
      • 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 of exchangeDeclare(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.
      • 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 of exchangeDelete(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 of exchangeDelete(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 from exchangeDelete(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 of exchangeBind(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.
      • 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 of io.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 of io.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 of exchangeUnbind(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.
      • 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 of io.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 of io.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 of queueDeclareAuto().

        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 of queueDeclareAuto() 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 from queueDeclareAuto() 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 exchange

        Unlike 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 of queueBind(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.
      • queueBind

        public io.smallrye.mutiny.Uni<Void> queueBind​(String queue,
                                                      String exchange,
                                                      String routingKey,
                                                      Map<String,​Object> arguments)
        Bind a queue 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:
        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 of io.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 of io.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 exchange

        Unlike 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 of queueUnbind(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.
      • queueUnbind

        public io.smallrye.mutiny.Uni<Void> queueUnbind​(String queue,
                                                        String exchange,
                                                        String routingKey,
                                                        Map<String,​Object> arguments)
        Unbind a queue 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:
        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 of io.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 of io.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 of messageCount(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 of messageCount(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 from messageCount(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 of start().

        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()
        Variant of start() that ignores the result of the operation.

        This method subscribes on the result of start(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from start() but you don't need to compose it with other operations.

      • 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 of stop().

        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()
        Variant of stop() that ignores the result of the operation.

        This method subscribes on the result of stop(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from stop() but you don't need to compose it with other operations.

      • 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 of basicPublish(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.
      • 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 of io.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 of io.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 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 -
        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 of queueDeclare(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.
      • 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 options

        Unlike 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 of queueDeclare(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.
      • 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 it

        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.
      • queueDeleteAndAwait

        public com.rabbitmq.client.AMQP.Queue.DeleteOk queueDeleteAndAwait​(String queue)
        Blocking variant of queueDelete(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 of queueDelete(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 from queueDelete(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 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 -
        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 of queueDeleteIf(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.
      • newInstance

        public static RabbitMQClient newInstance​(io.vertx.rabbitmq.RabbitMQClient arg)