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 » polling vs. wait indefinite

Post new topic  Reply to topic
 polling vs. wait indefinite « View previous topic :: View next topic » 
Author Message
ivanachukapawn
PostPosted: Tue Feb 28, 2006 6:06 am    Post subject: polling vs. wait indefinite Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

I have a situation whereby a developer has designed/developed a solution whereby a child thread is doing gets in a 500ms loop. This developer is complaining about voluminous 2033 messages written to sysout and is asking about how to "turn them off".
I suggested that he have this child thread do a get with an indefinite wait.
The developer objects to this suggestion on the grounds that the child thread would then be "unstoppable" by virtue of its blocking on the get.
Does anybody have an design opinion which can solve this problem?

auxiliary question: Is there a wait to suppress 2033 messages going to sysout?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 28, 2006 6:23 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

At the risk of missing the point, if he has designed/developed this solution, isn't it his designed/developed code writing to sysout? If so, one possible solution would surely be some conditional logic along the lines of:

Code:
If code <> 2033 Then
            write code to sysout
 end if


Certainly this is the kind of thing I've used successfully in the past. 2033 is only an error if you were pretty certain you should be finding a message (request/reply model or similar). Certainly in this kind of polling transaction you're going to get 2033 and need to deal.

As to an indefinate wait, I'm fairly certain it will be terminated when the queue manager comes down if FAIL_IF_QUIESCING is specified. Another dodge I've commonly seen used is to design/develop the application to accept "stop" messages as well as the expected transactional stuff. Depends really under what circumstances you expect to need to stop the thread.

Just my view, not holy writ. Hope it's useful.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
clindsey
PostPosted: Tue Feb 28, 2006 7:11 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Another common way to end an application that is blocked on an indefinite wait is to set the queue to get disabled.

Also, I suspect your developer's code is written in java. Tell him to add
MQException.log = null;
early in his code and the system out messages will stop.

Charlie
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 » polling vs. wait indefinite
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.