You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by srobinson <sr...@gmail.com> on 2012/11/18 04:03:42 UTC

Special buffer queue

Hello,
I am currently trying to use ActiveMQ for the following use-case: 

I have a widget that waits for incoming topic messages that comes every 5
minutes and display the content. It works great, but obviously, when I start
the widget, it is empty until the next message comes in, which is not ideal
as it could take up to 5 minute. Ideally it could load the content from the
latest message that was broadcasted on the system. 

One solution: I could setup a central database (e.g. MySQL) somewhere which
role is just to persist the latest message received on that topic and serve
it to widgets when they start.

But I wonder if ActiveMQ has a feature that would avoid me having another
moving part in my system, like some kind of special queue or round buffer
which holds the latest X messages broad-casted on a given topic, and let my
widget "peek" the last few messages when starting.

Any idea?

Thanks in advance!


SR



--
View this message in context: http://activemq.2283324.n4.nabble.com/Special-buffer-queue-tp4659517.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Special buffer queue

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

yes there is. Take a look at subscription recovery policy

http://activemq.apache.org/subscription-recovery-policy.html

and retroactive consumer

http://activemq.apache.org/retroactive-consumer.html

Regards
--
Dejan Bosanac
----------------------
Red Hat, Inc.
FuseSource is now part of Red Hat
dbosanac@redhat.com
Twitter: @dejanb
Blog: http://sensatic.net
ActiveMQ in Action: http://www.manning.com/snyder/


On Sun, Nov 18, 2012 at 4:03 AM, srobinson <sr...@gmail.com> wrote:
> Hello,
> I am currently trying to use ActiveMQ for the following use-case:
>
> I have a widget that waits for incoming topic messages that comes every 5
> minutes and display the content. It works great, but obviously, when I start
> the widget, it is empty until the next message comes in, which is not ideal
> as it could take up to 5 minute. Ideally it could load the content from the
> latest message that was broadcasted on the system.
>
> One solution: I could setup a central database (e.g. MySQL) somewhere which
> role is just to persist the latest message received on that topic and serve
> it to widgets when they start.
>
> But I wonder if ActiveMQ has a feature that would avoid me having another
> moving part in my system, like some kind of special queue or round buffer
> which holds the latest X messages broad-casted on a given topic, and let my
> widget "peek" the last few messages when starting.
>
> Any idea?
>
> Thanks in advance!
>
>
> SR
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Special-buffer-queue-tp4659517.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.