Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to ActiveMQ broker using IBM client

In my test I run inmem ActiveMQ and then instantiate ActiveMQConnectionFactory and do whatever I want in order to test it. I used this because that seemed to be the easiest way to create integration test. I thought the switch from ActiveMQConnectionFactory to com.ibm.mq.jms.MQTopicConnectionFactory would be straightforward. But it apparently is not. What would be the mapping from this snippet

<bean id="activeMqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
        <constructor-arg value="vm://localhost:61616"/>
</bean>

to that one:

<bean id="ibmConnectionFactory" class="com.ibm.mq.jms.MQTopicConnectionFactory">
    <property name="hostName" value="??"/>
    <property name="port" value="??"/>
    <property name="queueManager" value="??"/>
    <property name="channel" value="??"/>
    <property name="transportType" value="?"/>
</bean>

Would that be even possible without some kind of weird bridges Camel has?

like image 780
Marcin Szymaniuk Avatar asked Feb 19 '23 11:02

Marcin Szymaniuk


1 Answers

This is not possible. The JMS specification covers the API and behavior but vendors are free to implement any wire format and communication protocols that they wish. WebSphere MQ uses it's own formats and protocols and Active MQ has its own formats and protocols.

Bridge applications function by reading messages into memory from one transport then writing that message to the other transport. Although this works at a basic level, the two transports have different destination namespaces and security realms so these interfaces tend to be hard-coded point-to-point routes. This is usually the best you can expect when mixing JMS transport providers.

like image 176
T.Rob Avatar answered Feb 28 '23 09:02

T.Rob