[Proof-of-concept] Strict topic priority for bandwidth-constrained situations #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not meant for merging or production (yet?), just as a potential idea.
I hacked up the client to (1) prefer sending messages from topics in higher priority groups, over messages from topics in lower priority groups and (2) consume messages continuously in a separate goroutine to keep our local buffers full. It's super messy and has some config hard-coded in but shows that the basic algorithm works.
Why? This was an ask for use cases where bandwidth can be limited, and you want to be able to prioritize delivery/replication of important messages back to the centralized cluster until you get more bandwidth or the production of important messages slows down.