activemq-artemis/examples/features/standard/jms-bridge
Clebert Suconic 224ca0d4d7 [maven-release-plugin] prepare release 2.23.0 2022-06-07 12:39:07 -04:00
..
src/main ARTEMIS-1562 Refactor example documentation 2017-12-15 14:54:16 +00:00
jms-bridge.png renaming broker-features -> features on examples 2015-08-13 00:11:56 -04:00
pom.xml [maven-release-plugin] prepare release 2.23.0 2022-06-07 12:39:07 -04:00
readme.md ARTEMIS-1562 Refactor example documentation 2017-12-15 14:54:16 +00:00

readme.md

JMS Bridge Example

To run the example, simply type mvn verify from this directory, or mvn -PnoServer verify if you want to start and create the broker manually.

This example shows you how to create a JMS Bridge between two ActiveMQ Artemis brokers.

The example will use two ActiveMQ Artemis brokers:

  • Server #0 the Source broker. It will be configured with a JMS Topic bound to JNDI under source/topic
  • Server #1 the Target broker. It will be configured with a JMS Queue bound to JNDI under target/queue

The JMS Bridge will be started in the example code and be configured to bridge messages from the source destination (the topic hosted on broker #0) and the target destination (the queue hosted on broker #1)

The client will check the bridge works by:

  1. sending a message to the source topic
  2. receive a message from the target queue
  3. check that both messages correspond to the same content.

JMS Bridge Configuration

The JMS Bridge is a POJO that we configure with both source and target JNDI configurations. In the actual example we are programmatically creating the Bridge.