[rabbitmq-discuss] Job Server Resource Allocation Help

Tony Garnock-Jones tonyg at lshift.net
Thu Oct 8 15:08:27 BST 2009


But to answer your question, Bryan:

Bryan Murphy wrote:
> I have a related question... BasicConsume has a "filter" parameter. 
> It's been a few months since I read the AMQP spec.  I took a quick look
> online, but couldn't find any good documentation.  What does that do (if
> anything) and how do you use it? 

It is unspecified. QPid, I believe, uses it to implement JMS-style
message selectors. We don't currently do anything with it (mostly
because of the question "how on earth should one interpret what's put in
there anyway"). I think people were headed in the direction of
specifying some kind of SQL92-like predicate language for use there. Ick.

> Ideally, what I was originally fishing for was something like this:
> 
> Client:
>   headers["paying"] = "true";
>   bus.Send(message, headers);
> Server A:
>   bus.Receive(queue="jobs", filter="paying == 'true'");
> Server B:
>   bus.Receive(queue="jobs" /* no filter */);

Yes I think that was the original intent. For now, consider it for
experimental use only, I suppose.

(For your use case, what's to stop people falsely advertising that they
are paying customers when they submit jobs? Hmm that reminds me of the
idea of getting the broker to securely annotate messages with some
unforgeable ID stamp that was discussed on this list some time ago...)

Tony




More information about the rabbitmq-discuss mailing list