I also find these samples to be a little simplistic.<div><br></div><div>1. They never include heartbeat settings, and the .NET documentation is pretty thin on these as well. �Setting a heartbeat is pretty important, otherwise if there is a network problem and your client loses connectivity, neither your client or the message broker seem to know about it. �Samples never seem to do this.</div>

<div>2. They never include error handling - there are some useful exceptions raised if connections drop, killing a subscription.</div><div>3. They never include multithreading concerns. �It isn&#39;t always possible or efficient to spin up multiple consumer processes to achieve concurrency. �It seems important to note that sharing a Connection is OK (and probably a good thing since Connections use a limited OS resource), but sharing a Model is not OK. �From 2.10 of the API guide:�</div>

<div><br></div><div>If more than one thread needs to access a particular IModel instances, the application should enforce�mutual exclusion itself. One way of achieving this is for all users of an IModel to lock the instance�itself:<div>

IModel ch = RetrieveSomeSharedIModelInstance();</div><div>lock (ch) {</div><div>ch.BasicPublish(...);</div><div>}</div><div><br></div><div>I wish these samples would go into more detail about these scenarios.</div><br><div class="gmail_quote">

On Mon, Jul 23, 2012 at 9:35 AM, Christoph <span dir="ltr">&lt;<a href="mailto:langalaxy@gmail.com" target="_blank">langalaxy@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 not sure if you have already found these, but there are also Code Examples of the book &quot;RabbitMQ in Action&quot; available on GitHub:�
<a href="https://github.com/rabbitinaction/sourcecode/tree/master/csharp/appendix-a" target="_blank">https://github.com/rabbitinaction/sourcecode/tree/master/csharp/appendix-a</a><br>_______________________________________________<br>


rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div>