[ 
https://issues.apache.org/jira/browse/CAMEL-24930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18118344#comment-18118344
 ] 

shashank commented on CAMEL-24930:
----------------------------------

Sorry about that, the Blocker priority was set by mistake (a form default I 
didn't change) on this and the related tickets I filed today. Thanks for fixing 
them; new tickets will be Minor.

> Resequence EIP docs say the last of duplicate messages is kept, but the first 
> one is kept
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24930
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24930
>             Project: Camel
>          Issue Type: Task
>          Components: camel-core
>            Reporter: shashank
>            Priority: Minor
>
> {{resequence-eip.adoc}} says: "By default, the Resequencer does not support 
> duplicate messages and will only keep the last message, in case a message 
> arrives with the same message expression." The "Allow Duplicates" section 
> repeats this ("instead of keeping only the last duplicated message").
> Both resequencers keep the *first* message and drop the later ones:
> * Batch: {{Resequencer.createSet}} uses a {{TreeSet}}, which ignores an 
> element equal to one it already holds. 
> {{BatchResequencerWithDuplicateTest.testBatchResequencerNoDuplicate}} sends 
> A(1), C(2), D(2), F(4), B(1), E(3) and asserts A, C, E, F.
> * Stream: {{ResequencerEngine.insert}} calls {{sequence.add(element)}} on a 
> {{TreeSet}} as well. Sending B(2), A1(1), A2(1) to 
> {{resequence(header("seqno")).stream()}} delivers A1, B. A2 is dropped.
> Proposed fix: correct the two sentences in the docs (the code behaviour is 
> covered by an existing test, so it is the docs that are wrong), and add a 
> test for the stream mode.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to