Processor mailProcessor = new MailCamelProcessor();
Processor removePropsProcessor = new RemovePropertiesProcessor();
List<HierarchicalConfiguration> processorConfs = config.configurationsAt("processor");
for (int i = 0; i < processorConfs.size(); i++) {
final HierarchicalConfiguration processorConf = processorConfs.get(i);
String processorName = processorConf.getString("[@name]");
if (processorName.equals(Mail.GHOST)) throw new ConfigurationException("ProcessorName of " + Mail.GHOST + " is reserved for internal use, choose a different name");
mailets.put(processorName, new ArrayList<MailetManagement>());
matchers.put(processorName, new ArrayList<MatcherManagement>());
RouteDefinition processorDef = from(getEndpoint(processorName)).routeId(processorName).inOnly()
// store the logger in properties
.setProperty(MatcherSplitter.LOGGER_PROPERTY, constant(logger));
// load composite matchers if there are any
Map<String,MatcherManagement> compositeMatchers = new HashMap<String, MatcherManagement>();
loadCompositeMatchers(processorName, compositeMatchers, processorConf.configurationsAt("matcher"));
final List<HierarchicalConfiguration> mailetConfs = processorConf.configurationsAt("mailet");
// Loop through the mailet configuration, load
// all of the matcher and mailets, and add
// them to the processor.
for (int j = 0; j < mailetConfs.size(); j++) {
HierarchicalConfiguration c = mailetConfs.get(j);
// We need to set this because of correctly parsing comma
String mailetClassName = c.getString("[@class]");
String matcherName = c.getString("[@match]", null);
String invertedMatcherName = c.getString("[@notmatch]", null);
Mailet mailet = null;
Matcher matcher = null;
try {