protected Endpoint<Exchange> createEndpoint(String uri, String remaining, Map parameters) throws Exception {
LoggingLevel level = getLoggingLevel(parameters);
Integer groupSize = getAndRemoveParameter(parameters, "groupSize", Integer.class);
Logger logger;
if (groupSize != null) {
logger = new ThroughputLogger(remaining, level, ObjectConverter.toInteger(groupSize));
} else {
LogFormatter formatter = new LogFormatter();
IntrospectionSupport.setProperties(formatter, parameters);
logger = new Logger(remaining);
logger.setLevel(level);
logger.setFormatter(formatter);
}
return new ProcessorEndpoint(uri, this, logger);
}