Skip to main content
Skip table of contents

AMQP Bridge Extension Swiftlet

The AMQP Bridge Swiftlet provides bridging functionality between AMQP brokers. Bridges can be defined between SwiftMQ and foreign AMQP brokers as well as between foreign AMQP brokers only. Supported AMQP versions are 0.9.1 and 1.0.

An AMQP bridge consists of a source from which messages are consumed and a target to which messages are sent. Both must have the same AMQP version. Since SwiftMQ supports AMQP 0.9.1 and AMQP 1.0, it is possible to use SwiftMQ as a relay from 2 bridges to convert AMQP 0.9.1 to AMQP 1.0 messages and vice versa.

Example: Bridging between SwiftMQ and foreign AMQP Brokers

In this example, the SwiftMQ Router acts as a source or target and is connected to a foreign AMQP Broker like Qpid Java broker with AMQP 1.0 or RabbitMQ with AMQP 0.9.1.

Example: Bridging between foreign AMQP Brokers

In this configuration, the SwiftMQ Router only provides the bridge between foreign AMQP Broker pairs with the same AMQP version.

Example: Bridging between AMQP 0.9.1 and AMQP 1.0 with SwiftMQ as a Relay

Here two AMQP brokers of different AMQP versions are connected to a SwiftMQ Router with a relay queue acting as a source or target, respectively. RabbitMQ produces AMQP messages with AMQP version 0.9.1 and stores them into a relay queue at the SwiftMQ Router. From here the messages are transferred as AMQP version 1.0 to the Qpid Java broker.

AMQP 1.0 Bridges

Create/Delete a Bridge

Select the AMQP 1.0 Bridges:

Click on Create a new Entity and enter the name of the bridge but do NOT yet enable it because it needs to be configured first:

The new bridge appears in the above table. It can be deleted by clicking Delete Entity:

Configure a Bridge

Entity Source specifies the broker where the messages are consumed from, entity Target the broker where the messages are sent to. The attributes of the entities are used to configure the SwiftMQ AMQP 1.0 Java Client which is used internally.

The source and target of a bridge do reference a connection template which is configured here:

If the name of the connection template is default, default values are used as shown here (a connection template with the name default doesn't need to be created):

Custom templates can be created and referenced from source and/or targets:

Please have a look at the SwiftMQ AMQP 1.0 Java Client documentation to get further information.

The configuration can be changed at any time but should be done in a disabled state. The changes take effect after the bridge has been enabled again.

Enable/Disable a Bridge

The bridge will be activated by checking the Enabled box:

The bridge now transfers messages if everything is configured properly. To stop it, uncheck the Enabled box.

Monitor a Bridge

Active bridges are listed under the Usage entity of the Swiftlet:

AMQP 0.9.1 Bridges

Install the RabbitMQ Java Client

AMQP 0.9.1 bridges use the RabbitMQ Java client internally. You need to install it first before an AMQP 0.9.1 bridge can be created.

Download here.

After this Swiftlet has been successfully deployed, unpack it and copy commons-io-x.x.jar and rabbitmq-client.jar into the deployment directory of this Swiftlet.

The Swiftlet then gets automatically redeployed (hot deployment). AMQP 0.9.1 bridges can now be created.

Create/Delete a Bridge

Select the AMQP 0.9.1 Bridges:

Click on Create a new Entity and enter the name of the bridge but do NOT yet enable it because it needs to be configured first:

The new bridge appears in the above table. It can be deleted by clicking Delete Entity:

Configure a Bridge

Entity Source specifies the broker where the messages are consumed from, entity Target the broker where the messages are sent to. The attributes of the entities are used to configure the RabbitMQ client.

The configuration can be changed at any time but should be done in a disabled state. The changes take effect after the bridge has been enabled again.

Enable/Disable a Bridge

The bridge will be activated by checking the Enabled box.

The bridge now transfers messages if everything is configured properly. To stop it, uncheck the Enabled box.

Please save your configuration! See top of this page.

Monitor a Bridge

Active bridges are listed under the Usage entity of the Swiftlet:

Jobs

The AMQP Bridge Swiftlet registers jobs in job group AMQP Bridge at the Scheduler Swiftlet:

These jobs can be scheduled via the Scheduler Swiftlet to run at specific times or in intervals, based on calendars and so on.

Bridge

The Bridge job activates an AMQP bridge on the job start and deactivates it on the job stop. The name of the bridge must be specified as a parameter. The job requires setting a maximum runtime to deactivate the bridge. Otherwise, it would be active forever.

The implementation of the Bridge job is quite simple. It sets the enabled attribute to true on job start and to false on job stop. Therefore, a server bridge that should run as a job should be initially disabled.

Parameter

Mandatory

Description

Bridge Type

Yes

Type (AMQP version) of the bridge (091 or 100).

Bridge Name

Yes

Name of the bridge.

Installation

The installation takes place via 'hot deployment'. See the documentation of the Deploy Swiftlet for further information.

Configuration

The configuration of the AMQP Bridge Extension Swiftlet is defined within the element

XML
      <swiftlet name="xt$amqpbridge" .../>

of the router's configuration file.

Element List "connection-templates", Parent Element: "swiftlet"

Templates for Connections. This element list contains zero or more "connection-template" elements with this template definition:

Definition

Attribute

Type

Mandatory

Description

name

java.lang.String

Yes

Name of this Connection Template

idle-timeout

java.lang.Long

No

Idle Timeout (ms)

max-frame-size

java.lang.Long

No

Maximum Frame Site (Bytes)

container-id

java.lang.String

No

Container Id

open-hostname

java.lang.String

No

Overwrites Hostname set in Open Frame

input-buffer-size

java.lang.Integer

No

Network Input Buffer Size

input-buffer-extend-size

java.lang.Integer

No

Network Input Buffer Extend Size

output-buffer-size

java.lang.Integer

No

Network Output Buffer Size

output-buffer-extend-size

java.lang.Integer

No

Network Output Buffer Extend Size

session-incoming-window-size

java.lang.Integer

No

Session Incoming Window Size

session-outgoing-window-size

java.lang.Integer

No

Session Outgoing Window Size

source-link-credit

java.lang.Integer

No

Source Link Credit

Values

Attribute

Values

idle-timeout

Default: 120000

max-frame-size

Default: 131072

container-id

open-hostname

input-buffer-size

Min: 4096
Default: 1048576

input-buffer-extend-size

Min: 4096
Default: 1048576

output-buffer-size

Min: 4096
Default: 1048576

output-buffer-extend-size

Min: 4096
Default: 1048576

session-incoming-window-size

Min: 1
Default: 100

session-outgoing-window-size

Min: 1
Default: 100

source-link-credit

Min: 1
Default: 100

Element List "bridges100", Parent Element: "swiftlet"

AMQP 1.0 Bridges. This element list contains zero or more "bridge100" elements with this template definition:

Definition

Attribute

Type

Mandatory

Description

name

java.lang.String

Yes

Name of this AMQP 1.0 Bridge

enabled

java.lang.Boolean

No

Enables/Disables this Connection

retryinterval

java.lang.Long

No

Retry Interval (ms) for Re-Connect

transfer-qos

java.lang.String

No

Transfer Quality of Service

Values

Attribute

Values

enabled

Default: false

retryinterval

Default: 60000

transfer-qos

Choice: at-most-once at-least-once exactly-once
Default: exactly-once

Element "source", Parent Element: "bridge100"

Source.

Definition

Attribute

Type

Mandatory

Description

remote-hostname

java.lang.String

No

Remote Host

remote-port

java.lang.Integer

No

Remote Port

use-ssl

java.lang.Boolean

No

Establishes a SSL Connection

sasl-enabled

java.lang.Boolean

No

Enables/Disables SASL Authentication

sasl-anonymous-login

java.lang.Boolean

No

Use SASL Anonymous Login

sasl-loginname

java.lang.String

No

SASL Loginname

sasl-password

java.lang.String

No

SASL Password

sasl-mechanism

java.lang.String

No

SASL Mechanism

source-address

java.lang.String

No

Source Address

source-message-selector

java.lang.String

No

Source Message Selector

connection-template

java.lang.String

No

Connection Template

Values

Attribute

Values

remote-hostname

Default: localhost

remote-port

Default: 5672

use-ssl

Default: false

sasl-enabled

Default: true

sasl-anonymous-login

Default: true

sasl-loginname

sasl-password

sasl-mechanism

Default: PLAIN

source-address

Default: sourcequeue

source-message-selector

connection-template

Default: default

Element "target", Parent Element: "bridge100"

Target.

Definition

Attribute

Type

Mandatory

Description

remote-hostname

java.lang.String

No

Remote Host

remote-port

java.lang.Integer

No

Remote Port

use-ssl

java.lang.Boolean

No

Establishes a SSL Connection

sasl-enabled

java.lang.Boolean

No

Enables/Disables SASL Authentication

sasl-anonymous-login

java.lang.Boolean

No

Use SASL Anonymous Login

sasl-loginname

java.lang.String

No

SASL Loginname

sasl-password

java.lang.String

No

SASL Password

sasl-mechanism

java.lang.String

No

SASL Mechanism

target-address

java.lang.String

No

Target Address

connection-template

java.lang.String

No

Connection Template

Values

Attribute

Values

remote-hostname

Default: localhost

remote-port

Default: 5672

use-ssl

Default: false

sasl-enabled

Default: true

sasl-anonymous-login

Default: true

sasl-loginname

sasl-password

sasl-mechanism

Default: PLAIN

target-address

Default: targetqueue

connection-template

Default: default

Element List "bridges091", Parent Element: "swiftlet"

AMQP 0.9.1 Bridges. This element list contains zero or more "bridge091" elements with this template definition:

Definition

Attribute

Type

Mandatory

Description

name

java.lang.String

Yes

Name of this AMQP 0.9.1 Bridge

enabled

java.lang.Boolean

No

Enables/Disables this Connection

retryinterval

java.lang.Long

No

Retry Interval (ms) for Re-Connect

Values

Attribute

Values

enabled

Default: false

retryinterval

Default: 60000

Element "source", Parent Element: "bridge091"

Source.

Definition

Attribute

Type

Mandatory

Description

connect-uri

java.lang.String

No

AMQP Connect URI to create the Connection

use-ssl

java.lang.Boolean

No

Establishes a SSL Connection

exchange-name

java.lang.String

No

Exchange Name

exchange-type

java.lang.String

No

Exchange Type

consumer-tag

java.lang.String

No

Consumer Tag

queue-name

java.lang.String

No

Queue Name

queue-option-durable

java.lang.Boolean

No

Queue is durable?

queue-option-exclusive

java.lang.Boolean

No

Queue is exclusive?

queue-option-autodelete

java.lang.Boolean

No

Queue is autodelete?

routing-key

java.lang.String

No

Routing Key

Values

Attribute

Values

connect-uri

Default: amqp://admin:secret@localhost:5672/

use-ssl

Default: false

exchange-name

exchange-type

Default: direct

consumer-tag

queue-name

queue-option-durable

Default: false

queue-option-exclusive

Default: false

queue-option-autodelete

Default: false

routing-key

Element "target", Parent Element: "bridge091"

Target.

Definition

Attribute

Type

Mandatory

Description

connect-uri

java.lang.String

No

AMQP Connect URI to create the Connection

use-ssl

java.lang.Boolean

No

Establishes a SSL Connection

exchange-name

java.lang.String

No

Exchange Name

routing-key

java.lang.String

No

Routing Key

Values

Attribute

Values

connect-uri

Default: amqp://admin:secret@localhost:5672/

use-ssl

Default: false

exchange-name

routing-key

Element "usage", Parent Element: "swiftlet"

Active AMQP Bridges.

Element List "bridges091", Parent Element: "usage"

AMQP 0.9.1 Bridges. This element list contains zero or more "bridge091" elements with this template definition:

Definition

Attribute

Type

Mandatory

Description

name

java.lang.String

Yes

Name of this AMQP 0.9.1 Bridge

connecttime

java.lang.String

No

Connect Time of this Bridge

last-transfer-time

java.lang.String

No

Last Transfer Time

number-messages-transferred

java.lang.Integer

No

Number Messages transferred

Values

Attribute

Values

connecttime

last-transfer-time

number-messages-transferred

Default: 0

Element List "bridges100", Parent Element: "usage"

AMQP 1.0 Bridges. This element list contains zero or more "bridge100" elements with this template definition:

Definition

Attribute

Type

Mandatory

Description

name

java.lang.String

Yes

Name of this AMQP 1.0 Bridge

connecttime

java.lang.String

No

Connect Time of this Bridge

last-transfer-time

java.lang.String

No

Last Transfer Time

number-messages-transferred

java.lang.Integer

No

Number Messages transferred

Values

Attribute

Values

connecttime

last-transfer-time

number-messages-transferred

Default: 0

CLI Commands During Deployment

This Swiftlet performs the following CLI commands during deployment:

CODE
      cc /sys$threadpool/pools
      new amqpbridge.poll
      cc /sys$threadpool/pools/amqpbridge.poll/threads
      new extension.xt$amqpbridge.poller
      cc /sys$threadpool/pools
      new amqpbridge.client.connection
      cc /sys$threadpool/pools/amqpbridge.client.connection/threads
      new extension.xt$amqpbridge.client.connection
      cc /sys$threadpool/pools
      new amqpbridge.client.session
      cc /sys$threadpool/pools/amqpbridge.client.session/threads
      new extension.xt$amqpbridge.client.session

CLI Commands During Undeployment

This Swiftlet performs the following CLI commands during undeployment:

CODE
      cc /sys$threadpool/pools
      delete amqpbridge.poll
      delete amqpbridge.client.connection
      delete amqpbridge.client.session

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.