[rabbitmq-discuss] Exchanges, Routing, and AMQP

Peter Silva Peter.A.Silva at gmail.com
Sat Nov 8 19:29:20 GMT 2008

> BTW Peter: Routing keys are in fact strings in AMQP :-)

That's strange... maybe I'm just getting confused by
a client code... Here is an example from the demo in py-amqplib...

 ch.basic_publish(msg, EXCHANGE_NAME, routing_key=topic)

the 'routing_key' in this api, afaict, is one of three keywords: topic,
fanout, direct.   what is called exchange_type in the AMQP spec.

If the key is a string, and the exchange_type is opaque to the producers,
then that's cool.  So for my application.  An admin creates the exchange,
the producers post to it using AHL's or file names as routing keys,
oblivious to the routing method in use.
That's OK?

The next thing is that I need to be able to define routing to output queues
myself, (how the routing key is interpreted.) before the clients apply their
routing info, so I can say, no... my client talibanitravel.com has no access
to the weather ob from Kandahar airport, even if they say they want it.
They are perhaps allowed the ob from Peshawar, Moscow and Montreal.   So
data posted on the same exchange may or may not be allowed to be seen by
some clients.   I do that today with routing tables, others would use acl's
or capabilities.   per exchange permissions of some sort would work... do
they exist?

I guess that is a function outside of AMQP (not a protocol thing, but rather
a broker function?)  I get the impression permissions/ACL's
were something applied at the queue/exchange level.  Was there
something granular enough to apply to individual messages sent to an
exchange blocking posting to queues based on routing_key?

On Sat, Nov 8, 2008 at 1:41 PM, Ben Hood <0x6e6562 at gmail.com> wrote:

> Kirk,
> On Sat, Oct 25, 2008 at 12:11 PM, Kirk Wylie <kirk at kirkwylie.com> wrote:
> >> Would your proposed model allow for routing decisions that are based on
> the
> >> set of all bindings (or some subset thereof), rather than each
> individual
> >> binding? Ben's example - an exchange that routes to the shorted queue -
> >> requires the former.
> >
> > It would depend on the server-side implementation as to whether that
> > was possible, since custom routing rules are outside the scope of the
> > protocol itself.
> Your riposte has been commented on:
> http://hopper.squarespace.com/blog/2008/10/7/consumer-driven-messaging.html#comments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081108/0af160af/attachment.htm 

More information about the rabbitmq-discuss mailing list