Error publishing topic
Hi Friends,
I am using the MQ server fV 5.2 or windows 2000. I am trying to publish a message to a topic using the following code
com.ibm.mq.jms.MQTopicConnectionFactory tcf =
new com.ibm.mq.jms.MQTopicConnectionFactory();
tcf.setQueueManager("QM_d0413699");
tcf.setBrokerQueueManager("QM_d0413699");
com.ibm.mq.jms.MQTopic t = new com.ibm.mq.jms.MQTopic();
t.setBaseTopicName("FareRate");
TopicConnection conn = tcf.createTopicConnection();
conn.start();
TopicSession sess = conn.createTopicSession( false,
Session.AUTO_ACKNOWLEDGE );
TopicPublisher publisher = sess.createPublisher(t);
TextMessage msg = sess.createTextMessage();
msg.setText("Test Air Fare Data");
publisher.publish(msg);
This is the response I get::
Publishing messages : Exception in thread "main" com.ibm.mq.jms.NoBroker
ResponseException: MQJMS5053: *** The broker is not running! Please start it usi
ng 'strmqbrk' ***
at com.ibm.mq.jms.MQTopicSession.getBrokerResponse(MQTopicSession.java:1
730)
at com.ibm.mq.jms.MQTopicPublisher.checkBrokerResponse(MQTopicPublisher.
java:904)
at com.ibm.mq.jms.MQTopicPublisher.publish(MQTopicPublisher.java:342)
at com.ibm.mq.jms.MQTopicPublisher.publish(MQTopicPublisher.java:386)
at FarePublish.main(FarePublish.java, Compiled Code)
The MQ server is running properly and the specified Q Manager is also running. I have also setup the Queues needed for pub/sub as specified in the documentation.
The PSIVTRun also complains of the same problem.
What else is possible?
Advanced Thanks,
Ram

