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 » WebSphere Message Broker (ACE) Support » Using MQGet to empty the queue - STACK OVERFLOW

Post new topic  Reply to topic Goto page Previous  1, 2
 Using MQGet to empty the queue - STACK OVERFLOW « View previous topic :: View next topic » 
Author Message
smdavies99
PostPosted: Tue Feb 03, 2009 10:40 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

[quote="Esa"]
But if you loop in a compute node or a java compute node and call the MQGet node from within that loop by propagating some message, the call will return back to the compute node after each message read from the MQGet queue. And, as you can read from between the lines of mgks post, the memory allocated for each message is released immediately after it has been handled.

Well, actually the memory is not released to the operating system but some MB internal memory buffer where it is - hopefully - immedially availabe for other message flow threads. What I was not sure about was if any memory allocated by nodes could be released while the thread is still running or only after it has terminated.[/quote]

That is the exact reason for my suggestion that the flow sending a message to itself to continue its work and then ending its current UOW after the 'loop' of MQGet, Compute has been executed a number of times.

This is the principle I use on a flow that has to retrieve 10,000 messages from a DB and send them for processing. Conservation of resources.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
francoisvdm
PostPosted: Wed Feb 04, 2009 1:17 am    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

If you really HAVE to do this...here is how to do it:

In a compute node have the following code:

Code:
SET LoopMe = 1;
      WHILE LoopMe = 1 DO
         PROPAGATE TO TERMINAL 'out';
      END WHILE;
      RETURN FALSE;


Following the compute node insert the MQGet node.

Connect the "Out" terminal of the MQGet node to nothing...or something if you want to.

Connect all other nodes of the MQGet node to a Compute node with the following code
Code:
SET LoopMe = 0;
      RETURN TRUE;


An das a global have
Code:
DECLARE LoopMe  SHARED INTEGER;


Ugly...but it works
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
shalabh1976
PostPosted: Wed Feb 04, 2009 2:53 am    Post subject: [SOLVED]Using MQGet to empty the queue - STACK OVERFLOW Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Hi all,
Use of Propagate has solved the problem. Obviously the looping on the MQGet has also been removed.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using MQGet to empty the queue - STACK OVERFLOW
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.