ObjectHelper.notNull(expression, "expression", this);
ExpressionResultComparator comparator = config.getComparator();
comparator.setExpression(expression);
StreamResequencer resequencer = new StreamResequencer(routeContext.getCamelContext(), processor, comparator);
resequencer.setTimeout(config.getTimeout());
resequencer.setCapacity(config.getCapacity());
resequencer.setRejectOld(config.getRejectOld());
if (config.getIgnoreInvalidExchanges() != null) {
resequencer.setIgnoreInvalidExchanges(config.getIgnoreInvalidExchanges());
}
return resequencer;
}