-
1. Re: listAllMessages is not functioning when Message Consumer
hendra_netm Nov 8, 2007 8:36 AM (in response to hendra_netm)Hi guys,
I have tried the method on JBM 1.4.0 SP1, and I am still unable to get messages using listAllMessages when a message consumer is connected to the queue.
Is there any way to monitoring queue content in JBM when the queue is actively consumed by message consumer?
Thank you in advance.
Best Regards,
Hendra
p.s. JBoss Server used is 4.2.0.G.A -
2. Re: listAllMessages is not functioning when Message Consumer
timfox Nov 8, 2007 8:53 AM (in response to hendra_netm)Each MessageConsumer maintains its own buffer of messages (see prefetchSize in the documentation), which are prefetched from the queue/subscription before they are actually consumed.
IIRC the prefetch size default is 150. So, if you have a consumer open and even if you haven't consumed any messages, 150 will have been removed from the queue, since they're not in the queue you won't be able to see them with listAllMessages (or browse them or any other similar methods).
Probably you have less than 150 messages in your queue hence they've all been buffered and you see none.
This has been discussed in depth on other threads....... -
3. Re: listAllMessages is not functioning when Message Consumer
timfox Nov 8, 2007 9:04 AM (in response to hendra_netm)I just added a FAQ for this :)
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMessaging -
4. Re: listAllMessages is not functioning when Message Consumer
hendra_netm Nov 8, 2007 9:52 AM (in response to hendra_netm)Hi Tim,
thank you for your explanation.
Is there any possiblity to see all messages in the buffer?
Or, is there any plan in the future to implement such kind of methods?
Best Regards,
Hendra -
5. Re: listAllMessages is not functioning when Message Consumer
timfox Nov 11, 2007 4:51 AM (in response to hendra_netm)The problem is the messages are no longer on the server side, the buffers are on the client side.
So the server would have to query every single consumer (maybe thousands) to find out what is in their buffers which is not really practical.
We could store a copy of them on the server side, but there would be performance implications of doing this.