I read this (https://camel.apache.org/components/latest/eips/resequence-eip.html#_stream_resequencing) description and tried to realize stream resequencing. Here the problem part is:
from("kafka:in?brokers=localhost:9092&groupId=test")
.resequence(header("seqNum"))
.stream()
.timeout(10000L)
.to("kafka:out?brokers=localhost:9092");
My program always wait for timeout and doesn't send messages before it - even though the sequence doesn't have any gaps. For example, i send 4 messages with "seqNum" 1,3,4,2 respectively - it has no gaps, but the program still wait for timeout.
Am i missed something? Maybe i have to declare some borders somehow? For example to specify the size of "no gaps" sequence? By the way - to set the capacity is not a solution.