-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Websocket batch processing / read completion event #5178
Labels
Milestone
Comments
I guess this could be available to any socket/streams. |
@kovax that's right |
I think the major work is define how that works with back-pressure pause/fetch/resume overall in a consistent manner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
Facilitate processing multiple available messages from a websocket in a batch. A possible solution is to provide a read completion event which indicates that all currently available messages from the network buffer were consumed.
Use cases
This allows improving latency in high-load / bursty consumers. For example, when consuming a real-time API with batch processing the consumer may skip messages to act only on the latest one in case of a burst / hiccup, effectively shedding load without introducing additional latency.
Contribution
Since the design has to consider feature interactions, such as back-pressure, I would request a core developer to look into this. Happy to provide support with review and testing.
The text was updated successfully, but these errors were encountered: