<font class="Apple-style-span" color="#676767" face="arial, sans-serif">Below is a code snippet of my receiving code</font><div><font class="Apple-style-span" color="#676767" face="arial, sans-serif"><br></font></div><div>
<font class="Apple-style-span" color="#676767"><blockquote><font class="Apple-style-span" face="arial, sans-serif"> </font><font class="Apple-style-span" face="&#39;arial narrow&#39;, sans-serif">     amqp_frame_t frame;<br>
      amqp_maybe_release_buffers(myConnection);<br>      int result = amqp_simple_wait_frame(myConnection, &amp;frame);<span class="Apple-tab-span" style="white-space: pre; ">        <br></span><span class="Apple-tab-span" style="white-space: pre; ">        </span>  <br>
      if (result &lt; 0)<br>      {<br>        return -1;<br>      }<br>      if (frame.frame_type != AMQP_FRAME_METHOD)<br>      {<br>        return 0;<br>      }<br>      if (<a href="http://frame.payload.method.id">frame.payload.method.id</a> != AMQP_BASIC_DELIVER_METHOD)<br>
      {<br>        return 0;<br>      }<br>      result = amqp_simple_wait_frame(myConnection, &amp;frame);<br><span class="Apple-tab-span" style="white-space: pre; ">                <br></span>      if (result &lt; 0)<br>      {<br>        return -1;<br>
      }<br>      if (frame.frame_type != AMQP_FRAME_HEADER)<br>      {<br>        abort();<br>      }<br>      uint64_t target = frame.payload.properties.body_size;<br>      uint64_t received = 0;<br>      while (received &lt; target)<br>
      {<br>        result = amqp_simple_wait_frame(myConnection, &amp;frame);<br>        if (result &lt; 0)<br>        {<br>          return -1;<br>        }<br>        if (frame.frame_type != AMQP_FRAME_BODY)<br>        {<br>
          abort();<br>        }<br>        received += frame.payload.body_fragment.len;<br>      }<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>  <br>       char* recvBuffer =new char[RABBIT_BUFFER_SIZE];<br>
       memcpy(recvBuffer, frame.payload.body_fragment.bytes, frame.payload.body_fragment.len);<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>int framesize =frame.payload.body_fragment.len;</font><br><br>
<br>This code is adapted from the C client example and it is running mostly fine. However after running it on my server for 19 hours, it crashes. After tracing. it shows that </blockquote><div style="font-family: arial, sans-serif; ">
<span class="Apple-style-span" style="font-family: &#39;arial narrow&#39;, sans-serif; ">frame.payload.body_fragment.len is only 23 while received is over 10k. Am I doing something wrong? The assumption that I made after looking at the code is that frame is == message. If it is not , how could I received the entire message before processing?</span></div>
<div style="font-family: arial, sans-serif; "><span class="Apple-style-span" style="font-family: &#39;arial narrow&#39;, sans-serif; "><br></span></div><div style="font-family: arial, sans-serif; "><span class="Apple-style-span" style="font-family: &#39;arial narrow&#39;, sans-serif; ">Regards,</span></div>
<div style="font-family: arial, sans-serif; "><span class="Apple-style-span" style="font-family: &#39;arial narrow&#39;, sans-serif; ">QX </span></div></font></div>