Just an update, I have created a repository that shows exactly what I&#39;m trying to do:<div><br></div><div><a href="https://github.com/hackeron/ruby-amqp-federation-example">https://github.com/hackeron/ruby-amqp-federation-example</a></div>

<div><br></div><div>The maintainer of Ruby-AMQP has been helping me with this a great deal (thank you!) and I&#39;m finally able to get federated messaged :) - only error now is if the message rate is higher than around 1 message/sec, I get:</div>

<div><br></div><div>E, [2012-07-02T21:06:54.126367 #4399] ERROR -- : [amqp] Detected missing server heartbeats</div><div><br></div><div>A workaround is explicitly setting the heartbeat: AMQP.start(&#39;amqp://guest:guest@localhost:25672&#39;, :heartbeat =&gt; 0)</div>

<div><br></div><div>Hope others struggling to get Federation working with Ruby-AMQP will find this useful,</div><div><br></div><div>Roman</div><div><br></div><div><br><div class="gmail_quote">On 2 July 2012 02:09, Roman Gaufman <span dir="ltr">&lt;<a href="mailto:hackeron@gmail.com" target="_blank">hackeron@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;m trying to get the Ruby-AMQP gem working with RabbitMQ&#39;s federation plugin.
<div><br></div><div>I have a federation set up as following:</div><div><pre style="margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid rgb(204,204,204);font-size:13px;font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;background-color:rgb(248,248,248);line-height:19px;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">

<code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">{rabbitmq_federation,
   [ {exchanges, [[{exchange,     &quot;xanview&quot;},
                   {virtual_host, &quot;/&quot;},
                   {type,         &quot;topic&quot;},
                   {durable,      true},
                   {auto_delete,  false},
                   {internal,     false},
                   {upstream_set, &quot;my-upstreams&quot;}]
                 ]}, </code></pre></div><div>It appears in the web interface as:</div><div><pre style="margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid rgb(204,204,204);font-size:13px;font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;background-color:rgb(248,248,248);line-height:19px;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">

<code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Type    x-federation
Parameters   arguments: upstream-set:   my-upstreams
                                                type:   topic
                         durable:   true</code></pre></div><div>I try to use it in Ruby in a consumer like this:</div><div><div style="line-height:20px;color:rgb(51,51,51);font-size:13px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:0px;border:0px;padding:0px">



<pre style="margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid rgb(204,204,204);font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;background-color:rgb(248,248,248);line-height:19px;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">

<span style="margin:0px;padding:0px;border:0px">exchange</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(0,128,128)">AMQP</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">::</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,128,128)">Exchange</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">new</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px">channel</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&quot;x-federation&quot;</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&quot;my-exchange&quot;</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:durable</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">=&gt;</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span><span style="margin:0px;padding:0px;border:0px">)</span>
</pre><div><span style="margin:0px;padding:0px;border:0px">However in the RabbitMQ config I get this error:</span></div><div><span style="margin:0px;padding:0px;border:0px"><pre style="margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid rgb(204,204,204);font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;background-color:rgb(248,248,248);line-height:19px;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">

<code style="margin:0px;padding:0px;border:none;font-size:12px;font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">connection &lt;0.16597.1&gt;, channel 2 - error:
{amqp_error,precondition_failed,
            &quot;inequivalent arg &#39;type&#39;for exchange &#39;xanview&#39; in vhost &#39;/&#39;: received none but current is the value &#39;topic&#39; of type &#39;longstr&#39;&quot;,
            &#39;exchange.declare&#39;}</code></pre></span></div></div></div><div>It seems something in the Ruby-AMQP gem is preventing me from using an exchange type &quot;x-federation&quot;?</div><div><br></div><div>Also when I try to consume messages sent to a federated exchange using your typical:</div>



<div><pre style="margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid rgb(204,204,204);font-size:13px;font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;background-color:rgb(248,248,248);line-height:19px;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">

<span style="margin:0px;padding:0px;border:0px;color:rgb(0,128,128)">AMQP</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">start</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;amqp://guest:guest@localhost:25672&#39;</span><span style="margin:0px;padding:0px;border:0px">)</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">|</span><span style="margin:0px;padding:0px;border:0px">connection</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px">open_ok</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">|</span>
  <span style="margin:0px;padding:0px;border:0px">channel</span>  <span style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(0,128,128)">AMQP</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">::</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,128,128)">Channel</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">new</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px">connection</span><span style="margin:0px;padding:0px;border:0px">)</span>
  <span style="margin:0px;padding:0px;border:0px">channel</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">queue</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&quot;&quot;</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:durable</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">=&gt;</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span><span style="margin:0px;padding:0px;border:0px">)</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">|</span><span style="margin:0px;padding:0px;border:0px">queue</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">|</span>
    <span style="margin:0px;padding:0px;border:0px">queue</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">bind</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;xanview&#39;</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:routing_key</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">=&gt;</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;#&#39;</span><span style="margin:0px;padding:0px;border:0px">)</span>
    <span style="margin:0px;padding:0px;border:0px">queue</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">subscribe</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">|</span><span style="margin:0px;padding:0px;border:0px">metadata</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px">payload</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">|</span>
      <span style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">puts</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&quot;Recieved message: </span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">#{</span><span style="margin:0px;padding:0px;border:0px">payload</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">inspect</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">}</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">.&quot;</span>
    <span style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span> 
  <span style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span> 
<span style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></pre></div><div>I get this exception for the first message received:</div><div><pre style="margin-top:15px;margin-bottom:15px;padding:6px 10px;border:1px solid rgb(204,204,204);font-size:13px;font-family:Consolas,Menlo,&#39;Liberation Mono&#39;,Courier,monospace;background-color:rgb(248,248,248);line-height:19px;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">

<span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,38)">/usr/</span><span style="margin:0px;padding:0px;border:0px">local</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">rvm</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">ruby</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">p194</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">protocol</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">lib</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">protocol</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">table</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">rb</span><span style="margin:0px;padding:0px;border:0px">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">89</span><span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:in</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">`decode&#39;: NotImplementedError (NotImplementedError)</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-protocol-0.9.3/lib/amq/protocol/table_value_decoder.rb:144:in `</span><span style="margin:0px;padding:0px;border:0px">decode_hash</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-protocol-0.9.3/lib/amq/protocol/table_value_decoder.rb:46:in `decode_array&#39;</span>
    <span style="margin:0px;padding:0px;border:0px">from</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,38)">/usr/</span><span style="margin:0px;padding:0px;border:0px">local</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">rvm</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">ruby</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">p194</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">protocol</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">lib</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">protocol</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">table</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">rb</span><span style="margin:0px;padding:0px;border:0px">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">99</span><span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:in</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">`decode&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-protocol-0.9.3/lib/amq/protocol/client.rb:1560:in `</span><span style="margin:0px;padding:0px;border:0px">block</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span style="margin:0px;padding:0px;border:0px">decode_properties</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-protocol-0.9.3/lib/amq/protocol/client.rb:1543:in `each&#39;</span>
    <span style="margin:0px;padding:0px;border:0px">from</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,38)">/usr/</span><span style="margin:0px;padding:0px;border:0px">local</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">rvm</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">ruby</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">p194</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">protocol</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">lib</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">protocol</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">client</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">rb</span><span style="margin:0px;padding:0px;border:0px">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1543</span><span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:in</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">`decode_properties&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-protocol-0.9.3/lib/amq/protocol/frame.rb:142:in `</span><span style="margin:0px;padding:0px;border:0px">decode_payload</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-protocol-0.9.3/lib/amq/protocol/frame.rb:115:in `body_size&#39;</span>
    <span style="margin:0px;padding:0px;border:0px">from</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,38)">/usr/</span><span style="margin:0px;padding:0px;border:0px">local</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">rvm</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">ruby</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">p194</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">client</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">lib</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">client</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">async</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">adapter</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">rb</span><span style="margin:0px;padding:0px;border:0px">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">675</span><span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:in</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">`content_complete?&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-client-0.9.3/lib/amq/client/async/adapter.rb:667:in `</span><span style="margin:0px;padding:0px;border:0px">frameset_complete?</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/amq-client-0.9.3/lib/amq/client/async/adapter.rb:518:in `receive_frame&#39;</span>
    <span style="margin:0px;padding:0px;border:0px">from</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,38)">/usr/</span><span style="margin:0px;padding:0px;border:0px">local</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">rvm</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">ruby</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">p194</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">client</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">lib</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amq</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">client</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">async</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">adapters</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">event_machine</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">rb</span><span style="margin:0px;padding:0px;border:0px">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">327</span><span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:in</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">`receive_data&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `</span><span style="margin:0px;padding:0px;border:0px">run_machine</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run&#39;</span>
    <span style="margin:0px;padding:0px;border:0px">from</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,38)">/usr/</span><span style="margin:0px;padding:0px;border:0px">local</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">rvm</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">ruby</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px">p194</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">gems</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amqp</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">9</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">6</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">lib</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">amqp</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">/</span><span style="margin:0px;padding:0px;border:0px">connection</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">.</span><span style="margin:0px;padding:0px;border:0px">rb</span><span style="margin:0px;padding:0px;border:0px">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">38</span><span style="margin:0px;padding:0px;border:0px;color:rgb(153,0,115)">:in</span> <span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">`start&#39;</span>
<span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">    from client1.rb:7:in `</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">&lt;</span><span style="margin:0px;padding:0px;border:0px">main</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">&gt;</span><span style="margin:0px;padding:0px;border:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">&#39;</span></pre>



</div><div>Any advice would be greatly appreciated. Maybe someone has an example of using RabbitMQ Federation with the Ruby-AMQP gem?</div><div><br></div><div>Thank you,</div><div><br></div><div>Roman</div>
</blockquote></div><br></div>