This suggestion will fix the immediate problem but should be handled more nicely in future. A separate thread is spawn to handle start_consuming. When message is fetched channel is closed and the thread is panicked to exit. Then session is closed and program exits.
Unfortunately there is no clean way to stop consuming yet, https://github.com/Antti/rust-amqp/issues/23
This suggestion will fix the immediate problem but should be handled more nicely in future. A separate thread is spawn to handle start_consuming. When message is fetched channel is closed and the thread is panicked to exit. Then session is closed and program exits.