How to gurantee AMQ to WebSphere MQ message delivery using camel bridge ?

Solution Verified - Updated -


  • We are using Camel to bridge JBoss AMQ (AMQ) and WebSphereMQ (WMQ). All messages must be delivered 1 at a time and in order.
  • Camel is successfully delivering the message. The problem occurs when the connection between AMQ and WMQ is lost, such as the WMQ Channel being stopped. We can't seem to guarantee delivery.

  • We have tried the following scenarios and no luck so far:

    • When the connection exception occurs, we place the message on a dead letter queue. This solution is unacceptable. When the connection returns, messages start flowing again before we can resend the messages from the dead letter queue. All messages MUST be sent in order.
      We set the maximumRedeliveries="-1". Messages are removed from AMQ and go into Camel's Inflight status. When the connection is reestablished, the messages are delivered to WMQ. Unfortunately, if AMQ is stopped for any reason before the connection is reestablished, the messages in Inflight status are lost.

Here's the problem summary in short:

JBoss EAP 6 (server 1) --> AMQ Broker A (server 2) --> Camel (server 2) --> IBM MQ Broker B (server 3)

Any message picked up from A must be rolled back and stay in the queue. When broker B is down, the messages should stay in A, until B is up again. When turning off Camel, no messages should be lost and you want to shutdown the camel route at any given time, messages in-flight should be rolled back and stay in broker A and they should not be lost.


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.4.x
    • fuse-eap-installer
  • Red Hat JBoss Fuse
    • 6.x
  • Apache Camel
    • camel-jms
  • Apache ActiveMQ
    • activemq-camel

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content