Spring integration support for Clustered/high availability IBM MQ manager

让人想犯罪 __ 提交于 2019-12-24 01:05:59

问题


I am using spring integration to connect with the IBM MQ. My spring integration application is connecting successfully with IBM MQ. Now the MQ team made the MQ manager as the clustered manager i.e. queue manager is containing 2 host one active and one passive because if one host is down the passive one will up and running. Below is my spring integration configuration for MQ and I can pass only one host.

<bean id="mqQueueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
        <property name="hostName" value=""/>
        <property name="port" value=""/>
        <property name="channel" value=""/>
        <property name="queueManager" value=""/>
        <property name="transportType" value="1"/>
    </bean>

Is there any way by which we can pass both the active and passive host's from the configuration. I tried with the comma in host but that is not supported .

Please suggest


回答1:


You should specify the hosts under the property connectionNameList, don't use hostName and port.

http://www-01.ibm.com/support/docview.wss?uid=swg21397867

Multi Instance MQ set up




回答2:


The ConnectionNameList will allow to pass the active and passive host

 <bean id="mqQueueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
        <property name="connectionNameList" value="activeHost(port),passiveHost(port)"/>
        <property name="channel" value="channel Name"/>
        <property name="queueManager" value="Queue Manager name"/>
        <property name="transportType" value="transport type"/>
  </bean>


来源:https://stackoverflow.com/questions/36314524/spring-integration-support-for-clustered-high-availability-ibm-mq-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!