Draining mode doesn't work properly #361
-
Description of my configuration for parallel consumers:
I have created an integration test to push events with specific sequence: events are pushed into a topic consumed by parallel consumers with key conversationId and finally events are sent to an endpoint in charge of recognizing "out of sequence" of the events, data duplication, data loss per conversationId . During the test we destroy the bean into the context of spring simulating the shutdown and after a while inject the bean and recreate the parallel consumers entities. I'm reporting the behaviours about the draining mode exposed by following the APIs:
While the closeDrainFirst sends all the events present in the queue before to commit the offset map, on the opposite the closeDontDrainFirst seems to close the connection and doesn't commit at all the current offset map (The error message raised is "Connection was closed " caught in the onFailure handler for Vert.x module)
Further : parallelStreamProcessor.closeDrainFirst(Duration.ofSeconds(XXX)); We can see the following error when timeout expires :
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
[note:] This was a symptom of #365. Hello again! Thanks for submitting your feedback and your rigorous testing! 🤗 Draining hasn't been visited in a while. Upon refreshing myself - it is very aggressive. So what the draining system is currently, is that it basically stops polling for more records, but doesn't close until all previously polled and queued records get finished processing. So - that could be a very long time yes (thousands or more records). I'm not sure how popular this feature is. With The closeDontDrainFirst system should wait for inflight to complete, and commit before closing. Perhaps this isn't functioning as intended in the Vertx module. Looking it - yes, it does immediately close the WebClient - that's probably in the wrong order. - Because of this, there may end up being no committable offsets. May I ask - what is your main driver for using the Vert.x module? |
Beta Was this translation helpful? Give feedback.
[note:] This was a symptom of #365.
Hello again! Thanks for submitting your feedback and your rigorous testing! 🤗
Draining hasn't been visited in a while. Upon refreshing myself - it is very aggressive. So what the draining system is currently, is that it basically stops polling for more records, but doesn't close until all previously polled and queued records get finished processing. So - that could be a very long time yes (thousands or more records).
I'm not sure how popular this feature is.
With
closeDontDrainFirst
, if you have concurrency set to 10 - this would only wait until (up to) those 10 records are completed, commit, then close.The closeDontDrainFirst system should wait…