tree: 1f5bf69f56eac53565fcfb508ba9a07399f08f72 [path history] [tgz]
  1. src/
  2. jms-bridge.png
  3. pom.xml
  4. readme.md
examples/features/standard/jms-bridge/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.