camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benjaminlee <>
Subject Re: JMS message selector problem with IBM MQ when doing request/reply (MEP InOut)
Date Mon, 27 Jun 2016 12:07:43 GMT
Greetings! Apologies for replying to / reviving such an old thread.

Fernando originally wrote, that while using WebSphere MQ and a single shared
queue, the generated JMS "selector grows (JMSCorrelationID='1' OR
JMSCorrelationID='2' OR ...) and MQ returns a 2519 error

According to

The maximum JMS selector string length is 10240.

len(" OR
# 74

Thus, the maximum in-flight messages is 10240 / 74 = ~138.

Claus suggested to use the replyToDestinationSelectorName option but this
header *must be* returned in the message replies. Also, we must be careful
to use the same selector name on the same shared queue for other routes /
Camel apps, etc."

So, my question is, if we *do not* have control over the JMS headers in the
message replies, is there another reasonable work around for limiting the
length of the JMS selector used by the Spring

We were thinking maybe to use...

1. multiple listeners? Is this possible / recommended with Camel? But even
this feels like an anti pattern where we could end up with one listener per
JMS message... :-(

2. multiple identical routes? So this is similar to [1] but we could still
exceed the maximum JMS selector length depending on our workloads.

3. a custom UUID generator *and* a fixed selector using LIKE
'some-known-prefix-unique-to-some-context-%'. This feels quite complicated
because how do we guarantee that our selector implementation does not
the wrong messages from the shared reply queue.

4. a JMS to JMS bridge. Use another JMS broker (ActiveMQ) to route messages
WebSphere MQ and use temporary reply queues between our client code and

Any advice / thoughts / war stories would be appreciated!

Take care all!
Cheers! :-)

Benjamin Lee                 
Melbourne, Australia                  
Linux / BSD / GNU                                     tel:+61 4 16 BEN LEE
Open Source               "invest in your world"
Man is a rational animal who always loses his temper when he is called upon
to act in accordance with the dictates of reason.
                -- Oscar Wilde

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message