Cancel Messages Related To A Flow-Control #177
sancar
announced in
Q: Released
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem:
Cancelling a message the Flow-control does not take affect immediately. Especially with the
rateoption. In the current implementation, with therate, The messages are scheduled to fire in the future. Because of this implementation, the cancel is recordedCANCEL_REQUESTEDfor all these messages and onlyloggedasCANCELLEDwhen the schedule time hits.Another big problem is that, when you want to fire a new message with the flow control, all the slots in the future is already taken by -soon to be cancelled- messages. This makes cancel effectively unusable.
Solution:
The flow control is rewritten to take the
CANCELinto account sooner. And new messages does not need to wait for old slots to be opened.Details:
With the new implementation, the messages are not scheduled to the future but put to a ordered
wait listto be fired when theflow controllimit allows. When a flow control is cancelled. Again all the messages in progress are marked asCANCEL REQUESTED.The new messages are immediately put to
wait list. When a flow control limit is opened andwaitlistneeds to be consumed, theCANCEL REQUESTEDmessages are allCANCELLEDimmediately. This allows, new messages in the wait list are fired immediately as well.Beta Was this translation helpful? Give feedback.
All reactions