You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ajeets1978 <em...@ajeetsingh.info> on 2016/02/01 02:23:36 UTC

Looking for a Good CAMEL - WEBSHPERE MQ Integration Example

I am looking forward for IBM MQ / WEBSPHERE MQ & CAMEL Integration examples,
tried lot of available examples, none of them seems to be working even after
lot of efforts.

Things seems to be running bit fine with ActiveMQ, but no such good example
available anywhere, which implements the reading and writing to the MQ using
Apache CAMEL.

I am trying to use Apache CAMEL as a middleware for our core application. MQ
sending incoming request to this CAMEL Instance and forwarding it to our
core application and vice - versa for response.



--
View this message in context: http://camel.465427.n5.nabble.com/Looking-for-a-Good-CAMEL-WEBSHPERE-MQ-Integration-Example-tp5777086.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Looking for a Good CAMEL - WEBSHPERE MQ Integration Example

Posted by ajeets1978 <em...@ajeetsingh.info>.
I am new to apache camel and spring framework, Can i get some full working
example somehow.

Regards,



--
View this message in context: http://camel.465427.n5.nabble.com/Looking-for-a-Good-CAMEL-WEBSHPERE-MQ-Integration-Example-tp5777086p5777148.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Looking for a Good CAMEL - WEBSHPERE MQ Integration Example

Posted by Jimmy Selgen Nielsen <ji...@gmail.com>.
I’m doing something like the code below
(IbmWebsphereDestinationResolver is something like the one attached to this Jira ticket https://jira.spring.io/browse/SPR-3614)

==
@Configuration
@ComponentScan
public Class Config{

	public void beforeApplicationStart(CamelContext camelContext) {
		IBMWebSphereMqDestinationResolver ibmWebSphereMqDestinationResolver = new IBMWebSphereMqDestinationResolver();
		ibmWebSphereMqDestinationResolver.setTargetClient(1);

		MQQueueConnectionFactory connectionFactory= new MQQueueConnectionFactory();
		connectionFactory.setHostName('somewhere');
		try {
			connectionFactory.setPort(1414);
			connectionFactory.setChannel("SYSTEM.DEF.SVRCONN");
			connectionFactory.setTransportType(1);
			connectionFactory.setQueueManager("QUEUE_MANAGER_NAME");
			connectionFactory.setTargetClientMatching(true);
		} catch (JMSException | KeyManagementException | NoSuchAlgorithmException e) {
			throw new RuntimeException("Couldn't create MQQueueConnection",e);
		}

		JmsComponent wmq = new JmsComponent(camelContext);
		wmq.setConnectionFactory(connectionFactory);
		wmq.setDestinationResolver(ibmWebSphereMqDestinationResolver);
		final String componentName = "wmq";
		logger.info("Registering component {}", componentName);
		camelContext.addComponent(componentName, wmq);
	}
}
==

/J

> On 1. feb. 2016, at 02.23, ajeets1978 <em...@ajeetsingh.info> wrote:
> 
> I am looking forward for IBM MQ / WEBSPHERE MQ & CAMEL Integration examples,
> tried lot of available examples, none of them seems to be working even after
> lot of efforts.
> 
> Things seems to be running bit fine with ActiveMQ, but no such good example
> available anywhere, which implements the reading and writing to the MQ using
> Apache CAMEL.
> 
> I am trying to use Apache CAMEL as a middleware for our core application. MQ
> sending incoming request to this CAMEL Instance and forwarding it to our
> core application and vice - versa for response.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Looking-for-a-Good-CAMEL-WEBSHPERE-MQ-Integration-Example-tp5777086.html
> Sent from the Camel - Users mailing list archive at Nabble.com.