<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 06/06/12 07:59, Tim Watson wrote:
    <blockquote cite="mid:4FCEFFED.8030805@rabbitmq.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      On 05/06/12 21:24, Walter Moore wrote:
      <blockquote
cite="mid:9C2464101709B84785BAD99CFC4B69A20878063C@SUSIAALEXMB1.FCStone.com"
        type="cite">
        <meta http-equiv="Content-Type" content="text/html;
          charset=ISO-8859-1">
        <meta name="Generator" content="Microsoft Word 14 (filtered
          medium)">
        <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
        <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
        <div class="WordSection1">
          <p class="MsoNormal">Hello,<o:p></o:p></p>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          <p class="MsoNormal">I have a long&nbsp; running, durable,
            non-auto-delete, non-exclusive, RabbitMq consumer (.Net
            client) that works perfectly unless a 15 minute (+-
            approximately 3 seconds) period of inactivity occurs.&nbsp; After
            15 minutes of messaging inactivity a
            &#8220;System.IO.EndOfStreamException: SharedQueue closed&#8221;
            exception is thrown (and continues to be thrown for each
            subsequent call to &lt;model&gt;.BasicConsume()).&nbsp; Is this
            the expected behavior?&nbsp; I am using NoAck = true for each
            dequeue..<o:p></o:p></p>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        </div>
      </blockquote>
      Hi Walter,<br>
      <br>
      When you say 'non-auto-delete' do you mean to say there is not TTL
      specified on the messages? <br>
      I also wondered if you have AMQP heartbeats enabled - see <a
        moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2012-May/020236.html">http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2012-May/020236.html</a>
      for a discussion of this - as that could cause a connection to be
      terminated after a specified period of inactivity. <br>
      <br>
    </blockquote>
    Looking further at the client code, I can see that the heartbeat is
    implemented on the client as well as the server. If this times out,
    we do indeed get an EndOfStreamException (with a message like
    "Heartbeat missing with heartbeat == &lt;n&gt; seconds") - see
    <a class="moz-txt-link-freetext" href="http://hg.rabbitmq.com/rabbitmq-dotnet-client/file/default/projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs#l541">http://hg.rabbitmq.com/rabbitmq-dotnet-client/file/default/projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs#l541</a>
    for the details.<br>
    <br>
    Looking at the SharedQueue class, I can see that once closed, it
    will continuously throw this exception whenever you try to dequeue.
    So this looks like a possible cause to me. Can you verify whether or
    not you've got AMQP heartbeat timeouts enabled?<br>
    <br>
    Cheers,<br>
    Tim<br>
    <br>
    <blockquote cite="mid:4FCEFFED.8030805@rabbitmq.com" type="cite">
      I'll have a look in the .NET client code, as this doesn't seem
      like the exception class I'd expect to be thrown in a heartbeat
      timeout situation, but I thought it was worth mentioning just in
      case.<br>
      <br>
      If possible, can you tell us exactly (scratching any private data
      such as the broker, queue and/or exchange names of course) what
      parameters you're passing to declare the queue and exchange(s) as
      well as the consumer set up? <br>
      <br>
      Cheers,<br>
      Tim<br>
      <blockquote
cite="mid:9C2464101709B84785BAD99CFC4B69A20878063C@SUSIAALEXMB1.FCStone.com"
        type="cite">
        <div class="WordSection1">
          <p class="MsoNormal">Thank you,&nbsp; &nbsp;<o:p></o:p></p>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          <p class="MsoNormal"><b><span style="color:#1F497D"><img
                  id="Picture_x0020_1"
                  src="cid:part2.08020705.00020702@rabbitmq.com"
                  alt="Description: Description: Description:
                  INTLFCStone" height="60" width="228"><o:p></o:p></span></b></p>
          <p class="MsoNormal"><b><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></b></p>
          <p class="MsoNormal"><b><span style="color:#1F497D">Walter
                Moore<o:p></o:p></span></b></p>
          <p class="MsoNormal"><span style="color:#1F497D">Head of
              Transactional Data Exchange<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D">INTL FCStone
              Inc<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D">230 S.
              LaSalle Street<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D">Suite 10-500<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D">Chicago IL&nbsp;
              60604<o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
                style="font-size:12.0pt;color:#1F497D">Direct
                312-789-2538<o:p></o:p></span></b></p>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
rabbitmq-discuss mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rabbitmq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>
<a class="moz-txt-link-freetext" href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>