2.0.0 is a major release that introduces automatic topology (queues,
exchanges, bindings, and consumers) recovery.
Making Automatic Connection Recovery More Awesome
1.7.0 supports automatic recovery of connections and channels
when network connectivity fails. However, recovery of queues, exchanges, bindings
and consumers was up to developers. In most cases, topology recovery
consists of a few straightforward steps:
- Re-declare queues
- Re-declare exchanges
- Re-establish bindings
- Re-register consumers
Langohr 2.0 provides a feature that performs those steps automatically. Every channel now tracks the entities declared on it and re-declares them after recovery. It’s possible to disable this feature and perform manual recovery, just like before.
For many applications, recovery from network and node failures will now be almost effortless. Give it a try and let us know how it goes!
Changes between Langohr 1.7.0 and 2.0.0
Topology (Queues, Exchanges, Bindings, Consumers) Recovery
Connection recovery now supports entity recovery. Queues, exchanges,
bindings and consumers can be recovered automatically after channel
recovery. This feature is enabled by default and can be disabled
by setting the
:automatically-recover-topology option to
:requested-channel-max Connection Option
:requested-channel-max is a new option accepted by
langohr.core/connect that configures how many channels
this connection may have. The limit is enforced on the client
0 means “no limit” and is the default.
Contributed by Glophindale.
langohr.queue/empty? is a new function that returns true if provided
queue is empty (has 0 messages ready):
1 2 3 4
langohr.core/add-shutdown-listener is a helper function that
reifies and registers a shutdown signal listener on a connection.
langohr.core/add-blocked-listener is a helper function that
reifies and registers a
listener on a connection.
Langohr change log is available on GitHub.
Langohr is a ClojureWerkz Project
- Elastisch, a minimalistic well documented Clojure client for ElasticSearch
- Cassaforte, a Clojure Cassandra client built around CQL 3.0
- Monger, a Clojure MongoDB client for a more civilized age
- Neocons, a client for the Neo4J REST API
- Quartzite, a powerful scheduling library
and several others. If you like Langohr, you may also like our other projects.