<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
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";
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Tim,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I am not explicitly setting the TTL when creating the queue. Looking over the TTL docs, it looks like declaring the queue with “x-expires” set to a very large (long-long-int) number would effectively fix the
issue. I’ll give that a shot this morning.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I have confirmed via logging that Heartbeat = 0 in the .Net client connection.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">It is probably also worth mentioning that this is occurring on an SSL connection. The exchange is manually configured via the Management plugin web interface using the following parameters:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Type: topic<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Durable: true<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">The queue is created with the following parameters:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">QueueName: <ApplicationName>.<ProcessName>.<ConsumerName><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Durable: true<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Exclusive: false<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">AutoDelete: false<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Arguments: null<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">The queue is bound to a number of filters of the form <ApplicationName>.<ProcessName>.<ProducerName> which can be on several different exchanges. The queue name, routing keys, and key bindings are all managed
with an internally developed toolset. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thank you,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><b><span style="color:#1F497D"><img width="228" height="60" id="_x0000_i1026" src="cid:image001.png@01CD43C6.B51E9B80" alt="Description: Description: Description: INTLFCStone"><o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="color:#1F497D"><o:p> </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 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>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Tim Watson [mailto:tim@rabbitmq.com]
<br>
<b>Sent:</b> Wednesday, June 06, 2012 2:32 AM<br>
<b>To:</b> Walter Moore<br>
<b>Cc:</b> rabbitmq-discuss@lists.rabbitmq.com<br>
<b>Subject:</b> Re: [rabbitmq-discuss] EndOfStreamException after 15 minutes of inactivity<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On 06/06/12 07:59, Tim Watson wrote: <o:p></o:p></p>
<p class="MsoNormal">On 05/06/12 21:24, Walter Moore wrote: <o:p></o:p></p>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have a long 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. After 15 minutes of messaging inactivity
a “System.IO.EndOfStreamException: SharedQueue closed” exception is thrown (and continues to be thrown for each subsequent call to <model>.BasicConsume()). Is this the expected behavior? I am using NoAck = true for each dequeue..<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">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 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.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">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 == <n> seconds") - see <a 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>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">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>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal">Thank you, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><b><span style="color:#1F497D"><img border="0" width="228" height="60" id="Picture_x0020_1" src="cid:image001.png@01CD43C6.B51E9B80" alt="Description: Description: Description:
INTLFCStone"></span></b><o:p></o:p></p>
<p class="MsoNormal"><b><span style="color:#1F497D"> </span></b><o:p></o:p></p>
<p class="MsoNormal"><b><span style="color:#1F497D">Walter Moore</span></b><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Head of Transactional Data Exchange</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">INTL FCStone Inc</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">230 S. LaSalle Street</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Suite 10-500</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Chicago IL 60604</span><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:#1F497D">Direct 312-789-2538</span></b><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>rabbitmq-discuss mailing list<o:p></o:p></pre>
<pre><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><o:p></o:p></pre>
<pre><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><o:p></o:p></pre>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>rabbitmq-discuss mailing list<o:p></o:p></pre>
<pre><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><o:p></o:p></pre>
<pre><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><o:p></o:p></pre>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
</div>
</body>
</html>