activemq-artemis/examples/features/standard/jms-bridge
Clebert Suconic fb1b362b47 [maven-release-plugin] prepare release 2.25.0 2022-08-30 18:04:05 -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.25.0 2022-08-30 18:04:05 -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.