camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Kalukiewicz" <roman.kalukiew...@gmail.com>
Subject splitter/aggregator scenatio
Date Wed, 31 Oct 2007 17:24:58 GMT
Hello!

I wanted to implement splitter/aggregator scenario and I face following problem:

When I split the original message I would like to aggregate results in
the same order - to do this I have to somehow know which message was
first, second, .. then I can use resequencer at the end to order them
and aggregate in right order.
Now I don't see any way to 'number' those messages that go from splitter.

Another thing is aggregation - I' affraid I cannot use aggregator
because few features of aggregator.
In such scenario I cannot dynamically specify how many messages to
aggregate (If I splitted to n parts i want to merge n responses) so
I'll have to wait until timeout.
Moreover timeout in BatchProcessor is something that is not started by
first message from the bath - timeouts just tick all the time and they
don't care when messages arrive.

Is there any ready solution for my problem or it just requires
creating new classes that are similar to BatchProcessor where timeout
is 'event based' and we can use some Expression to define number of
elements to collect.

Moreover maybe it is possible to set some standard header in splitter
to mark the number of the message produced? In my case to know how
many messages we have can be evaluated using xpath and set as a header
before splitter.

Thank you for all your thoughts,
Romek

Mime
View raw message