ActiveMQ has no feature called a shovel; that term comes from RabbitMQ. To move messages between ActiveMQ brokers you use a network connector in ActiveMQ Classic, a core bridge in ActiveMQ Artemis, or a small Spring Boot application that reads from one broker and writes to the other. Spring Boot is the client in all of these, so the broker-to-broker link is configured on the brokers, not in Spring properties.
The examples assume Spring Boot 3 or later with Java 21.
A RabbitMQ shovel is a plugin that consumes from a source queue on one broker and republishes to a destination on another, often across a WAN. The ActiveMQ options below give the same outcome.
| Need | ActiveMQ Classic | ActiveMQ Artemis | Any broker |
|---|---|---|---|
| Forward a queue to another broker | Network connector with included destinations | Core bridge | Spring or Camel relay |
| Runs where | Inside the broker | Inside the broker | In your application |
| Survives link outage | Store and forward | Store and forward, retry | You implement retry |
| Cross-vendor | No | JMS bridge possible | Yes |
If both sides are the same broker family, prefer the built-in feature. Use an application-level relay when the brokers differ, or when you must transform messages.
A network connector links two brokers and forwards messages for the destinations you name. In activemq.xml of the source broker:
Messages that arrive on sourceQueue at broker1 are forwarded to the queue of the same name on broker2, and they are stored on broker1 while broker2 is unreachable. A network connector keeps the destination name, so you cannot rename the queue; if you need a different target name, use the relay approach below. Without staticallyIncludedDestinations, a connector forwards only for destinations where the remote broker has consumers, which is the "network of brokers" behaviour.
Artemis bridges are configured in broker.xml and can rename the target address:
The bridge consumes from sourceQueue and sends to destinationQueue on broker2. It reconnects forever with reconnect-attempts set to -1, and Artemis uses duplicate detection on the bridge to avoid redelivered copies. The target broker needs the address to exist, or auto-creation enabled.
When the brokers are different products, or you need to filter or transform, relay in code. Spring Boot can hold two connection factories; declare both explicitly so auto-configuration does not get confused:
The two connection factories use client classes from the same library, so adjust the class if the target is Artemis or another vendor. The listener session is transacted, so a failure while forwarding rolls back and the source message is redelivered rather than lost.
There is one gap to know about: the source commit and the target send are two separate resources. A crash between them can duplicate a message (the send succeeded but the source commit did not). If that matters, make the target consumer idempotent, or use XA transactions with a JTA transaction manager, which is heavier to run.
ssl:// in Classic, sslEnabled=true on the Artemis connector) for links that cross networks.No. Use a network connector in Classic, a core bridge in Artemis, or a Camel or Spring relay.
The built-in broker features, because they handle reconnects and store-and-forward without application code. Use a relay only when you must transform messages or connect different brokers.
Yes with an Artemis bridge (forwarding-address) or a relay. A Classic network connector keeps the name.
ActiveMQ has no shovels, but you can move messages between brokers with a Classic network connector, an Artemis core bridge or a transacted Spring relay. Prefer the broker feature for same-family links, accept at-least-once delivery, and make the receiving side idempotent.