Thanks so much Claus!!! Just a few questions: - I assume the last piece is:
// continue routing here part = part.xxx And that there is nothing to do to finalize the ProcessorDefinition object, just set it as you show? Anyways, here's what I ended up with, based on your directoins: ProcessorDefinition initialRoute = from(fromURI) .routeId(sourceRouteId) .routePolicy(routePolicy) .startupOrder(routeStartupOrder) // See http://grokbase.com/t/camel/users/1056thepe4/need-create-a-route-which-can-handle-several-encoding .setProperty(Exchange.CHARSET_NAME, ExpressionBuilder.constantExpression(charsetName)) .threads(threadPoolSize /*poolSize*/, threadPoolSize * 2 /*maxPoolSize*/) .threadName("threads_" + sourceRouteId) // ------------------------------------------------------------------------------------------- // When a task is rejected (e.g. due to worker queue is full), let the current caller thread // execute the task (i.e. it will become synchronous), also gives time for the thread pool // to process its current tasks,without adding more tasks (i.e. a sort of self throttling). // ------------------------------------------------------------------------------------------- .callerRunsWhenRejected(true); // Hard-coded since we always want this behavior! if(mirrorEnabled) { // ProcessorDefinition allows us to use Java to conditionalize the route // -------------------------------------------------------------------------------------- // Wire Tap (from the EIP patterns) allows you to route messages to a separate location // while they are being forwarded to the ultimate destination. This wiretap implements // the MPLR mirror functionality. It's a traditional wiretap whereby Camel will copy the // original Exchange and set its Exchange Pattern to InOnly, as we want the tapped // Exchange to be sent in a fire-and-forget style. Note that this mirror wiretap is // conditional, based on the "enabled" flag in the MIRROR destination configuration. // See http://camel.apache.org/wire-tap.html // -------------------------------------------------------------------------------------- initialRoute = initialRoute.wireTap(mirrorToURI).id(sourceRouteId + "_MIRROR"); } // ----------------------------------------------------------------- // to(backupFileToURI, throughputFileToURI, sedaMainURI, sedaAckURI) // ----------------------------------------------------------------- initialRoute = initialRoute.to(firstToURIs) .id(sourceRouteId + "_TO_FIRST_URIS") .setProperty(Exchange.CHARSET_NAME, ExpressionBuilder.constantExpression(charsetName));* -- View this message in context: http://camel.465427.n5.nabble.com/Conditionally-omitting-a-portion-of-a-route-tp5770127p5770186.html Sent from the Camel - Users mailing list archive at Nabble.com.