"Channel not defined remotely" when connecting from a camel to a WebSphere MQ server

I configured two servers, one Active MQ and one WebSphere MQ 8.0, to communicate with each other, I configured Apache Camel in the middle, which receives messages from Active MQ and sends them to WebSphere. Right now, Camel can receive messages from the Active MQ server, but when it tries to send them to WebSphere MQ, it gives an error:

Called: com.ibm.mq.jmqi.JmqiException: CC = 2; RC = 2540; AMQ9204: Disconnected connection to host '10 .0.0.122 (1414). [1 = com.ibm.mq.jmqi.JmqiException [CC = 2; RC = 2540; AMQ9520: Channel not defined remotely. [3 = channel.test]], 3 = 10.0.0.122 (1414), 5 = RemoteConnection.analyseErrorSegment]

I can connect Camel to WebSphere QueueManager with a user, but not to the channel that was created, the camel side setting for connecting to the WebSphere server:

    <bean id="weblogicConnectionFactory"
       class="com.ibm.mq.jms.MQConnectionFactory">
   <property name="hostName" value="10.0.0.122"/>
   <property name="port" value="1414"/>
   <property name="queueManager" value="TESTQ"/>
   <property name="channel" value="channel.test"/>
   <property name="transportType" value="1"/>
 </bean>

 <bean id="myProxyConnectionFactory" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
   <property name="targetConnectionFactory" ref="weblogicConnectionFactory"/>
   <property name="username" value="administrator"/>
   <property name="password" value="control123!"/>
  </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>

And the way I created the Server-Connection channel is to go to WebSphere MQ Explorer, select the queue manager, create a new Server-Connection channel, set the appropriate username in the User MCA field.

As @shashi's suggestion in his answer below, I executed the DIS CHANNEL () command with the following output:

    1 : DIS CHANNEL('channel.test')
AMQ8414: Display Channel details.
   CHANNEL(channel.test)                   CHLTYPE(SVRCONN)
   ALTDATE(2015-07-22)                     ALTTIME(00.16.25)
   COMPHDR(NONE)                           COMPMSG(NONE)
   DESCR( )                                DISCINT(0)
   HBINT(300)                              KAINT(AUTO)
   MAXINST(999999999)                      MAXINSTC(999999999)
   MAXMSGL(4194304)                        MCAUSER(mqm)
   MONCHL(QMGR)                            RCVDATA( )
   RCVEXIT( )                              SCYDATA( )
   SCYEXIT( )                              SENDDATA( )
   SENDEXIT( )                             SHARECNV(10)
   SSLCAUTH(REQUIRED)                      SSLCIPH( )
   SSLPEER( )                              TRPTYPE(TCP)

Any help would be really helpful.

Thanks in advance

+4
source share
1 answer

MQRC 2540 means that the queue manager did not recognize the channel name provided by the client.

MQ . , , Camel, , MQ Explorer.

+1

Source: https://habr.com/ru/post/1598458/


All Articles