xactor
xactor copied to clipboard
How to have multiple actors subscribe to the same task and not duplicate work?
Currently if I spawn multiple actors:
let _daddr = DownloadActor::start_default().await.unwrap();
let _daddr2 = DownloadActor::start_default().await.unwrap();
and then publish a job:
Broker::from_registry().await.unwrap().publish(msg)
the effect I get is that each actor picks up the job. What I'd like is just one of them to pick up the job, like you'd have with a normal FIFO queue system.
Is that possible with xactor
?