Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to have multiple actors subscribe to the same task and not duplicate work? #45

Open
ilmoi opened this issue Jun 27, 2021 · 0 comments

Comments

@ilmoi
Copy link

ilmoi commented Jun 27, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant