Hi,<div><br></div><div>I've been thinking on creating a new exchange type whose goal will be to simplify the ways messages are routed to queues.</div><div><br></div><div>So now for example to publish a message to a queue I need to do something like:</div>
<div><br></div><div>$ch->exchange_declare('foobar', 'direct');</div><div><span class="Apple-style-span">$ch->queue_declare('</span>foobar<span class="Apple-style-span">');</span></div><div><span class="Apple-style-span">$ch->queue_bind('</span>foobar', 'foobar');</div>
<div>$ch->basic_publish($msg, 'foobar');</div><div><br></div><div>I want to be able to do this:</div><div><br></div><div>$ch->exchange_declare('foobar', 'new-exchange-type');</div><div>$ch->basic_publish($msg, 'foobar');</div>
<div><br></div><div>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.</div><div><br></div><div>The queue will have similar durability properties as the exchange.</div>
<div><br></div><div>The exchange won't accept binding requests, so 1 exchange of that type will only have 1 queue bound to it.</div><div><br></div><div>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.</div>
<div><br></div><div>The exchange should act basically as a direct exchange.</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div><div><br></div><div>What do you guys think?</div>
<div><br></div><div>-Alvaro</div>