<div><font color="#3366ff"><font><font face="tahoma,sans-serif">I understand the signature of exchange:route/2, but what would rabbitmq do after acquiring all the destinations? Would it deliver the message to those destinations?</font></font></font></div>
<font color="#3366ff"><font><font face="tahoma,sans-serif"><br clear="all"></font></font></font>Sincerely,<br><br><div><br>Son Tran-Nguyen</div><br>
<br><br><div class="gmail_quote">On Sun, Oct 7, 2012 at 12:22 AM, Matthias Radestock <span dir="ltr"><<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@rabbitmq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Son,<div class="im"><br>
<br>
On 05/10/12 21:42, Son Tran-Nguyen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to write a custom exchange type in which when bound to<br>
another exchange, it will change the message so that the final queue<br>
will also know which path the message were routes to.<br>
</blockquote>
<br></div>
Message routing determines the destinations of messages. It does not deliver the messages to these destinations, nor can it alter the messages.<br>
<br>
Take a look at the signature of exchange:route/2:<br>
<br>
route(rabbit_types:exchange(), rabbit_types:delivery()) -><br>
rabbit_router:match_result()<br>
<br>
where<br>
<br>
rabbit_router:match_result() :: [rabbit_types:binding_<u></u>destination()]<br>
<br>
rabbit_types:binding_<u></u>destination() ::<br>
rabbit_amqqueue:name() | rabbit_exchange:name()<br>
<br>
i.e. route/2 returns a list of exchanges and queues.<br>
<br>
<br>
So what you are trying to do simply cannot be done.<br>
<br>
<br>
Regards,<br>
<br>
Matthias.<br>
</blockquote></div><br>