internal.addAdvice(new CamelInternalProcessor.RouteContextAdvice(routeContext));
ObjectHelper.notNull(config, "config", this);
ObjectHelper.notNull(expression, "expression", this);
Resequencer resequencer = new Resequencer(routeContext.getCamelContext(), internal, expression,
config.isAllowDuplicates(), config.isReverse());
resequencer.setBatchSize(config.getBatchSize());
resequencer.setBatchTimeout(config.getBatchTimeout());
if (config.getIgnoreInvalidExchanges() != null) {
resequencer.setIgnoreInvalidExchanges(config.getIgnoreInvalidExchanges());
}
return resequencer;
}