[rabbitmq-discuss] Queue bound by a percentage change?
James Carr
james.r.carr at gmail.com
Sun Feb 6 13:45:59 GMT 2011
After thinking about it for awhile and it seem the best bet is to
create a queue that the application logic dynamicly publishes routing
keys for. The way I currently set this up is:
Client A decides it wants to be notified if a stock drops .2% or more
* publishes a Command Message indicating as such (something like
{ticker:"IBM", on:"drop", percentage:0.002} )
* binds to queue stocks.IBM.drop.[>0.2%]
Client B
* recieves command message and routes notifications with routing key
if the criteria matches
I've yet to investigate shovel but so far this seems to be an ideal solution. :)
Thanks,
James
On Thu, Feb 3, 2011 at 3:44 AM, Robert Raschke <rtrlists at googlemail.com> wrote:
> Hi James,
>
> On Thu, Feb 3, 2011 at 12:47 AM, James Carr <james.r.carr at gmail.com> wrote:
>>
>> > Or you could use a filtering shovel, which does the range checking for
>> > you.
>>
>> filtering shovel? Can you expand on that?
>>
>
> Well, I personally have never used the shovel plugin (I think it's a plugin,
> but it could simply be an add-on, I forget). You can use it to bridge two
> AMQP servers, for example, and those could of course be one and the same. My
> expectation would be that you can specify in some way which messages you
> want the shovel to, err, shovel from one system to the other.
>
> It might be a dead end, but probably worth spending an hour to look at what
> a shovel can do for you.
>
> Let's see, ah, here's a link:
> http://hg.rabbitmq.com/rabbitmq-shovel/file/rabbitmq_v2_3_0/README
>
> From the looks of thing there's no obvious way to add filtering into that;
> at least not from a config perspective, maybe the code is so simple, that
> it's easy to add things you need. Or you could simply use it as a starting
> point for creating your own filter that sits between your queues. Depends a
> bit on how deep into programming you are willing to dive.
>
> Robby
>
>
More information about the rabbitmq-discuss
mailing list