|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Migrating client appl from WMQ6 jars to WMQ7 jars |
« View previous topic :: View next topic » |
Author |
Message
|
rtarasov |
Posted: Tue Dec 10, 2013 10:53 pm Post subject: Migrating client appl from WMQ6 jars to WMQ7 jars |
|
|
Newbie
Joined: 10 Dec 2013 Posts: 2
|
Hi Guys,
Have a problem migrating client application from WMQ 6 to WMQ 7 client jars.
The problem appears when I try to connect to topics residing on broker queue manager
in the cluster containing two queue managers(one is GATE another HUB).
With WMQ6 jars the subscriptions are correctly created on broker QM(HUB).
With WMQ7 jars the subscriptions are created on the GATE QM and do not reach the broker QM.
When I connect directly to the HUB QM with WMQ7 jars everything works too.
As far as the below code is working fine with WMQ6 jars I suppose that the problem is in client configuration when I move to WMQ7 jars.
Probably something is missing in factory config. Correct me if I wrong.
We use WMQ version 7.0.1.8.
In order to connect to the topics I use the next MQTopicConnectionFactory:
....
Code: |
factory = new MQTopicConnectionFactory();
factory.setCCSID(environment.getMqCCSid());
factory.setPort(environment.getMqHostPort());
factory.setHostName(environment.getMqHostName());
factory.setQueueManager(environment.getMqQueueManager());//GATE
factory.setChannel(environment.getMqChannel());
factory.setBrokerSubQueue(environment.getMqTemporarySubQueueName());
factory.setBrokerControlQueue(environment.getMqControlQueue());
factory.setBrokerQueueManager(environment.getMqSubQueueManager());//HUB
//this line is changed from: factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setTransportType(WMQConstants.WMQ_CM_CLIENT);
topicConnection = (MQTopicConnection) factory.createTopicConnection();
topicConnection.start();
topicConnection.setExceptionListener(topicConnectionExceptionListener);
|
....
and later on to subscribe to topic:
....
Code: |
public synchronized TopicSubscriber subscribe(IMQTopic topic)
throws JMSException {
try {
MQTopicSession session = (MQTopicSession) topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
topicSessionList.add(session);
Topic tp = session.createTopic(topic.getName());
TopicSubscriber subscriber = session.createSubscriber(tp);
return subscriber;
} catch (JMSException exception) {
if (SupportedMQExceptions.isExceptionSupported(exception)){
topicConnectionExceptionListener.onException(exception);
} else {
throw exception;
}
}
return null;
} |
....
Could you please give me a hint what is wrong?
Regards,
Roman. |
|
Back to top |
|
 |
gs |
Posted: Mon Dec 16, 2013 12:26 am Post subject: |
|
|
 Master
Joined: 31 May 2007 Posts: 254 Location: Sweden
|
Do you get any exception and in that case what?
Also note that Pub/Sub functionality was moved to WMQ with version 7.0. |
|
Back to top |
|
 |
rtarasov |
Posted: Mon Dec 16, 2013 6:52 am Post subject: |
|
|
Newbie
Joined: 10 Dec 2013 Posts: 2
|
Hi gs,
I don't get any exceptions on client side. Subscribing to topics without any problems but later can see that subscriptions are not created on the broker QM and subsequently messages are not coming from the topics.
I can reach the queues defined on the broker QM(but not topics).
Tried to trace both GATE QM and HUB QM(broker QM) but can't get anything from the trace except for some MQRC_NO_MSG_AVAILABLE, MQRC_PROPERTY_NOT_AVAILABLE at the GATE and HUB. Even more the trace generated by the GATE QM in the case I connect with WMQ 6 jars generates additionally MQRC_OBJECT_IN_USE and MQRC_SELECTOR_ERROR.
Quote: |
Also note that Pub/Sub functionality was moved to WMQ with version 7.0. |
What it could mean from client's point of view? Should it be transparent?
Thanks in advance,
Roman. |
|
Back to top |
|
 |
Michael Dag |
Posted: Mon Dec 16, 2013 8:18 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|