Author |
Message
|
akmar2k |
Posted: Thu Dec 07, 2006 8:55 am Post subject: Read all messages in a predefined interval |
|
|
Novice
Joined: 01 Jun 2006 Posts: 22
|
Hi Folks,
Need your thoughtful comments again..
Following is a scenario that I have now.
1) Messages will be send to a queue intermittently by an application
2) At a predefined interval, the flow should pick all the messages and process them.
I had implemented this using a TimeOutNotification Node + MQGet Node combination. The time interval is configured using the TimeoutNotification node. MQGet node is to read the queue.
The drawback with this is that the MQGet will read only one message at a time.
Is there any way by which I can configure the MQGet to read all the messages from a queue?
Or are there any other mechanism for me to findout the queue depth of the queue at a given point of time using ESQL? (If the queue depth is known, I can call the MQGet in a propagate loop)
Any insight to these will be appreciated. Hope these are not very dumb questions...
Thanks! |
|
Back to top |
|
 |
wschutz |
Posted: Thu Dec 07, 2006 8:59 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
MQGET only reads one message at a time ....
You can wire a loop around MQGET .... _________________ -wayne |
|
Back to top |
|
 |
kirani |
Posted: Fri Dec 08, 2006 4:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I'd restrict any "long running" transactions in the Broker environment. Why don't you use DB as "temp" storage before you get final message? Once the final message is received, you can retrieve the message from the DB and process them in a single UOW. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
WBI_user |
Posted: Sat Dec 09, 2006 6:47 am Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
Use a separate flow which simply copy all messages from one queue to the Input Queue of your flow. Kick off this separate flow using timer. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Dec 09, 2006 8:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
WBI_user wrote: |
Use a separate flow which simply copy all messages from one queue to the Input Queue of your flow. Kick off this separate flow using timer. |
This means that all messages will be processed individually in separate instances of a message flow. A cursory reading of akmar2k's original question would have shown "the flow should pick up *all* the messages"
It also uses a queue to store data, and it's a lot better to use a database to store data. This is also a problem in akmar3k's original question, and is a general design flaw in solutions that try to use messaging infrastructure to provide enterprise delivery scheduling services.
Enterprise delivery scheduleing is not the same as batch processing.
Batch processing should be designed out of modern messaging based enterprises.
Enterprise delivery scheduling services should use a DATABASE as a storage point for data that is not ready to be delivered yet. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|