You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Vanshul.Chawla" <Va...@target.com> on 2017/03/13 15:50:21 UTC

RE: [EXTERNAL] Re: Unable to set JMS_IBM_MQMD_ApplIdentityData using camel

Use this code

import org.springframework.jms.support.destination.DestinationResolver
import org.springframework.stereotype.Component

import javax.jms.Destination
import javax.jms.JMSException
import javax.jms.Session

@Component
class JmsDestinationResolver implements DestinationResolver {

    @Override
    Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException {
         session.createQueue("queue:///" + destinationName + "?targetClient=1")
    }
}


And set destination resolver wherever you create jms component

@Bean
    JmsComponent queueManager1(){

        JmsComponentBuilder jmsComponentBuilder = new JmsComponentBuilder(channel: wmqProperties.channel1,hostName: wmqProperties.hostName1, port: wmqProperties.port1,
                transportType: wmqProperties.transportType, username: wmqProperties.username, password: wmqProperties.password, logStatus: wmqProperties.logStatus, queueManager: wmqProperties.queueManager1)
        JmsComponent jmsComponent = jmsComponentBuilder.build()
        jmsComponent.setDestinationResolver(jmsDestinationResolver)
        jmsComponent
    }

-----Original Message-----
From: ravi21588 [mailto:ravi21588@gmail.com] 
Sent: Monday, March 13, 2017 9:44 AM
To: users@camel.apache.org
Subject: [EXTERNAL] Re: Unable to set JMS_IBM_MQMD_ApplIdentityData using camel

Hi Santhosh,
Can you please let me know how did you use destination resolver with Apache camel.
Iam using Jboss fuse service works 6.0,in which iam using switchyard as service delivery framework and camel as implementation.



--
View this message in context: http://camel.465427.n5.nabble.com/Unable-to-set-JMS-IBM-MQMD-ApplIdentityData-using-camel-tp5793781p5795366.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: [EXTERNAL] Re: Unable to set JMS_IBM_MQMD_ApplIdentityData using camel

Posted by ravi21588 <ra...@gmail.com>.
Hi Vanshul,
Thanks for the reply.
Iam using Jboss eap 6.1 and i have configured the connection factory and MQ
adapter as mentioned in below.I have setup SSL configuration etc.

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Deploy_the_WebSphere_MQ_Resource_Adapter.html

and iam using  switchyard jms component
https://docs.jboss.org/author/display/SWITCHYARD/JMS which is build upon
camel JMS.

I would like to the feasibility of enhancing the existing code to use
destination resolver.

in advance options in camel there is a possibility to set
destinationResolver.

Do you know how to use it?





--
View this message in context: http://camel.465427.n5.nabble.com/Unable-to-set-JMS-IBM-MQMD-ApplIdentityData-using-camel-tp5793781p5795373.html
Sent from the Camel - Users mailing list archive at Nabble.com.