Hi You can set a custom JMSCorrelationID which is 24 chars or less. Just add it as a Camel Header. In the future you can plugin a different UUID generator and have one which comply with 24 chars or less.
On Wed, May 26, 2010 at 3:46 PM, omarito <[email protected]> wrote: > > Hi Claus, > > The MQ version that we are using is 6.1. > > I thing this is not a restriction in JMS but in IBM MQ itself. I didn't add > this in the first post but the communication is from a JMS client to a non > JMS MQ. Using a destination resolver I was able to add this property on the > destination queue. Please find below the code to add this property to the > destination: > > public Destination resolveDestination(Session session, String > destinationName, boolean b) > { > MQQueue destination = > ((MQQueueSession)session).createQueue(destinationName); > destination.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ); > return destination; > } > > I think is why the correlation id is being truncated. In our implementation > the queue in MQ must be defined as a Native Queue since the message is > retrieved by a mainframe program. > > Please find below IBM document for writing Java applications that interact > with IBM MQ. > > http://www-01.ibm.com/support/docview.wss?uid=pub1sc34659100 > > Omar > > > Claus Ibsen-2 wrote: >> >> Hi >> >> I spoke to a couple of AMQ committers and they do not recall any >> restrictions etc on the length of the correlation ID in the JMS spec. >> So why would IBM restrict it to only 24 chars? >> >> Do you know of any such restrictions in the JMS spec? >> >> And do you have a link to some online IBM docs which specifies the 24 >> char length? >> As I would like to add a FAQ entry for Camel. >> >> I will also create a ticket to allow pluggable UUID generators. So you >> can plugin a more MQ friendly. >> >> And btw What version of MQ are you using? >> >> >> >> On Tue, May 25, 2010 at 12:49 PM, omarito <[email protected]> wrote: >>> >>> The exchange pattern that I am using is InOut in the JMS Endpoint. My >>> route >>> basically recieves a byte[] from a mina endpoin, transform the data, >>> prepare >>> the data, send it to MQ thorugh JMS endpoint, do som postprocessing after >>> receiving the data from MQ and return it back through mina endpoint. >>> >>> <route> >>> <from ref="minaEndpoint"/> >>> <transform> >>> <method bean="transformer" method="transformRequest"/> >>> </transform> >>> <bean ref="processor" method="prepare"/> >>> <to uri="jmsEndpoint:queue:xxxx.xxx.REQUEST?replyTo=xxxx.xxx.RESPONSE" >>> pattern="InOut"/> >>> <bean ref="processor" method="processResponse"/> >>> <transform> >>> <method bean="transformer" method="transformResponse"/> >>> </transform> >>> </route> >>> >>> After some debuging yesterday I found that the correlationId that the JMS >>> Endpoint creates is 32 characters long (using UUID a believe!) and the >>> message in the reply queue is 24 characters long. Looking thorugh IBM's >>> documentation the correlationId must be 24 characters long. I believe >>> this >>> is the problem but maybe I am not 100% sure. >>> >>> Thanks! >>> Omar >>> >>> >>> willem.jiang wrote: >>>> >>>> Can I have a look at your camel route configure? >>>> What's your message exchange pattern ? >>>> >>>> Willem >>>> omarito wrote: >>>>> HI to all, >>>>> >>>>> I am having some difficulties getting back the response received on the >>>>> ReplyTo queue from our Websphere MQ Server. Using the MQ explorer I see >>>>> the >>>>> message in the ReplyTo queue but my JMS comsumer is not picking it up. >>>>> Please find below my spring configuration: >>>>> >>>>> <bean id="jmsEndpoint" >>>>> class="org.apache.camel.component.jms.JmsComponent"> >>>>> <property name="connectionFactory" >>>>> ref="myProxyConnectionFactory"/> >>>>> <property name="useVersion102" value="true"/> >>>>> <property name="acknowledgementModeName" >>>>> value="AUTO_ACKNOWLEDGE"/> >>>>> <property name="camelContext" ref="camelContext"/> >>>>> <property name="destinationResolver"> >>>>> <bean >>>>> class="com.xxx.xxx.xxx.camel.endpoint.CustomDestinationResolver"/> >>>>> </property> >>>>> <property name="transacted" value="true"/> >>>>> <property name="transactionManager" >>>>> ref="jmsTransactionManager"/> >>>>> </bean> >>>>> >>>>> <bean id="jmsTransactionManager" >>>>> class="org.springframework.jms.connection.JmsTransactionManager102"> >>>>> <property name="connectionFactory" >>>>> ref="proxyConnectionFactory"/> >>>>> <property name="pubSubDomain" value="false"/> >>>>> </bean> >>>>> >>>>> <bean id="proxyConnectionFactory" >>>>> >>>>> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter"> >>>>> <property name="targetConnectionFactory" >>>>> ref="jmsConnectionFactory"/> >>>>> <property name="username" value="${jms.endpoint.user}"/> >>>>> <property name="password" value="${jms.endpoint.password}"/> >>>>> </bean> >>>>> >>>>> <bean id="jmsConnectionFactory" >>>>> class="com.ibm.mq.jms.MQQueueConnectionFactory"> >>>>> <property name="transportType"> >>>>> <util:constant >>>>> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP"/> >>>>> </property> >>>>> <property name="queueManager" >>>>> value="${jms.endpoint.queueManager}"/> >>>>> <property name="channel" value="${jms.endpoint.channel}"/> >>>>> <property name="hostName" value="${jms.endpoint.host}"/> >>>>> <property name="port" value="${jms.endpoint.port}"/> >>>>> </bean> >>>>> >>>>> Any help will be gladly appreciated. Thanks in advance. >>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/Websphere-MQ-ExchangeTimedOutException-tp28659946p28666889.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> > > -- > View this message in context: > http://old.nabble.com/Websphere-MQ-ExchangeTimedOutException-tp28659946p28681005.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
