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 API Support » How to disconnect a GET wait unlimited queue?

Post new topic  Reply to topic
 How to disconnect a GET wait unlimited queue? « View previous topic :: View next topic » 
Author Message
rgarcia
PostPosted: Fri Oct 31, 2003 5:57 am    Post subject: How to disconnect a GET wait unlimited queue? Reply with quote

Newbie

Joined: 12 Nov 2002
Posts: 5

I need to end a java application wich have a queue blocked on a GET call (wait unlimited). I know I can put a dumb quit message into the queue and process it to finish the thread, but I would like to know if there's some other way to do it...

Thanks.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Oct 31, 2003 7:23 am    Post subject: Reply with quote

Jedi Knight

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

You can either send the quit message or change the get to have a wait limit and check something else. I think this scenario is one of the reasons that people are discourage from using the wait unlimited.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
dgolding
PostPosted: Fri Oct 31, 2003 7:26 am    Post subject: Reply with quote

Yatiri

Joined: 16 May 2001
Posts: 668
Location: Switzerland

AFAIK the only way you get out of a WAIT_UNLIMITED is:

1) Get a message (obviously)
2) Specify MQGMO_FAIL_IF_QUIESCING in the GetMessageOptions, and shut down the queue manager - that's a bit drastic.

If it's Unix you can think about a signal handler to trap a kill -1, then exit. I'm not too sure if you can do that in Java.

How about receiving a message with a high priority (i.e. not zero) - and this is a control message to shutdown?

HTH
Back to top
View user's profile Send private message Visit poster's website
bob_buxton
PostPosted: Sat Nov 01, 2003 4:25 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

You could Get-Disable the queue
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
rgarcia
PostPosted: Tue Nov 04, 2003 3:40 am    Post subject: Reply with quote

Newbie

Joined: 12 Nov 2002
Posts: 5

Thanks for your answers, but:

1.- I can't put a dumb message in the queue because there is more than one application that is using that queue, and I'm not sure which of them will get the message.

2.- I tried to Get-Disable the queue from another thread but I can't if it's locked in a get call. In fact, I think that is the QueueManager object that obtained the queue who is locked, and no operation can be done until the queue get call gets unlocked.
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Tue Nov 04, 2003 6:29 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

rgarcia wrote:
Thanks for your answers, but:

1.- I can't put a dumb message in the queue because there is more than one application that is using that queue, and I'm not sure which of them will get the message.

2.- I tried to Get-Disable the queue from another thread but I can't if it's locked in a get call. In fact, I think that is the QueueManager object that obtained the queue who is locked, and no operation can be done until the queue get call gets unlocked.


The Inhibit Get technique would also effect all the applications using the queue. If each of your applications was using different message selection criteria you could target a Quit message to a specific application but in general I don't know of a way to end a spedific waiter other than cancelling the process.

There should be no reason that you can't inhibit get on a queue whilst another handle has a get wait outstanding.
What platform are you running on?
What open options are your handles using?
What reason codes are your MQ calls returning?
The setting handle must have speified MQOO_SET and should not specify MQOO_INPUT_EXCLUSIVE since that would cause a conflict with the other handle.
_________________
Bob Buxton
Ex-Websphere MQ Development
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 API Support » How to disconnect a GET wait unlimited queue?
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.