# Class: RabbitMQClient

## vertx-rabbitmq-js/rabbit_mq_client~ RabbitMQClient

#### new RabbitMQClient()

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 29

### Methods

#### basicAck(deliveryTag, multiple, 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:

Name | Type | Description
--- | --- | ---
`deliveryTag` | number |
`multiple` | boolean |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 43

#### basicConsume(queue, address, autoAck, resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`queue` | string |
`address` | string |
`autoAck` | boolean |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 108

#### basicGet(queue, autoAck, resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`queue` | string |
`autoAck` | boolean |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 86

#### basicNack(deliveryTag, multiple, requeue, resultHandler)

Reject one or several received messages.

##### Parameters:

Name | Type | Description
--- | --- | ---
`deliveryTag` | number |
`multiple` | boolean |
`requeue` | boolean |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 65

#### basicPublish(exchange, routingKey, message, 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:

Name | Type | Description
--- | --- | ---
`exchange` | string |
`routingKey` | string |
`message` | Object |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 139

#### basicQos(prefetchCount, 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:

Name | Type | Description
--- | --- | ---
`prefetchCount` | number |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 160

#### exchangeBind(destination, source, routingKey, resultHandler)

Bind an exchange to an exchange.

##### Parameters:

Name | Type | Description
--- | --- | ---
`destination` | string |
`source` | string |
`routingKey` | string |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 234

#### exchangeDeclare(exchange, type, durable, autoDelete, config, resultHandler)

Declare an exchange with additional parameters such as dead lettering or an alternate exchnage.

##### Parameters:

Name | Type | Description
--- | --- | ---
`exchange` | string |
`type` | string |
`durable` | boolean |
`autoDelete` | boolean |
`config` | Array.<string> |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 184

#### exchangeDelete(exchange, resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`exchange` | string |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 212

#### exchangeUnbind(destination, source, routingKey, resultHandler)

Unbind an exchange from an exchange.

##### Parameters:

Name | Type | Description
--- | --- | ---
`destination` | string |
`source` | string |
`routingKey` | string |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 256

#### isConnected() → {boolean}

Check if a connection is open

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 440

##### Returns:

true when the connection is open, false otherwise

Type
  boolean

#### isOpenChannel() → {boolean}

Check if a channel is open

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 454

##### Returns:

true when the connection is open, false otherwise

Type
  boolean

#### messageCount(queue, resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`queue` | string |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 382

#### queueBind(queue, exchange, routingKey, resultHandler)

Bind a queue to an exchange

##### Parameters:

Name | Type | Description
--- | --- | ---
`queue` | string |
`exchange` | string |
`routingKey` | string |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 362

#### queueDeclare(queue, durable, exclusive, autoDelete, resultHandler)

Declare a queue

##### Parameters:

Name | Type | Description
--- | --- | ---
`queue` | string |
`durable` | boolean |
`exclusive` | boolean |
`autoDelete` | boolean |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 298

#### queueDeclareAuto(resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 275

#### queueDelete(queue, resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`queue` | string |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 318

#### queueDeleteIf(queue, ifUnused, ifEmpty, resultHandler)

Delete a queue

##### Parameters:

Name | Type | Description
--- | --- | ---
`queue` | string |
`ifUnused` | boolean |
`ifEmpty` | boolean |
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 340

#### start(resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 401

#### stop(resultHandler)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`resultHandler` | function |

Source:
  - vertx-rabbitmq-js/rabbit_mq_client.js, line 420