THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
from("direct:start").resequencer(headerbody("seqnum")).batch(new BatchResequencerConfig(300, 4000L)).to("mock:result") |
...
Using the Spring XML Extensions
Code Block | ||||
---|---|---|---|---|
| ||||
<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="direct:start" />
<resequencer>
<simple>body</simple>
<to uri="mock:result" />
<!--
batch-config can be ommitted for default (batch) resequencer settings
-->
<batch-config batchSize="300" batchTimeout="4000" />
</resequencer>
</route>
</camelContext>
|
Stream Resequencing
The next example shows how to use the stream-processing resequencer. Messages are re-ordered based on their sequence numbers given by a seqnum
header using gap detection and timeouts on the level of individual messages.
...