How to move selected ActiveMQ messages to another queue

Updated July 21, 2026

To move selected ActiveMQ messages, browse the source queue in QueueExplorer, inspect and select the required rows, choose Cut, open the destination queue, and choose Paste. You can also drag the selection onto another queue or use an export file for a controlled or cross-broker transfer.

This guide applies to Apache ActiveMQ Classic. QueueExplorer does not currently support ActiveMQ Artemis.

Before moving ActiveMQ messages

  • Confirm the source broker, destination broker, and exact source and target names.
  • Check that the target application can deserialize the body and understands the message properties.
  • Decide whether expiration, priority, persistence, grouping, and application identifiers should be preserved or changed.
  • Stop or pause consumers if a changing queue could make the selection ambiguous.
  • Save the selected messages before a production move.

Moving a message normally creates a send to the destination and removes the source copy. Broker-owned delivery state can be assigned again at the destination, so do not use the old queue position or delivery state as proof of identity. Use stable application identifiers and inspect the result.

1. Find and select the source messages

  1. Open the ActiveMQ Classic connection and select the source queue.
  2. Load a practical batch, then filter the displayed messages by body, JMS headers, or application properties.
  3. Inspect each candidate and select only the messages intended for the target.
ActiveMQ messages selected in QueueExplorer before a move
Inspect message content and properties before moving the selection

Filtering applies to the messages already loaded into QueueExplorer. If the required message is not in the initial batch, increase the load limit carefully. QueueExplorer Professional can extract business values from JSON, XML, or text payloads with JSON expressions, XPath, or regular expressions and show them as filterable columns.

2. Move the selected messages

Cut and paste

  1. Choose Cut from the context menu or toolbar.
  2. Open the target queue.
  3. Choose Paste and wait for the operation to finish.
Cut command for moving selected ActiveMQ messages in QueueExplorer
Cut the selection, open the destination queue, and paste it

Drag and drop

Drag the selected rows onto the destination queue in the broker tree. This is convenient when both queues are visible, but verify the highlighted destination before releasing the mouse.

Dragging an ActiveMQ message to another queue in QueueExplorer
Drag selected messages to a visible target queue

Export and import through a file

  1. Save the selected messages to a QueueExplorer .mq file.
  2. Open the target queue, including a queue on another connected broker, and load the file.
  3. Verify the target message count, bodies, and important properties.
  4. Return to the source and delete the originals only after successful verification.

The file workflow deliberately separates copying from deletion. It is useful for review, audit, cross-broker transfers, or any case where you want a recoverable checkpoint. It is not one distributed transaction across two brokers; failures can leave copies on both sides, so design the operation to tolerate duplicates.

Move dead-letter messages back for reprocessing

ActiveMQ Classic commonly sends poison messages to ActiveMQ.DLQ after the configured redelivery limit, although its dead-letter strategy can use individual dead-letter queues. Before replaying a message:

  1. Identify its original destination and the reason processing failed.
  2. Fix the consumer, payload, configuration, or dependency that caused the failure.
  3. Back up the message and move only the intended selection to the correct queue.
  4. Monitor the consumer and DLQ so a replay loop is detected quickly.

A shared DLQ can contain messages from several applications and original queues. Never move its entire contents to one destination merely because they share the same dead-letter queue.

Moving a queue message to a topic changes its delivery model

QueueExplorer can send a selected message to an ActiveMQ topic, but this is not equivalent to moving it to another queue. A topic publication is delivered to the subscribers eligible at that time. Each durable subscription has its own retained copy behavior, while disconnected non-durable subscribers miss the publication.

Use a topic only when fan-out is intentional. If exactly one application should process the message, a queue is usually the appropriate destination.

Ordering, duplicates, and expiration

  • Ordering: moved messages may join existing target messages and may not keep their former queue position.
  • Duplicates: a partial failure or retry can leave both source and destination copies. Consumers should use idempotency where possible.
  • Expiration: verify whether the target copy's lifetime matches the business requirement before replaying old data.
  • Groups: preserve and validate grouping properties when consumers depend on message groups.

Verify the transfer

  1. Refresh the target and confirm the expected number of messages arrived.
  2. Compare representative bodies, JMS headers, and application properties.
  3. Refresh the source and confirm that only the intended messages were removed.
  4. Resume consumers gradually and watch application errors, retries, and the DLQ.

Frequently asked questions

Can I move only some messages from an ActiveMQ queue?

Yes. Browse and filter the loaded messages, select the required rows, then use cut and paste or drag and drop.

Can I move messages between ActiveMQ brokers?

Yes. Export the selection to a QueueExplorer .mq file, import it into the target queue, verify the result, and only then delete the source copies. Treat the operation as copy-then-delete rather than an atomic distributed move.

Should I use this method for continuous routing?

No. Manual movement is suited to repair, testing, and controlled maintenance. Use broker or application routing for an ongoing flow, with monitoring and retry behavior designed for that route.

Related ActiveMQ guides

QueueExplorer: a better way to inspect and manage ActiveMQ

QueueExplorer desktop application for inspecting and managing ActiveMQ

See what is happening in ActiveMQ and resolve message problems without writing one-off tools. Browse queues and live topics, inspect message contents, and manage your ActiveMQ Classic brokers from one desktop application. Try it free on Windows, macOS, or Linux.

Download QueueExplorer     Learn more