[rabbitmq-discuss] Queue bound by a percentage change?

James Carr james.r.carr at gmail.com
Thu Feb 3 00:47:53 GMT 2011


Hi Robert,

Thanks for the reply! I considered doing the banding in the routing
key. However, on the following point:

> Or you could use a filtering shovel, which does the range checking for you.

filtering shovel? Can you expand on that?


Thanks,
James


On Wed, Feb 2, 2011 at 7:10 AM, Robert Raschke <rtrlists at googlemail.com> wrote:
>
> On Wed, Feb 2, 2011 at 3:28 AM, James Carr <james.r.carr at gmail.com> wrote:
>>
>> I've been wondering what kind of scheme would be useful for binding
>> queues to be notified for certain changes in a value. For example, say
>> I have a stock system that applications can bind to and be notified
>> if, for excample, IBM's stock price has risen 2.00 or more, if the
>> price has dropped more than 2%, etc. What kind of scheme would work
>> best in this case?
>
> If you really need to do this kind of thing through a queue binding, rather
> than consumer value checks, the only thing that comes to mind is to have the
> producer band the values, so you can subscribe to bands. For example, have
> the producer use 1% bands in the routing key, 0 for 0<= x < 1, 1 for 1<= x
> <2, etc. and then bind your queue to as many ranges as you are interested.
>
> Or you could use a filtering shovel, which does the range checking for you.
>
> And just in case, you aren't talking about keeping track of the %-age
> change? Cause that would involve keeping state in a sliding window and make
> things a wee bit more complicated.
>
> Robby
>
>


More information about the rabbitmq-discuss mailing list