activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <>
Subject Re: Leaving Messages in a Topic. Any ideas?
Date Tue, 08 Aug 2006 15:41:18 GMT
Sure.  Look at

On 8/8/06, sparky2708 <> wrote:
> yes, calculation is very cheap. Just a sum.
>     What you describe is exactly what I would like to do (in an ideal case).
> We were thinking of creating  a module that would attach to an ActiveMQ
> broker so a crashed or recently started client would ask the module for the
> sum and then start receiving messages from the JMS.
>     Although I think ultimately the above is doable but before we take the
> hard road it would be interested to know how to track the sum at the broker?

In activemq you add your own custom broker type interceptors.  Here's
an example one:
That example creates 'advisory' messages that get sent to a topic when
connections/producers/consumers are created/destroyed.  The one bit
that is similar to your case is that when a consumer for that advisory
topic comes on, it sends that consumer all the events that it had
missed so that it know about all the connected

In your case I think you would just need to override the
"send(ConnectionContext context, Message messageSend)" call to keep
your counters.  Also override the " addConsumer(ConnectionContext
context, ConsumerInfo info)" So that you can send a message to the
consumer with the sum when he gets created.

> I guess what I am trying to find out is where on the broker do you keep it
> (that would be the ideal solution). Can you give me some examples or point
> me to some documentation where I can read about this functionality?
> --
> View this message in context:
> Sent from the ActiveMQ - User forum at



View raw message