ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » TopicPublisher.publish()

Post new topic  Reply to topic
 TopicPublisher.publish() « View previous topic :: View next topic » 
Author Message
techno
PostPosted: Wed Apr 09, 2003 9:19 pm    Post subject: TopicPublisher.publish() Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Does above method wait (does get stuck without doing anything), in case Publish/subscribe broker down?

I think I am doing something wrong. The program should be able to put the message. When the broker comes up, the message should be reaching subscriber queue from publications queue.

Topic t = sess.createTopic("my/Topic");
TopicPublisher pub = sess.createPublisher(t);
TextMessage hello = sess.createTextMessage();
hello.setText("Hello World");
pub.publish(hello);



Correct me,
shiva.
Back to top
View user's profile Send private message
techno
PostPosted: Thu Apr 10, 2003 7:44 am    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Added to that, above call publish() is waiting for some time (a minute or so) and finally giving an error saying that broker is not available, in case the broker is down.


Thanks
Shiva.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Apr 11, 2003 12:00 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

The publish will definitely "hang" if the broker isn't available. The publish message will go to the broker and a reply will come back. If the broker isn't running, the reply times out. Do you have your broker running? What broker are you running?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
techno
PostPosted: Fri Apr 11, 2003 2:21 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

I stopped broker running. Is it not that the publication should be existing in publication queue? Is it to be running always?

Thanks
Shiva.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » TopicPublisher.publish()
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.