Package: io.vertx.groovy.rabbitmq

## [Groovy] Class RabbitMQClient

- io.vertx.groovy.rabbitmq.RabbitMQClient

- - ### Constructor Summary

    Constructors
    Constructor and description
    `RabbitMQClient (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `basicAck(long deliveryTag, boolean multiple, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Acknowledge one or several received messages.
    `void` | `basicConsume(java.lang.String queue, java.lang.String address, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.
    `void` | `basicConsume(java.lang.String queue, java.lang.String address, boolean autoAck, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.
    `void` | `basicGet(java.lang.String queue, boolean autoAck, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Retrieve a message from a queue using AMQP.Basic.Get
    `void` | `basicNack(long deliveryTag, boolean multiple, boolean requeue, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Reject one or several received messages.
    `void` | `basicPublish(java.lang.String exchange, java.lang.String routingKey, java.util.Map<java.lang.String, java.lang.Object> message, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Publish a message.
    `void` | `basicQos(int prefetchCount, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Request specific "quality of service" settings, Limiting the number of unacknowledged messages on a channel (or connection).
    `static RabbitMQClient` | `create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config)`
    `void` | `exchangeBind(java.lang.String destination, java.lang.String source, java.lang.String routingKey, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Bind an exchange to an exchange.
    `void` | `exchangeDeclare(java.lang.String exchange, java.lang.String type, boolean durable, boolean autoDelete, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Declare an exchange.
    `void` | `exchangeDelete(java.lang.String exchange, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Delete an exchange, without regard for whether it is in use or not.
    `void` | `exchangeUnbind(java.lang.String destination, java.lang.String source, java.lang.String routingKey, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Unbind an exchange from an exchange.
    `java.lang.Object` | `getDelegate()`
    `boolean` | `isConnected()` Check if a connection is open
    `boolean` | `isOpenChannel()` Check if a channel is open
    `void` | `messageCount(java.lang.String queue, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Returns the number of messages in a queue ready to be delivered.
    `void` | `queueBind(java.lang.String queue, java.lang.String exchange, java.lang.String routingKey, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Bind a queue to an exchange
    `void` | `queueDeclare(java.lang.String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Declare a queue
    `void` | `queueDeclareAuto(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Actively declare a server-named exclusive, autodelete, non-durable queue.
    `void` | `queueDelete(java.lang.String queue, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Delete a queue, without regard for whether it is in use or has messages on it
    `void` | `queueDeleteIf(java.lang.String queue, boolean ifUnused, boolean ifEmpty, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Delete a queue
    `void` | `start(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Start the rabbitMQ client.
    `void` | `stop(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Stop the rabbitMQ client.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### RabbitMQClient(java.lang.Object delegate)

  - ### Method Detail

    - #### void basicAck(long deliveryTag, boolean multiple, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      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.

      Parameters:
        deliveryTag
        multiple
        resultHandler

    - #### void basicConsume(java.lang.String queue, java.lang.String address, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.

      Parameters:
        queue
        address
        resultHandler

    - #### void basicConsume(java.lang.String queue, java.lang.String address, boolean autoAck, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.

      Parameters:
        queue
        address
        autoAck
        resultHandler

    - #### void basicGet(java.lang.String queue, boolean autoAck, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Retrieve a message from a queue using AMQP.Basic.Get

      Parameters:
        queue
        autoAck
        resultHandler

    - #### void basicNack(long deliveryTag, boolean multiple, boolean requeue, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Reject one or several received messages.

      Parameters:
        deliveryTag
        multiple
        requeue
        resultHandler

    - #### void basicPublish(java.lang.String exchange, java.lang.String routingKey, java.util.Map<java.lang.String, java.lang.Object> message, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      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.

      Parameters:
        exchange
        routingKey
        message
        resultHandler

    - #### void basicQos(int prefetchCount, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Request specific "quality of service" settings, Limiting the number of unacknowledged messages on a channel (or connection). This limit is applied separately to each new consumer on the channel.

      Parameters:
        prefetchCount
        resultHandler

    - #### static RabbitMQClient create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config)

    - #### void exchangeBind(java.lang.String destination, java.lang.String source, java.lang.String routingKey, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Bind an exchange to an exchange.

      Parameters:
        destination
        source
        routingKey
        resultHandler

    - #### void exchangeDeclare(java.lang.String exchange, java.lang.String type, boolean durable, boolean autoDelete, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Declare an exchange.

      Parameters:
        exchange
        type
        durable
        autoDelete
        resultHandler

    - #### void exchangeDelete(java.lang.String exchange, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Delete an exchange, without regard for whether it is in use or not.

      Parameters:
        exchange
        resultHandler

    - #### void exchangeUnbind(java.lang.String destination, java.lang.String source, java.lang.String routingKey, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Unbind an exchange from an exchange.

      Parameters:
        destination
        source
        routingKey
        resultHandler

    - #### java.lang.Object getDelegate()

    - #### boolean isConnected()

      Check if a connection is open

      Returns:
        true when the connection is open, false otherwise

    - #### boolean isOpenChannel()

      Check if a channel is open

      Returns:
        true when the connection is open, false otherwise

    - #### void messageCount(java.lang.String queue, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Returns the number of messages in a queue ready to be delivered.

      Parameters:
        queue
        resultHandler

    - #### void queueBind(java.lang.String queue, java.lang.String exchange, java.lang.String routingKey, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Bind a queue to an exchange

      Parameters:
        queue
        exchange
        routingKey
        resultHandler

    - #### void queueDeclare(java.lang.String queue, boolean durable, boolean exclusive, boolean autoDelete, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Declare a queue

      Parameters:
        queue
        durable
        exclusive
        autoDelete
        resultHandler

    - #### void queueDeclareAuto(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Actively declare a server-named exclusive, autodelete, non-durable queue.

      Parameters:
        resultHandler

    - #### void queueDelete(java.lang.String queue, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Delete a queue, without regard for whether it is in use or has messages on it

      Parameters:
        queue
        resultHandler

    - #### void queueDeleteIf(java.lang.String queue, boolean ifUnused, boolean ifEmpty, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Delete a queue

      Parameters:
        queue
        ifUnused
        ifEmpty
        resultHandler

    - #### void start(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Start the rabbitMQ client. Create the connection and the chanel.

      Parameters:
        resultHandler

    - #### void stop(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Stop the rabbitMQ client. Close the connection and its chanel.

      Parameters:
        resultHandler