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 » Fetch all messages from Mq Queue

Post new topic  Reply to topic
 Fetch all messages from Mq Queue « View previous topic :: View next topic » 
Author Message
AskMe
PostPosted: Thu Sep 15, 2011 3:29 am    Post subject: Fetch all messages from Mq Queue Reply with quote

Newbie

Joined: 15 Sep 2011
Posts: 2

Hi All,

I have to fetch all messages from Queue available and send an email having all messages and this should happen daily. how to achive this scenario. Currently in my scenario i am using timeoutcontrol node and timeout notification node but what is happening is only one message is picked up daily remaining mesages wait for next trigger which happen next day
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Sep 15, 2011 4:07 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

You have to create loop around the MQGet -node. If you have huge amount of messages in the waiting q beware of that you don't exceed your memory resources.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
AskMe
PostPosted: Thu Sep 15, 2011 4:26 am    Post subject: Reply with quote

Newbie

Joined: 15 Sep 2011
Posts: 2

but i guess we can get messages using MQGET node if we know the messageid..or correlid..But in my case i want to get all message collate then and send them in an email. I dont know the message id or correlid
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Sep 15, 2011 4:30 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Have you attended the training provided by IBM on this scenario?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
marko.pitkanen
PostPosted: Thu Sep 15, 2011 4:35 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

Have you read for example this document? http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac20806_.htm

It says that:
Quote:

If you select Get by correlation ID, the CorrelId field of the message to be retrieved must match the CorrelId field in the Input MQMD location. By default, this check box is cleared."


--
makro
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Thu Sep 15, 2011 7:55 am    Post subject: Reply with quote

Grand High Poobah

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

AskMe wrote:
But in my case i want to get all message collate then and send them in an email. I dont know the message id or correlid


Then use MQInput not MQGet. This will read all the messages from the queue (without the memory problems associated with an MQGet in a loop). You can then collect them into an email and send it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
geewee
PostPosted: Mon Nov 05, 2012 4:41 am    Post subject: Reply with quote

Apprentice

Joined: 31 Jul 2012
Posts: 28

How to control the timing for get messages from the queue.
Using MQInput will get messages of queue as they are available, but the retrieval of messages should only happen every third hour.

Looping MQGet give EXCEPTION_STACK_OVERFLOW.
Could we configure MQGet to retrieve all available messages on queue,
by using MQCI_NONE or similar.
Not getting by msgid, not getting by correlId, none configured as request filter.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Nov 05, 2012 4:53 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

As I said elsewhere, to repeatedly use MQGET in a message flow (without a stack overflow) - use the ESQL propagate statement to execute another branch of the flow with the MQGET node on it.

Loop in the ESQL code and not in the flow control.
Back to top
View user's profile Send private message
geewee
PostPosted: Mon Nov 05, 2012 5:01 am    Post subject: Reply with quote

Apprentice

Joined: 31 Jul 2012
Posts: 28

thanks


use the ESQL propagate statement to execute another branch of the flow with the MQGET node on it.


could you give links, coding hints on this?
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Nov 05, 2012 5:11 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

It's a bit hard to draw a diagram here.

The loop is in a compute node's ESQL code, until end of queue. Inside the loop is a propagate statement to a terminal (e.g. out2).

The out2 terminal is connected to a MQGET node.

The MQGET is connected to another compute node that stores the message in the environment area (which the ESQL loop can access).

The MQGET no message terminal is connected to another compute node that signals the end of the loop by setting an environment variable (that the ESQL loop checks).
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Mon Nov 05, 2012 6:44 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

Perhaps you could find out what you can do with MQInput and Collector node in "Collect messages for a set period" scenario.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Fetch all messages from Mq 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.