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 » General IBM MQ Support » Will MQ listener work whenever the sender's server restarts

Post new topic  Reply to topic
 Will MQ listener work whenever the sender's server restarts « View previous topic :: View next topic » 
Author Message
deeptinayak
PostPosted: Wed Mar 16, 2005 3:03 am    Post subject: Will MQ listener work whenever the sender's server restarts Reply with quote

Newbie

Joined: 16 Mar 2005
Posts: 2

I have two application out of which one sends messages to a queue and the other listens to these messages.

My listener checks for a new message using receiveNoWait and sleeps for 2 min before checking again.

So in case my sender server is restarted and in the meantime, we are trying to access the queue, will my listener get any error?

Deepti
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 16, 2005 5:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You'd be a lot better off doing a receive with wait for 2 minutes, and not sleeping between calls.

Then for sure you will get an error thrown when/if the connection fails, you will process messages as soon as they arrive, rather than up to 2 minutes later, and you'll make much better use of your system processing and your MQ resources.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
deeptinayak
PostPosted: Wed Mar 16, 2005 5:25 am    Post subject: Reply with quote

Newbie

Joined: 16 Mar 2005
Posts: 2

My question was: In case I am trying to access a message from a queue whenever my sender's server is restarted, will I get an exception at Client's end?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 16, 2005 5:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I answered that question. I also gave you a suggestion for how to improve your process - if your requirements do not force you to sleep for 2 minutes.

Have you looked at the documentation?

Have you tried unplugging a test machine from the network?

Yes, you will get an exception thrown when you attempt to use an invalid handle.

The Using Java manual or the Using C++ manual should be fairly explicit on that point.
_________________
I am *not* the model of the modern major general.
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 » General IBM MQ Support » Will MQ listener work whenever the sender's server restarts
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.