# Class: AmqpBridge

## vertx-amqp-bridge-js/amqp_bridge~ AmqpBridge

#### new AmqpBridge()

Vert.x AMQP Bridge. Facilitates sending and receiving AMQP 1.0 messages.

Source:
  - vertx-amqp-bridge-js/amqp_bridge.js, line 33

### Methods

#### close(resultHandler)

Shuts the bridge down, closing the underlying connection.

##### Parameters:

Name | Type | Description
--- | --- | ---
`resultHandler` | function | the result handler

Source:
  - vertx-amqp-bridge-js/amqp_bridge.js, line 109

#### createConsumer(amqpAddress) → {MessageConsumer}

Creates a consumer on the given AMQP address. This method MUST be called from the bridge Context thread, as used in the result handler callback from the start methods. The bridge MUST be successfully started before the method is called.

##### Parameters:

Name | Type | Description
--- | --- | ---
`amqpAddress` | string | the address to consume from

Source:
  - vertx-amqp-bridge-js/amqp_bridge.js, line 79

##### Returns:

the consumer

Type
  MessageConsumer

#### createProducer(amqpAddress) → {MessageProducer}

Creates a producer to the given AMQP address. This method MUST be called from the bridge Context thread, as used in the result handler callback from the start methods. The bridge MUST be successfully started before the method is called.

##### Parameters:

Name | Type | Description
--- | --- | ---
`amqpAddress` | string | the address to produce to

Source:
  - vertx-amqp-bridge-js/amqp_bridge.js, line 96

##### Returns:

the producer

Type
  MessageProducer

#### start(hostname, port, username, password, resultHandler)

Starts the bridge, establishing the underlying connection.

##### Parameters:

Name | Type | Description
--- | --- | ---
`hostname` | string | the host name to connect to
`port` | number | the port to connect to
`username` | string | the username
`password` | string | the password
`resultHandler` | function | the result handler

Source:
  - vertx-amqp-bridge-js/amqp_bridge.js, line 48