new AmqpBridge()
Vert.x AMQP Bridge. Facilitates sending and receiving AMQP 1.0 messages.
Methods
close(resultHandler)
Shuts the bridge down, closing the underlying connection.
Parameters:
Name | Type | Description |
---|---|---|
resultHandler |
function | the result handler |
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 |
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 |
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 |