-
1. Re: Message count per producer
jbertram Dec 2, 2013 5:34 PM (in response to fuinhaazul)1 of 1 people found this helpfulThe HornetQServerControl has listProducersInfoAsJSON which I think you should be able to use to gain insight here.
-
2. Re: Message count per producer
fuinhaazul Dec 2, 2013 5:48 PM (in response to jbertram)Yeap, this works, but only for online producers. If the producer close his connection then the information is lost (tested here).
There is any way to count messages for that producer since hornetq last start/restart?
-
3. Re: Message count per producer
jbertram Dec 2, 2013 5:56 PM (in response to fuinhaazul)The information is volatile so what you are observing is expected.
There isn't anything which collects that data for access after the producer is closed.
-
4. Re: Message count per producer
fuinhaazul Dec 2, 2013 6:34 PM (in response to jbertram)I tried to implement some Interceptors (org.hornetq.api.core.Interceptor), but I can´t find a good documentation about all the packet types.
There is any packet that can anwer something like ClientID and destination for each message?
Or, how can I get text body from org.hornetq.core.server.ServerMessage ? I tried with getBodyInputStream, but is empty.
Something like this can helpme with these anwers.
Thanks Justin!
-
5. Re: Message count per producer
jbertram Dec 2, 2013 9:18 PM (in response to fuinhaazul)There is no documentation covering all the packet types. If you've got the HornetQ source, just look for all the classes that implement org.hornetq.core.protocol.core.Packet. You can also check out the interceptor example in the HornetQ distribution or the org.hornetq.tests.integration.InterceptorTest in the HornetQ source to see more about how to use interceptors.