Greetings! Apologies for replying to / reviving such an old thread. http://camel.465427.n5.nabble.com/JMS-message-selector-problem-with-IBM-MQ-when-doing-request-reply-MEP-InOut-tt5746670.html#none
Fernando originally wrote, that while using WebSphere MQ and a single shared reply queue, the generated JMS "selector grows (JMSCorrelationID='1' OR JMSCorrelationID='2' OR ...) and MQ returns a 2519 error (MQRC_SELECTION_STRING_ERROR)." According to https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.javadoc.doc/WMQJMSClasses/constant-values.html The maximum JMS selector string length is 10240. len(" OR JMSCorrelationID='ID:574d51373053616d706c65436f7272656c6174696f6e4944'") # 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 "not 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 DefaultMessageListenerContainer? We were thinking maybe to use... 1. multiple listeners? Is this possible / recommended with Camel? But even so, 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 "select" the wrong messages from the shared reply queue. 4. a JMS to JMS bridge. Use another JMS broker (ActiveMQ) to route messages to WebSphere MQ and use temporary reply queues between our client code and ActiveMQ. Any advice / thoughts / war stories would be appreciated! Take care all! Cheers! :-) Ben. -- Benjamin Lee mailto:benjamin....@realthought.net Melbourne, Australia http://www.realthought.net 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: http://camel.465427.n5.nabble.com/JMS-message-selector-problem-with-IBM-MQ-when-doing-request-reply-MEP-InOut-tp5746670p5784448.html Sent from the Camel - Users mailing list archive at Nabble.com.