简体   繁体   中英

How to migrate from activeMQ to ibmMQ in camelContext configuration?

I am currently using AciveMQ for routing purpose. But now i need to migrate to ibmMq. Here is my camelContext.xml configuration for AciveMq. Please help me with ibmMq config.. Thanks in advance.

<bean id="jmsConnectionFactory"
          class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>

    <bean id="pooledConnectionFactory"
          class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop">
        <property name="maxConnections" value="8"/>
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
    </bean>

    <bean id="jmsConfig"
          class="org.apache.camel.component.jms.JmsConfiguration">
        <property name="connectionFactory" ref="pooledConnectionFactory"/>
        <property name="concurrentConsumers" value="10"/>
    </bean>
<camelContext xmlns="http://camel.apache.org/schema/spring">
    <bean id="activemq"
          class="org.apache.activemq.camel.component.ActiveMQComponent">
        <property name="configuration" ref="jmsConfig"/>
    </bean>

<route id="*****">
            <from uri="+++++++++" />
            <choice>
                    <to uri="activemq:queue:**********"/>
                            </choice>
        </route>
    </camelContext>

Can anybody help me change all my configuration with respective to IBMmq I am new to IBMmq :(

Here I managed to configure with ibm mq :)

<broker xmlns="http://activemq.apache.org/schema/core"
          brokerName="${broker-name}"
          dataDirectory="${data}"
          start="false">
    ...
  </broker>
  ...
  <!-- Configure IBM WebSphere MQ connection factory -->
  <bean id="weblogicConnectionFactory"
        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>

  <bean id="weblogicConfig" 
        class="org.apache.camel.component.jms.JmsConfiguration">
    <property name="connectionFactory" ref="weblogicConnectionFactory"/>
    <property name="concurrentConsumers" value="10"/>
  </bean>

  <bean id="weblogic" 
        class="org.apache.camel.component.jms.JmsComponent">
    <property name="configuration" ref="weblogicConfig"/>
  </bean>

Successfully :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM