Hi guys,<br><br>I've played with the federation plugin a little. It seems that in order to send a message to a queue on the downstream server, the same queue has to be declared on the upstream server for federation to work?<br>
<br>For example:<br>__________________<br>|                              |<br>| Downstream server |   Exchange-D <------  q1<br>|_________________|<br>             ^<br>             |<br>             |<br>__________________<br>
|                              |<br>
| Upstream server     |  Exchange-U <------  q1<br>
|_________________|<br>             <br>_______ <br>|            | <br>
| Client   |<br>
|_______|<br><br>If I want to send messages from client through Upstream server to Downstream server, The messages can only get through when I declare a "q1" on Upstream server, bind that queue to Exchange-U with a routing key, then send the message to Exchange-U using that routing key. Not sure if this is how it's supposed to work. <br>
<br>Is it possible not to declare q1 on Upstream server and make federation work? My problem is that I have multiple customers listening to their own queues on Downstream server, and customers can be removed or added at any time. Say if X just connected to Downstream server, and I want to send messages to it. How would I be able to send messages to X given that I don't have a queue on Upstream server that corresponds to it? Though I already know X is in the customer list, when my clients start and initialise, I don't think it's a good idea to just create queues for all customers on the list, which I think would consume system resources unnecessarily.<br>
<br>Hopefully it all makes sense to you guys. Let me know if it's unclear.<br><br>The following is my federation config.<br><span style="color:rgb(0,102,0)">{rabbitmq_federation,</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">   [ {exchanges, [[{exchange,     "Exchange-D"},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                   {virtual_host, "/"},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                   {type,         "topic"},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                   {durable,      true},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                   {auto_delete,  false},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                   {internal,     false},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                   {upstream_set, "upsteam-servers"}]</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                 ]},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">     {upstream_sets, [{"upsteam-servers", [[{connection, "192.168.0.21"},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                         {exchange,   "Exchange-U"},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                                         {max_hops,   2}</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                         ]}</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                     ]},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">     {connections, [{"Upstream-server",       [{host,          "upstream"},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                         {protocol,        "amqps"},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                                         {port,            5671},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                         {ssl_options,</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                                          [{cacertfile, "/etc/rabbitmq/certs/testca/cacert.pem"},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                           {certfile,   "/etc/rabbitmq/certs/client/cert.pem"},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                                           {keyfile,    "/etc/rabbitmq/certs/client/key.pem"},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                           {verify,     verify_peer},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                                           {fail_if_no_peer_cert, false}</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                          ]}</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">                                        ]}</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">                                     ]},</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">     {local_username, "guest"},</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)">   ]</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)">  }</span><br><br>Thanks,<br><br>Brian<br>