Rabbit auto uses https://github.com/CleverCloud/lapin.
The library provides a consumer and a publisher, which after the first successful connection run until manually closed. In case of loosing connection to RabbitMQ, they wait until the connection is reestablished without failing.
The current async runtime used is tokio, but it can be easily extended (in the library code) to use different ones.
The version 0.3.0 has a bug which stops automatic reconnection.
There is some deadlock, which I was not able to track, so I have refactored the whole process, and kept most of the interfaces unchanged.
But the configure function has changed, and it is no longer async function.
At the moment the latest version only supports tokio.
Config requires FullExecutor trait and Reactor trait.
Using tokio-reactor-trait and tokio-executor-trait makes this easy.
use ;
use Comms;
use Config;
/// If the configure is not called, the library will kill the app using `std::process::exit()`
/// The configure function is no longer async!
configure