Skip to content

Proper strategy for handling CPU and I/O-bound events #1278

Answered by Lancetnik
pySilver asked this question in Q&A
Discussion options

You must be logged in to vote

@pySilver sorry for answering so late, I am just missed the question. Next time be free to tag me directly or ask for help in discord.

Q1: it is ok to create two different FastStream instances to process CPU and I/O-bound tasks separately. It is required to don't block your broker at CPU-bounded ones and still process I/O tasks. Workers always gives you scaling benefits, but there is no reason to creat a lot of workers if you have no such strong incoming stream.

Q2: max_workers is an option allows you to consume multiple messages from the same subject in the same time without workers. It doesn't help you to throttle messages and we have no such mechanism in box, sorry

Q3: sure, PullSubscr…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Lancetnik
Comment options

Answer selected by pySilver
@pySilver
Comment options

@Lancetnik
Comment options

@pySilver
Comment options

@Lancetnik
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants