Parallel consumer Key Ordering is not working as expected #724
-
Hi Folks,
In this snapshot, we can observe that different threads are processing events with the same key in the same partition. I was expecting thread-1 to process both in order.
Configuration: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It does not dispatch event processing to the same thread in the thread pool per key - but it orders event processing to be sequential per key.. |
Beta Was this translation helpful? Give feedback.
It does not dispatch event processing to the same thread in the thread pool per key - but it orders event processing to be sequential per key..
So
partition 0 with key key-0-0 , offset 69
will only be executed afterpartition 0 with key key-0-0 , offset 68
is successfully completed - if you add a delay to user function and log timestamps - that will be visible in logs.As normally you will have way more keys than processing threads - pinning per key processing to specific threads might delay processing unnecessarily.
For example Key1, Key2, Key3 data - Key1 and Key3 both pinned to thread-1. Key3 cannot be processed until Key1 is done - even if thread-2 is available and free.