You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Tombs <cy...@gmail.com> on 2011/08/09 17:05:44 UTC

never deliver out-of-order message with resequencer

Hi all,

I am using the resequencer EIP in a situation where it would be better
never to pass on a message at all than to process it out-of-order. The
EIP, however, will deliver out-of-order messages if the timeout occurs
before receiving an expected message. For example, we receive:

1, 2, 3, 4, 5, 7, 8, (wait 10s), 6.

In this case, the rest of the route will receive messages in the above
order with 6 last.

Any ideas on how to avoid this? My only thought right now is to put a
filter after the resequencer to reject any messages that would precede
the last message passed on.

Thanks in advance,
David

-- 
Wise men _still_ seek Him.

Re: never deliver out-of-order message with resequencer

Posted by David Tombs <cy...@gmail.com>.
On Wed, Aug 10, 2011 at 10:25 AM, Claus Ibsen <cl...@gmail.com> wrote:

> In fact we may add support directly on the resequencer as well to
> filter out out of sequence numbers in case it have send out a batch.
> Fell free to create a JIRA ticket. And if possible working on a patch
> with unit test.

Done, see <https://issues.apache.org/jira/browse/CAMEL-4327>. I will
submit a unit test if I get the chance.

Thanks again,
David

-- 
Wise men _still_ seek Him.

Re: never deliver out-of-order message with resequencer

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Aug 10, 2011 at 4:17 PM, David Tombs <cy...@gmail.com> wrote:
> On Wed, Aug 10, 2011 at 7:42 AM, Claus Ibsen <cl...@gmail.com> wrote:
>> On Tue, Aug 9, 2011 at 5:05 PM, David Tombs <cy...@gmail.com> wrote:
>>> Hi all,
>>>
>>> I am using the resequencer EIP in a situation where it would be better
>>> never to pass on a message at all than to process it out-of-order. The
>>> EIP, however, will deliver out-of-order messages if the timeout occurs
>>> before receiving an expected message. For example, we receive:
>>>
>>> 1, 2, 3, 4, 5, 7, 8, (wait 10s), 6.
>>>
>>> In this case, the rest of the route will receive messages in the above
>>> order with 6 last.
>>>
>>> Any ideas on how to avoid this? My only thought right now is to put a
>>> filter after the resequencer to reject any messages that would precede
>>> the last message passed on.
>>>
>>
>> You can use a very high timeout value.
>
> Thanks for the response, but a very high timeout value doesn't really
> solve my problem because I really need "never". It is also possible to
> have dropped messages, so such a high timeout could harm performance
> in that case.
>
> What do you think about my filter idea?

Yeah that is a good idea.

In fact we may add support directly on the resequencer as well to
filter out out of sequence numbers in case it have send out a batch.
Fell free to create a JIRA ticket. And if possible working on a patch
with unit test.

In the future we plan to refactor the code for the resequencer, as we
need to add more easily pluggable API for stores (persistence). And
have it support recovery and redelivery etc. Just as the aggregator
EIP now supports.



>
> Thanks again,
> David
>
> --
> Wise men _still_ seek Him.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: never deliver out-of-order message with resequencer

Posted by David Tombs <cy...@gmail.com>.
On Wed, Aug 10, 2011 at 7:42 AM, Claus Ibsen <cl...@gmail.com> wrote:
> On Tue, Aug 9, 2011 at 5:05 PM, David Tombs <cy...@gmail.com> wrote:
>> Hi all,
>>
>> I am using the resequencer EIP in a situation where it would be better
>> never to pass on a message at all than to process it out-of-order. The
>> EIP, however, will deliver out-of-order messages if the timeout occurs
>> before receiving an expected message. For example, we receive:
>>
>> 1, 2, 3, 4, 5, 7, 8, (wait 10s), 6.
>>
>> In this case, the rest of the route will receive messages in the above
>> order with 6 last.
>>
>> Any ideas on how to avoid this? My only thought right now is to put a
>> filter after the resequencer to reject any messages that would precede
>> the last message passed on.
>>
>
> You can use a very high timeout value.

Thanks for the response, but a very high timeout value doesn't really
solve my problem because I really need "never". It is also possible to
have dropped messages, so such a high timeout could harm performance
in that case.

What do you think about my filter idea?

Thanks again,
David

-- 
Wise men _still_ seek Him.

Re: never deliver out-of-order message with resequencer

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Aug 9, 2011 at 5:05 PM, David Tombs <cy...@gmail.com> wrote:
> Hi all,
>
> I am using the resequencer EIP in a situation where it would be better
> never to pass on a message at all than to process it out-of-order. The
> EIP, however, will deliver out-of-order messages if the timeout occurs
> before receiving an expected message. For example, we receive:
>
> 1, 2, 3, 4, 5, 7, 8, (wait 10s), 6.
>
> In this case, the rest of the route will receive messages in the above
> order with 6 last.
>
> Any ideas on how to avoid this? My only thought right now is to put a
> filter after the resequencer to reject any messages that would precede
> the last message passed on.
>

You can use a very high timeout value.


> Thanks in advance,
> David
>
> --
> Wise men _still_ seek Him.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/