I have 2 RabbitMQ Nodes. One node is on a US server and one is on a UK server. They are both connected to the same VPN.<br><br>I&#39;m consuming the messages from the local nodes in both in the US and UK with:<br><br>AMQP.start(&#39;amqp://guest:guest@localhost:25672&#39;) do |connection, open_ok|<br>

  channel  = AMQP::Channel.new(connection)<br>  exchange = AMQP::Exchange.new(channel, &quot;x-federation&quot;, &quot;xanview&quot;, :durable =&gt; true,<br>    :arguments =&gt; {&quot;upstream-set&quot; =&gt; &quot;my-upstreams&quot;, &quot;type&quot; =&gt; &quot;topic&quot;, &quot;durable&quot; =&gt; &quot;true&quot;})<br>

  channel.queue(&quot;testqueue_uk&quot;, :durable =&gt; true) do |queue| # testqueue_us in the US<br>    queue.bind(exchange, :routing_key =&gt; &#39;#&#39;)<br>    queue.subscribe do |metadata, payload|<br>      i+=1<br>

      puts &quot;#{i}: Recieved message: #{payload.inspect}.&quot;<br>    end <br>  end <br>end<br><br>I&#39;m producing messages locally to the local nodes in both the US and UK with:<br><br>EventMachine.run do<br>  AMQP.connect(&#39;amqp://guest:guest@localhost:25672&#39;) do |connection, open_ok|<br>

    channel = AMQP::Channel.new(connection)<br>    exchange = AMQP::Exchange.new(channel, &quot;x-federation&quot;, &quot;xanview&quot;, :durable =&gt; true, :arguments =&gt; {&quot;upstream-set&quot; =&gt; &quot;my-upstreams&quot;, &quot;type&quot; =&gt; &quot;topic&quot;, &quot;durable&quot; =&gt; &quot;true&quot;})<br>

    EventMachine.add_periodic_timer(0.1) do<br>      $i+=1<br>      puts &quot;#{$i}: publishing msg&quot;<br>      $exchange.publish(&quot;#{$i} this is a test message from the US&quot;, :routing_key =&gt; &quot;some.topic&quot;, :persistent =&gt; true )<br>

    end<br>  end <br>end<br><br>This all seems to work reliably until I try to kill the connection: I shutdown the VPN and see messages being queued in queues called: &quot;federation: xanview -&gt; node2&quot; (on the UK server) and &quot;federation: xanview -&gt; node1&quot; (on the US server) as expected.<br>

<br>However when I restart the VPN, the UK server has received 43737 messages while the US only received 43708 messages. Where did 29 messages disappear?<br><br>Both node configs look like this with the only exception of the US connecting to federation on 10.8.0.22 and the UK connecting to federation on <a href="http://10.8.0.33">10.8.0.33</a>: <br>

<br>[<br>  {rabbit, [<br>    {tcp_listeners, [25672]}<br>  ]},<br>  {rabbitmq_mochiweb, [<br>    {listeners,        [{mgmt, [{port, 55555}]}]},<br>    {default_listener, [{port, 55550}]},<br>    {contexts,         [{rabbit_mgmt, mgmt}]}<br>

  ]},<br><br>{rabbitmq_federation,<br>   [ {exchanges, [[{exchange,     &quot;xanview&quot;},<br>                   {virtual_host, &quot;/&quot;},<br>                   {type,         &quot;topic&quot;},<br>                   {durable,      true},<br>

                   {auto_delete,  false},<br>                   {internal,     false},<br>                   {upstream_set, &quot;my-upstreams&quot;}]<br>                 ]},<br>     {upstream_sets, [{&quot;my-upstreams&quot;, [[{connection, &quot;upstream-server&quot;}]]}]},<br>

     {connections, [{&quot;upstream-server&quot;, [{host,            &quot;10.8.0.22&quot;},<br>                                         {protocol,        &quot;amqp&quot;},<br>                                         {port,            25672},<br>

                                         {virtual_host,    &quot;/&quot;},<br>                                         {username,        &quot;guest&quot;},<br>                                         {password,        &quot;guest&quot;},<br>

                                         {mechanism,       default},<br>                                         {prefetch_count,  1000},<br>                                         {reconnect_delay, 5},<br>                                         {ha_policy,       &quot;all&quot;}<br>

                                        ]}<br>                   ]},<br>     {local_username, &quot;guest&quot;},<br>     {local_nodename, &quot;node2&quot;}<br>   ]<br>  }<br><br>].<br><br>Any ideas why messages are lost? What could be causing it?<br>

<br>Roman<br>