Author |
Message
|
guest468 |
Posted: Sun Feb 18, 2007 9:17 pm Post subject: Queue depth check |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Hi,
Is there anyway a message flow can determine whether the message which it is picking up is the last one in the queue?
Actually, I have to implement a business logic where I have to update a database from within the message flow while processing the last message from the input queue.
Many Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Feb 18, 2007 10:31 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's only the last message on the queue until the next one shows up. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
au@kosa |
Posted: Mon Feb 19, 2007 4:21 am Post subject: |
|
|
 Centurion
Joined: 04 Jan 2007 Posts: 103 Location: pune
|
|
Back to top |
|
 |
santy |
Posted: Mon Feb 19, 2007 4:30 am Post subject: |
|
|
Centurion
Joined: 03 Nov 2006 Posts: 141
|
When the current depth of queue is 1, it is the last message residing in queue. You can write down the ESQL which implements this logic. So that your message flow can identify that, it is last message in the queue |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 19, 2007 4:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
But as has been pointed out before, it's only the last message until the next one shows up. You can also have a queue depth of 1 and 500 messages on the queue - it's just that the other 499 have not yet been committed and will be available any second.
"Last" is a very subjective concept.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
elvis_gn |
Posted: Mon Feb 19, 2007 4:51 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi,
Not a smart move....you should rather make a db entry thinking that every msg is the last msg, or ask the sender to notify which is the last msg in a batch of msgs...
Regards. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 19, 2007 4:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Vitor wrote: |
You can also have a queue depth of 1 and 500 messages on the queue - it's just that the other 499 have not yet been committed and will be available any second. |
Erm. I think it will be qdepth of 500, but only one available for Get. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 19, 2007 5:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
Vitor wrote: |
You can also have a queue depth of 1 and 500 messages on the queue - it's just that the other 499 have not yet been committed and will be available any second. |
Erm. I think it will be qdepth of 500, but only one available for Get. |
Doh!
Still makes a point though. Not entirely sure it's a valid one but hey...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 19, 2007 5:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Vitor wrote: |
Still makes a point though. Not entirely sure it's a valid one but hey...  |
It makes the same point, just not in the way you meant. You proposed a situation where something looked like the last message on the queue, but wasn't. The situation actually was that something didn't look like the last message on the queue, but for some value of "last" actually WAS the last message on the queue.
A very bad value of "last", mind you. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 19, 2007 5:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I think I'll just claim my point to be:
Quote: |
"Last" is a subjective measure |
and slink off into the darkness before my brain melts.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Mon Feb 19, 2007 8:06 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Sounds like a case for a "Group" of messages? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 19, 2007 8:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Sounds like a case for a "Group" of messages? |
If he means "last" the way I think he means last then indeed. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|