ActiveMQ enqueued message java servicemix karaf command -


i m working activemq servicemix , want have enqueued message count / dequeued message count etc... in java. want value showed in activemq console

name    number of pending messages      number of consumers     messages enqueued       messages dequeued       views       operations   consumer.id-10-147-244-247-15461c6c293-38-0.vir...  0   2   13  13   consumer.id-10-147-244-247-15470570c61-108-0.vi...  0   2   13  13 

i want messages enqueued columns :)

my program start session consumer , listener's. work fine.

but monitoring have wrote karaf command call subscription object (subscription containt session/connection/queue etc...)

in subscription try :

activemqconnection activemqconnection = ((activemqconnection) connection); activemqqueue activemqqueue = getqueueconnection(queuename, activemqconnection);  activemqtopic = advisorysupport.getconsumeradvisorytopic(activemqqueue); 

but next don t know how destinationstatistics information queue/topic...

i try :

queuebrowser queuebrowser = session.createbrowser(activemqqueue); 

but nothing interessting in browser.

if can me destinationstatistics objetct ;)

thanks lot

finaly use queuebrowser know length of queue, queubrowser browse queue without remove them can iterate , count number of message in queue.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -