[rabbitmq-discuss] [ANNOUNCEMENT] Introducing Lyra: A High Availability RabbitMQ Client
jhalterman at gmail.com
Thu Oct 24 04:14:53 BST 2013
Hey Michael - Comments below:
On Wed, Oct 23, 2013 at 5:23 PM, Michael Klishin <mklishin at gopivotal.com>wrote:
> On 24 Oct 2013, at 03:38, Jonathan Halterman <jhalterman at gmail.com> wrote:
> > 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.
> > For more info, visit the project page:
> > https://github.com/jhalterman/lyra
> > Questions, comments, and suggestions are welcome.
> Very nice!
> A couple of questions:
> * "Automatic resource recovery" in README is a little vague. Can you
> explain how it works and what kind of scenarios does it cover?
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.
As for what recovery entails, it'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't exposed to
> * Are you familiar with how Ruby and Clojure clients perform recovery,
> e.g. ?
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'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.
If you're interested in some of these scenarios, have a look at Lyra's
functional tests (particularly the *Invocation and *Recovery test classes):
> FYI, there are chances that similar features will eventually make it into
> the Java client, although
> there is no specific plan for this at the moment. But more 3rd party
> clients that support recovery
> demonstrates the need for such features.
> 1. http://rubybunny.info/articles/error_handling.html
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss