Can Camel communicate over IBM MQ sender/receiver channels?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can Camel communicate over IBM MQ sender/receiver channels?

peterjca
I'm currently investigating the integration of a local ActiveMQ with a remote WebSphere MQ, with message sending and receiving to queues over (the IBM concept of) sender and receiver channels. I've not found anything definitive saying that it's possible and have yet to get a response to my posting on the ActiveMQ users forum. It doesn't sound at all promising.

Has anyone here managed to use Camel to communicate over the MQ sender/receiver channels?
Reply | Threaded
Open this post in threaded view
|

Re: Can Camel communicate over IBM MQ sender/receiver channels?

Ashwin Karpe
Hi,

Please check out the code below

Enjoy,

Ashwin...

----------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring
                http://camel.apache.org/schema/spring/camel-spring.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/spring">
        <route>
             <from uri="activemq:queue:foo"/>
             <to uri="wmq:queue:bar"/>
        </route>
    </camelContext>

   
        <bean id="wmq" class="org.apache.camel.component.jms.JmsComponent">
          <property name="connectionFactory">
            <bean class="com.ibm.mq.jms.MQConnectionFactory">
                        <property name="transportType" value="1"/>
                    <property name="hostName" value="localhost"/> 
                    <property name="port" value="1414"/> 
                    <property name="queueManager" value="QM_TEST"/> 
            </bean>
          </property>
        </bean>

</beans>
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
Red Hat
http://www.redhat.com

Blog:http://opensourceknowledge.blogspot.com
---------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Can Camel communicate over IBM MQ sender/receiver channels?

peterjca
Hi Ashwin,

Thanks for the response. However, I don't think this is what I need as this appears to simply be a queue to queue communication which I can already do with ActiveMQ. My situation has a connection factory that looks like:

            <bean class="com.ibm.mq.jms.MQConnectionFactory">
                     <property name="transportType" value="1"/>
                    <property name="hostName" value="localhost"/> 
                    <property name="port" value="1414"/> 
                    <property name="queueManager" value="QM_TEST"/>
                    <property name="channel" value="QM_RECEIVER_CHANNEL"/> 
            </bean>

Without Camel playing a role, this is what I experience:

o without the channel property I can do queue to queue as I mentioned above. That solution is not acceptable as all communications must be via the sender/receiver channels. I know this exchange does not involve the receiver channel as I have tested this scenario with the channel stopped.

o with the channel property I get exceptions from the Websphere side about remote channels not being of the correct type when ActiveMQ starts. I assume that's because MQ channels are an IBM invention and not a JMS concept, and are therefore not dealt with correctly just by having a connection factory defined as above. (If the channel is a server connection type then all is well, but that doesn't satisfy the requirements.)

So now I'm turning to abstractions on top of JMS for solutions, such as Camel, ServiceMix etc. Is there an abstraction in Camel (or anywhere else) that allows me to deal with the QM_RECEIVER_CHANNEL?
Reply | Threaded
Open this post in threaded view
|

Re: Can Camel communicate over IBM MQ sender/receiver channels?

Claus Ibsen-2
On Friday, May 27, 2011, peterjca <[hidden email]> wrote:

> Hi Ashwin,
>
> Thanks for the response. However, I don't think this is what I need as this
> appears to simply be a queue to queue communication which I can already do
> with ActiveMQ. My situation has a connection factory that looks like:
>
>             <bean class="com.ibm.mq.jms.MQConnectionFactory">
>                      <property name="transportType" value="1"/>
>                     <property name="hostName" value="localhost"/>
>                     <property name="port" value="1414"/>
>                     <property name="queueManager" value="QM_TEST"/>
>                     <property name="channel" value="QM_RECEIVER_CHANNEL"/>
>             </bean>
>
> Without Camel playing a role, this is what I experience:
>
> o without the channel property I can do queue to queue as I mentioned above.
> That solution is not acceptable as all communications must be via the
> sender/receiver channels. I know this exchange does not involve the receiver
> channel as I have tested this scenario with the channel stopped.
>
> o with the channel property I get exceptions from the Websphere side about
> remote channels not being of the correct type when ActiveMQ starts. I assume
> that's because MQ channels are an IBM invention and not a JMS concept, and
> are therefore not dealt with correctly just by having a connection factory
> defined as above. (If the channel is a server connection type then all is
> well, but that doesn't satisfy the requirements.)
>
> So now I'm turning to abstractions on top of JMS for solutions, such as
> Camel, ServiceMix etc. Is there an abstraction in Camel (or anywhere else)
> that allows me to deal with the QM_RECEIVER_CHANNEL?
>
>

No there is not. That channel stuff is ibm specific. Camel supports jms.

> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-Camel-communicate-over-IBM-MQ-sender-receiver-channels-tp4429050p4430351.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

--
Claus Ibsen
-----------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Reply | Threaded
Open this post in threaded view
|

Re: Can Camel communicate over IBM MQ sender/receiver channels?

peterjca
Thanks for the confirmation. This is exactly what I had expected. The client will either have to accept queue manager to queue manager, or buy another copy of WebSphere MQ :)

Thanks.