Author |
Message
|
EAI Developer |
Posted: Wed Sep 06, 2006 2:19 am Post subject: Message flow should process the msgs once in a week |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi All,
In my current scenario i have to process the msgs in the queue once in a week.JDBC adapter will pick the data from Oracle database and it will put the xm messaeg in "delivery queue".Here i have to desing a flow such a way that i have to process all the msgs which i got it in the queue through out the week,once.so can anybody suggest me how to use timer nodes to acheive this.and can any body know how to find the depth of the queue within the ESQl code.
Thnx in advance,
EAI Developer. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Sep 06, 2006 2:31 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 06, 2006 2:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 06, 2006 2:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Sorry wschutz, there seems to be an echo in here...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
EAI Developer |
Posted: Wed Sep 06, 2006 2:39 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi guys,
Thnx for the link,I will go through that,and let u know if i got any problem.I assume to write a ESQL code which contains a loop to fetch the msgs from the queue,and that loop will end when no msgs are there in that queue.thats y i want to know the queue depth  |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 06, 2006 2:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Or just use an MQInput node to read the queue automatically until it's empty?
Or just loop until you get a 2033 Reason Code?
You don't need to know the depth....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ak |
Posted: Wed Sep 06, 2006 2:54 am Post subject: |
|
|
Apprentice
Joined: 07 Aug 2006 Posts: 48 Location: England
|
Messages are read off the MQ Input queue using different threads and are processed independently of each other using different instances of your message flow, so you do not need an ESQL loop to process different messages and hence no need to for queue depth. |
|
Back to top |
|
 |
EAI Developer |
Posted: Wed Sep 06, 2006 3:16 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi,
I modified my flow which starts with timernotification node where i menatined the time interval and i wired this node to mqget node.In the queue which i mentioned in the MqGet properties,it got let say 10 msgs.
when timeoutnotification node gets actiavted after specified time,it is processing only one msg which is in the queue,but my requirement is to process all the 10 msgs.so please help me in this concern.
Thnx,
EAI Developer. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 06, 2006 3:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Why are you using MQGet instead of MQInput? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
EAI Developer |
Posted: Wed Sep 06, 2006 3:58 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Because there is no "in" terminal to wire from TimeoutNotification node. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 06, 2006 4:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Okay, point taken, shows my level of expereince with timer nodes  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Sep 06, 2006 4:07 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi EAI Developer,
What do u think of this:
You'll have to put the MQGet in a loop with a compute node, the compute can simply propagate the picked message forward and finally send another trigger to the MQGet to pick again....
Do this until the timeout of the MQGet is thrown and (handle in the same compute) now you know that there are no more messages...
Or you can develop a custom node to pick multiple messages like i've done.
Regards. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 06, 2006 4:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why are you running the adapter continuously, and trying to force MQ to hold the data until it's needed?
Why not only run the adapter once a week? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EAI Developer |
Posted: Wed Sep 06, 2006 4:21 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi Elvis,
No ,I though in diff way , like i want to put a compute node between timeoutnotification node and MqGet node ,and in the ESQL code i will use propagate statement to get the control back,so that i can process all the msgs.i want to break the loop in the compute node when my counter in the esql code reaches the queue depth(but as some of guys said we cann't find the queue depth in the ESQL code).
OR
Is it possible to do my task using timer nodes.Please gimme some input.
Thnx ,
EAI Developer. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 06, 2006 4:25 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You never read a queue until the queue depth is zero, in any MQ application.
You always read the queue until you get back a 2033.
Using the MQGet node is not any different.
Again, though, you should not be handling this delay inside broker.
You should just schedule when the adapter starts and stops. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|