algesten / rabbiteer-rs

AMQP input/output cli tool
MIT License
14 stars 4 forks source link

exit more nice #2

Closed hazone closed 7 years ago

hazone commented 7 years ago

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.