rust-amqp
rust-amqp copied to clipboard
Consumer should allow having several workers
For now, the consumer handles new deliveries one by one. It would be cool if we could say something like "handle 10 messages in parallel"
@Keruspe Did you try to run several consumers, where each is backed up by a single thread? Also it's a good idea to open a new channel for each thread interacting with a connection. So 1 channel <-> 1 thread.
I tried but for some reason only one of the consumers was actually consuming messages too.
I iterated on top on #39 though and got really awkward results, will update the issue
Fwiw, in my reproducer from #39 (https://github.com/Keruspe/rust-amqp-bugs) I also added an example of my attempt at having several consumers in several threads, which reproduces my "only one consumer actually consumes.
export AMQP_URL then
cargo run --bin publish-data
cargo run --bin multi-consumer