activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: Time based filter?
Date Wed, 25 Feb 2015 21:52:07 GMT
You're not looking to throttle your clients, you're looking to have them
periodically read all messages, discard all but the most recent, and
process that last one.  That doesn't sound too hard; sleep for 100ms, then
read all messages till you find the most recent one; ack all but the last
one, then process the last one, then ack it and go back to sleep.

On Wed, Feb 25, 2015 at 2:07 PM, Kevin Burton <burton@spinn3r.com> wrote:

> Read a bit about slow consumers ..  you need to make sure you avoid issues
> here.
>
> You’re also going to have to write some throttle code.  ActiveMQ itself
> doesn’t really have support for this.  There are Delay messages but that’s
> really not what you want I think.
>
> One solution is to have the client do the throttling.  Basically opening a
> new consumer, receiving a message, processing it, then determining how long
> to sleep for, then repeat.
>
> On Wed, Feb 25, 2015 at 12:38 PM, joseph.gagnon <joseph.gagnon@ll.mit.edu>
> wrote:
>
> > Yes. I want the receiver to only have to worry about dealing with
> > receiving messages every tenth of a second (using my example) even though
> > the producer is sending them out much faster.  The receiver will get only
> > every tenth message, which is fine.
> >
> >
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message