All, 

I have the following Camel Route:

AMQ JMS Queue 1 --> CamelTransport (Direct) --> Camel-CXF Endpoint --> AMQ
JMS Queue 2

The problem is that messages are arriving in JMS Queue 2 *out of order*.

The cause of the problem appears to be due to the fact that Camel CXF is
processing messages using a deafult workQueue which is multi-threaded.

Even though messages are dispatched from JMS Queue 1 in order, the CXF
endpoint is not processing them in order. The CXF endpoint consumer can be
slow, so it is possible for the first message processing on
default-workqueue-1 to be stuck while the second message gets processed
quickly on the default-workqueue-2 thread.

Some more details:

The route consuming on JMS Queue 1 is a single consumer to maintain message
order using Camel/SpringJMS.
The Consumer is transactional using Spring JMSTransactionManager.
Using Camel 2.13, AMQ 5.10, and CXF 2.7 all inside Wildfly container 8.1.

What are my options? 

Is there any way to enlist in a single transaction from JMS Queue 1 to JMS
Queue 2, through CXF so that multiple messages are never sent to CXF? I have
tried this using local Spring TXNs but does not work. This could be bigger
problem with potential message loss.

Is there any way to reduce the number of threads used by the default
WorkQueue in CXF to 1?

Using Camel CXF with the JMSConfig with a single consumer may work. However,
when I tried that, it created other issues when using WS-Security (see my
previous post
http://camel.465427.n5.nabble.com/CXF-Inteceptor-Error-handling-with-Camel-CXF-JMS-and-ActiveMQ-tp5758297.html).

Any help is appreciated. Thanks, 

-g8torPaul



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-Message-Order-using-Camel-JMS-and-CXF-tp5763503.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to