Hi Tim,

Ah yes, optimize the indexes, ok. That would certainly help, and would be a 
nice feature to have.

My intention? I was planning on using a QueueBrowser with a selector to get 
only the messages I was interested in and counting them (as per 5.9 of the jms 
spec). However, I noticed (from my performance tests) that it takes as long to 
read a queue to get a count as it does to place the messages there in the first 
place! Not behavior I was expecting, but that is the way things work when using 
the QueueBrowser, apparently commonly from what I found out. 

I believe there may be other implementation specific ways of getting around 
this, but am unsure of the specifics on this.

If you know of another way to accomplish this (specific to JBoss or more 
generally) I would love to hear it!

Because this was simply not feasible for a queue with a large number of 
messages in it (it would just take too long), I was planning on a different 
approach. One that involves me putting in 'counter' messages in every batch of 
1000 that would be handled differently - they would update the database and 
indicate that a batch of 1000 was done. The only problem is ordering - my 
understanding is (according to the spec) if I put, as part of one transaction, 
999 'real' messages and another 'counter' message, that a consumer would treat 
that particular batch serially (ie. in order) so that the counter message 
should be handled at the end of that batch, and I could then update my database 
and say that I've handled 999 messages. Even if the implementation isn't strict 
on this point, that would still be ok, as long as, in the aggregate, it was 
somewhat accurate. I haven't tested this approach yet, so maybe you could let 
me know if this would make sense or not...

Thanks for any input!

Mark


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3938027#3938027

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3938027


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to