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 » Queue depth check

Post new topic  Reply to topic
 Queue depth check « View previous topic :: View next topic » 
Author Message
guest468
PostPosted: Sun Feb 18, 2007 9:17 pm    Post subject: Queue depth check Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Sun Feb 18, 2007 10:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
au@kosa
PostPosted: Mon Feb 19, 2007 4:21 am    Post subject: Reply with quote

Centurion

Joined: 04 Jan 2007
Posts: 103
Location: pune

Hi,

You can use a Java compute node in your flow. You can write java codes and thus MQseries java api's to get the current queue depth.

http://www.mqseries.net/phpBB2/viewtopic.php?p=165107&sid=b9248e928a7a432923e130dc1b961e73

Regards,
Amit Upadhyaya[/url]
_________________
Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate
Back to top
View user's profile Send private message Yahoo Messenger
santy
PostPosted: Mon Feb 19, 2007 4:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Feb 19, 2007 4:38 am    Post subject: Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Mon Feb 19, 2007 4:51 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi,
au@kosa wrote:
You can use a Java compute node in your flow. You can write java codes and thus MQseries java api's to get the current queue depth.

http://www.mqseries.net/phpBB2/viewtopic.php?p=165107&sid=b9248e928a7a432923e130dc1b961e73
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
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Feb 19, 2007 4:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Feb 19, 2007 5:06 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Feb 19, 2007 5:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Feb 19, 2007 5:17 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Mon Feb 19, 2007 8:06 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Sounds like a case for a "Group" of messages?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 19, 2007 8:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Queue depth check
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.