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

Parallel consumers from 1 queue #270

Closed
maciejbak85 opened this issue May 7, 2020 · 2 comments
Closed

Parallel consumers from 1 queue #270

maciejbak85 opened this issue May 7, 2020 · 2 comments

Comments

@maciejbak85
Copy link

Is there an option to run multiple consumers from 1 queue ?
( Or it can be achieved only by running multiple streams from 1 queue and set proper VisibilityTimeout to avoid duplicates. )

thanks!

@ghostdogpr
Copy link
Member

Sure, the API gives you a ZIO Stream, you can use some of the parallel stream combinators like mapMPar to have multiple consumers.

@maciejbak85
Copy link
Author

sqsService.consumeRequests().mapMParUnordered(4)(processBaseOnType).runDrain

ok cool thanks

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

2 participants