[rabbitmq-discuss] Exchanges, Routing, and AMQP
Peter Silva
Peter.A.Silva at gmail.com
Sat Nov 8 23:24:01 GMT 2008
On Sat, Nov 8, 2008 at 3:15 PM, Ben Hood <0x6e6562 at gmail.com> wrote:
> Peter,
>
> On Sat, Nov 8, 2008 at 7:29 PM, Peter Silva <Peter.A.Silva at gmail.com>
> wrote:
> > 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.
>
> Are you referring to amqp_clock.py?
>
> If so, I think that the topic is a the name of a string variable:
>
> TOPIC_PATTERN = '%Y.%m.%d.%w.%H.%M' # Python datetime.strftime() pattern
> .....
> topic = now.strftime(TOPIC_PATTERN)
> ch.basic_publish(msg, EXCHANGE_NAME, routing_key=topic)
>
> > 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?
>
> Yes, that will work.
>
OK, I was just confused then. cool!
>
> > 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?
>
> No, there is no fine grained access restriction (as discussed in other
> threads on this list).
OK... If you want to apply rules, then you have one
exchange for reception, an application will read, and then send subsets to
other exchanges where all the clients have the same access permissions.
Is that sounding right?
>
>
> > I guess that is a function outside of AMQP (not a protocol thing, but
> rather
> > a broker function?)
>
> Could be - again, a mechanism orthogonal to the protocol has been
> discussed.
>
> > 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?
>
> AFAIK something as fine grained as this has not yet been investigated in
> detail.
>
> Ben
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081108/ddcc23ad/attachment.htm
More information about the rabbitmq-discuss
mailing list