-
1. Re: TODO: JMX Message Listing
raja05 May 17, 2004 8:38 AM (in response to adrian.brock)Adrian
Which version is this added to? HEAD?
Thanks -
2. Re: TODO: JMX Message Listing
raja05 May 17, 2004 8:40 AM (in response to adrian.brock)OOps Sorry, Dint check the change notesfor 3.2.4 before posting this
-
3. Re: TODO: JMX Message Listing
raja05 May 17, 2004 9:01 AM (in response to adrian.brock)How about adding a method that sets the number of messages that are retrieved for doing the list operation alone? The browse code could be modified to take in a start and number of messages to return a subset of total number of documents. As of 3.2.2.RC4, only the JMSQueue's browse method is the one calling this, so shouldnt have a lot of dependencies.
If this looks like the way to proceed, I can take this up. -
4. Re: TODO: JMX Message Listing
adrian.brock May 17, 2004 10:12 AM (in response to adrian.brock)At the moment it is just reusing the same code as
QueueBrowser.browse(...)
We need a different version for paging
BasicQueue.browse(Selector, int start, int pageSize) throws JMSException;
This will avoid loading the entire thing into memory.
The QueueBrowser should really be using a proxy enumeration rather than
returning an Array of everything in the Queue. -
5. Re: TODO: JMX Message Listing
raja05 May 18, 2004 2:40 PM (in response to adrian.brock)I have a method called
public MessageReference[] getMessageReferences(String selector, int pageNum)
that can be used for the listing of messages paginated. The user typically passes in the pageNumber(based on the pagesize, see below) containing the list of messages he wants to see.
There is a managed method called setPageSize(JMX Managed) that can be used to set the page size for message listings.
I was wondering how would a typical client call this? Is it okay to return him an array of message references and let him reconstruct the mssage using messagereference.getMessage() ?
How do you envision a typical call to this as this is not something offered by the spec(Or is it?)
Thanks -
6. Re: TODO: JMX Message Listing
adrian.brock May 18, 2004 3:28 PM (in response to adrian.brock)It is intended to be used via JMX not JMS.
It should not show MessageReference[], it should show a List of SpyMessages
see the current implementation of listMessages.
MessageReference is a serverside class.
Using a List makes it easy for the JMX console to display the results. -
7. Re: TODO: JMX Message Listing
stephanenicoll May 23, 2004 10:57 AM (in response to adrian.brock)"adrian@jboss.org" wrote:
It is intended to be used via JMX not JMS.
It should not show MessageReference[], it should show a List of SpyMessages
see the current implementation of listMessages.
MessageReference is a serverside class.
Using a List makes it easy for the JMX console to display the results.
Adrian,
We have some code that removes messages from a queue based on selector with a limit. If you want we can provide a patch that adds this functionnality (to BasicQueue I assume).
Regards,
Stephane -
8. Re: TODO: JMX Message Listing
adrian.brock May 23, 2004 11:13 AM (in response to adrian.brock)Stephane,
I've started a new Thread rather than hijacking this one:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=50050