You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by schumi <ni...@gmail.com> on 2011/03/07 14:11:24 UTC

Interceptors

Hi,

 I have started working on Activemq very recently and dont hv much idea
about it. I actually want to extract some information from Activemq broker
for analysis purpose.
 I needed to fetch details like producer name and consumer name for a
particular queue / topic, the number of messages enqueued and dequeued from
that particular queue / topic, the average size of the messages sent to that
queue / topic on an hourly basis.
I believe I will have to create a new plugin for this requirement.
Can you please suggest me some way as to how do i proceed to meet the above
mentioned requirement?
Thanking you in anticipation.

Regards,
Schumi


--
View this message in context: http://activemq.2283324.n4.nabble.com/Interceptors-tp3338917p3338917.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Interceptors

Posted by schumi <ni...@gmail.com>.
Thanks Dejan for your help.
I will get back to you just in case I have any more queries.

Regards,
Nikhil K

--
View this message in context: http://activemq.2283324.n4.nabble.com/Interceptors-tp3338917p3339208.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Interceptors

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

you can get enqueue/dequeue count and some more info using JMX -
http://activemq.apache.org/jmx.html

But I think you need to create an interceptor for the average message size
and hourly rates. You need to intercept messages coming and going from the
broker and store those info somewhere.
<http://activemq.apache.org/jmx.html>
Regards
-- 
Dejan Bosanac
-----------------
FuseSource - The experts in open source integration and messaging.
Email: dejanb@fusesource.com
Web: http://fusesource.com
Twitter:  http://twitter.com/dejanb
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Mon, Mar 7, 2011 at 3:07 PM, schumi <ni...@gmail.com> wrote:

> Hi Dejan,
>
> Thanks for ur reply.
> I tried to make use of Advisory messages to get the Producer and Consumer
> ID's. I also was able to get the destination name.
> But I am not able to get the enqueue count and dequeue count for that
> destination (queue / topic).
> There is a class called 'DestinationStatistics' under
> org.apache.activemq.broker.region.
> In this class, there are methods such as 'getEnqueues', 'getDequeues' and
> 'getMessages'. But neither the constructor of this class nor the methods in
> the class are accepting any parameters such as 'Queue Name' / 'Topic Name'.
> How can i make use of this class to fetch the above mentioned details for a
> particular queue or topic?
> I also went thru the Interceptors pages mentioned by you in ur reply, but
> still I am not able to figure out how do I get the enqueue and dequeue
> count
> of messages as well as the average size of messages that too on an hourly
> basis.
>
> Regards,
> Schumi
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Interceptors-tp3338917p3339039.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>

Re: Interceptors

Posted by schumi <ni...@gmail.com>.
Hi Dejan,

Thanks for ur reply.
I tried to make use of Advisory messages to get the Producer and Consumer
ID's. I also was able to get the destination name.
But I am not able to get the enqueue count and dequeue count for that
destination (queue / topic). 
There is a class called 'DestinationStatistics' under
org.apache.activemq.broker.region.
In this class, there are methods such as 'getEnqueues', 'getDequeues' and
'getMessages'. But neither the constructor of this class nor the methods in
the class are accepting any parameters such as 'Queue Name' / 'Topic Name'.
How can i make use of this class to fetch the above mentioned details for a
particular queue or topic? 
I also went thru the Interceptors pages mentioned by you in ur reply, but
still I am not able to figure out how do I get the enqueue and dequeue count
of messages as well as the average size of messages that too on an hourly
basis.

Regards,
Schumi

--
View this message in context: http://activemq.2283324.n4.nabble.com/Interceptors-tp3338917p3339039.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Interceptors

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

take a look at these pages:

http://activemq.apache.org/interceptors.html
<http://activemq.apache.org/interceptors.html>
http://activemq.apache.org/developing-plugins.html

<http://activemq.apache.org/developing-plugins.html>and you should refer to
the source of the existing plugins for the best material on the topic.


Regards
-- 
Dejan Bosanac
-----------------
FuseSource - The experts in open source integration and messaging.
Email: dejanb@fusesource.com
Web: http://fusesource.com
Twitter:  http://twitter.com/dejanb
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Mon, Mar 7, 2011 at 2:11 PM, schumi <ni...@gmail.com> wrote:

>
> Hi,
>
>  I have started working on Activemq very recently and dont hv much idea
> about it. I actually want to extract some information from Activemq broker
> for analysis purpose.
>  I needed to fetch details like producer name and consumer name for a
> particular queue / topic, the number of messages enqueued and dequeued from
> that particular queue / topic, the average size of the messages sent to
> that
> queue / topic on an hourly basis.
> I believe I will have to create a new plugin for this requirement.
> Can you please suggest me some way as to how do i proceed to meet the above
> mentioned requirement?
> Thanking you in anticipation.
>
> Regards,
> Schumi
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Interceptors-tp3338917p3338917.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>