I have configured two servers by side, one Active MQ and one WebSphere MQ 8.0, in order to communicate each other I've configured an Apache Camel in the middle, which receives messages from Active MQ and send them to WebSphere. Right now Camel is able to receive messages from Active MQ server, but when it tries to send them to the WebSphere MQ it throws the error:
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2540;AMQ9204: Connection to host '10.0.0.122(1414)' rejected. [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 am able to connect Camel to the WebSphere QueueManager with a user, but not the the channel that is created, the configuration for the camel side in order to connect to the WebSphere server is:
<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 that I've created the Server-Connection channel is by going to the WebSphere MQ Explorer, select queue manager, create new Server-Connection channel, set the appropiate username in the MCA User Field.
As a suggestion of @shashi in his answer below I've run the command DIS CHANNEL() 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 will be really helpfull
Thanks in advance
MQRC 2540 means the queue manager did not recognize the channel name provided by the client.
In MQ the object names are case sensitive. Ensure the channel name you have provided in Camel configuration matches the one you created in MQ Explorer.