The amqp0-8.pdf spec states:<div><br></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Helvetica">The content body payload is an opaque binary block followed by a frame end octet:</p>
<p></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">+-----------------------+ +-----------+<span style="font: 12.0px Helvetica"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">| Opaque binary payload | | frame-end |<span style="font: 12.0px Helvetica"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">+-----------------------+ +-----------+<span style="font: 12.0px Helvetica"> </span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px;"><br>
</span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px;">However, sending the extra frame-end octet with the content causes rabbitmq to get "stuck". In fact, this occurs anytime rabbitmq reads more content data than it is expecting. Here is a naive patch to ignore extra content in the body frame:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px;"><br></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">
<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px;"></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">diff -r 2453e5783900 src/rabbit_framing_channel.erl</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">
--- a/src/rabbit_framing_channel.erl<span class="Apple-tab-span" style="white-space:pre">        </span>Tue Jul 08 12:16:59 2008 +0100</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">+++ b/src/rabbit_framing_channel.erl<span class="Apple-tab-span" style="white-space:pre">        </span>Mon Jul 14 16:31:03 2008 -0700</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">@@ -101,6 +101,10 @@</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"> collect_content_payload(_ChannelPid, 0, Acc) -></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"> Acc;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">+collect_content_payload(_ChannelPid, RemainingByteCount, Acc) when RemainingByteCount < 0 -></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">+ Content = list_to_binary(Acc),</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">+ {Ret, _} = split_binary(Content, size(Content) + RemainingByteCount),</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">+ [Ret];</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"> collect_content_payload(ChannelPid, RemainingByteCount, Acc) -></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">
case read_frame(ChannelPid) of</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"> {content_body, FragmentBin} -></p><p></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px;"><br>
</span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px;"> Aman</span></p></div>