|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Will MQ listener work whenever the sender's server restarts |
« View previous topic :: View next topic » |
Author |
Message
|
deeptinayak |
Posted: Wed Mar 16, 2005 3:03 am Post subject: Will MQ listener work whenever the sender's server restarts |
|
|
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 |
|
 |
jefflowrey |
Posted: Wed Mar 16, 2005 5:16 am Post subject: |
|
|
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 |
|
 |
deeptinayak |
Posted: Wed Mar 16, 2005 5:25 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Wed Mar 16, 2005 5:46 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|