[rabbitmq-discuss] RFC - new exchange type idea

Alvaro Videla videlalvaro at gmail.com
Wed Apr 11 14:13:11 BST 2012


Hi,

I've been thinking on creating a new exchange type whose goal will be to
simplify the ways messages are routed to queues.

So now for example to publish a message to a queue I need to do something
like:

$ch->exchange_declare('foobar', 'direct');
$ch->queue_declare('foobar');
$ch->queue_bind('foobar', 'foobar');
$ch->basic_publish($msg, 'foobar');

I want to be able to do this:

$ch->exchange_declare('foobar', 'new-exchange-type');
$ch->basic_publish($msg, 'foobar');

So that means that by declaring a "foobar" exchange with the new type I
will bind a new queue to that exchange during exchange creation on the
broker side.

The queue will have similar durability properties as the exchange.

The exchange won't accept binding requests, so 1 exchange of that type will
only have 1 queue bound to it.

The idea is also to not perform any query while searching for a queue where
to route messages, so routing speed *should* be a bit faster than a normal
direct exchange.

The exchange should act basically as a direct exchange.

Then as a user of RabbitMQ that just want to have a queue server for
delayed jobs this is the most basic setup I think you can have.

BTW, I know you can publish messages to the anon exchange by using the
queue name as routing key, but this requires that particular knowledge of
AMQP.

What do you guys think?

-Alvaro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120411/d715abbb/attachment.htm>


More information about the rabbitmq-discuss mailing list