<div dir="ltr">Hey Michael - Comments below:<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 23, 2013 at 5:23 PM, Michael Klishin <span dir="ltr">&lt;<a href="mailto:mklishin@gopivotal.com" target="_blank">mklishin@gopivotal.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br>
On 24 Oct 2013, at 03:38, Jonathan Halterman &lt;<a href="mailto:jhalterman@gmail.com">jhalterman@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Lyra is a RabbitMQ client that helps you achieve high availability in your services by embracing failure, allowing for AMQP resources such as connections, channels and consumers to be automatically recovered when server or network failures occur. It also supports automatic invocation retries, and exposes a simple, lightweight API built around the Java AMQP-client library.<br>

&gt;<br>
&gt; For more info, visit the project page:<br>
&gt;<br>
&gt; <a href="https://github.com/jhalterman/lyra" target="_blank">https://github.com/jhalterman/lyra</a><br>
&gt;<br>
&gt; Questions, comments, and suggestions are welcome.<br>
<br>
</div>Very nice!<br>
<br>
A couple of questions:<br>
<br>
�* &quot;Automatic resource recovery&quot; in README is a little vague. Can you explain how it works and what kind of scenarios does it cover?<br></blockquote><div><br></div><div>Sure. Lyra distinguishes between recovery and retries. If an invocation such as Channel.basicConsume fails due to an unexpected (not user initiated) channel closure, the channel is automatically recovered, along with any consumers, according to the configured recovery policy. Likewise, if a Connection invocation fails as the result of an unexpected connection closure, the connection, along with its channels and their consumers, are recovered according to the configured policies. After the resources are recovered, the failed invocation may be retried if it is deemed retryable, according to the configured retry policy. For connection/channel closures that are not the result of an invocation, the closed resources are simply recovered in the background.</div>
<div><br></div><div>As for what recovery entails, it&#39;s basically recreating the closed resource and copying any/all state from the closed resource to the recovered resource. Lyra does this under the covers where the user isn&#39;t exposed to the details.</div>
<div>�</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
�* Are you familiar with how Ruby and Clojure clients perform recovery, e.g. [1]?<br></blockquote><div><br></div><div>Definitely! I spent a good amount of time studying every client I could find including Langohr and Bunny. The general goal of Lyra is along the lines of what Bunny strives to do with recovery. What I found was that there&#39;s a good amount of complexity in addressing the variety of failure scenarios and the combination of failures that might occur both initially and during the recovery process. For example, a channel invocation could trigger a channel closure which kicks off a recovery that fails for some other reason, requiring another channel recovery or perhaps even a connection recovery. Failures can cascade in interesting ways. Lyra strives to address this completely.</div>
<div><br></div><div>If you&#39;re interested in some of these scenarios, have a look at Lyra&#39;s functional tests (particularly the *Invocation and *Recovery test classes):</div><div><br></div><div><a href="https://github.com/jhalterman/lyra/tree/master/src/test/java/net/jodah/lyra/internal">https://github.com/jhalterman/lyra/tree/master/src/test/java/net/jodah/lyra/internal</a><br>
</div><div>�</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
FYI, there are chances that similar features will eventually make it into the Java client, although<br>
there is no specific plan for this at the moment. But more 3rd party clients that support recovery<br>
demonstrates the need for such features.<br>
<br>
1. <a href="http://rubybunny.info/articles/error_handling.html" target="_blank">http://rubybunny.info/articles/error_handling.html</a><br>
<span class=""><font color="#888888"><br>
MK<br>
</font></span><div class=""><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div></div>