I am using Apache Camel to assist with capturing message data emitted by a third party software package. In this particular instance, I only need to capture what is produced by the software, there is no receiver on the other end (really no "end" to go to).
So, I tried to set up a route with just the "from" endpoint and no "to" endpoint. Apparently this is incorrect usage as I received the following exception:
[2018-08-15 11:08:03.205] ERROR: string.Launcher:191 - Exception org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> From[mina:udp://localhost:9877?sync=false] <<< in route: Route(route1)[[From[mina:udp://localhost:9877?sync=false]] -... because of Route route1 has no output processors. You need to add outputs to the route such as to("log:foo"). at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1063) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196) at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:974) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3301) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3024) at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2854) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2850) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2873) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2850) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2819) at {removed}.Launcher.startCamel(Launcher.java:189) at {removed}.Launcher.main(Launcher.java:125) Caused by: java.lang.IllegalArgumentException: Route route1 has no output processors. You need to add outputs to the route such as to("log:foo"). at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1061) ... 13 more How do I set up a camel route that allows me to intercept (capture) the message traffic coming from the source, and not send it "to" anything? There is no need for a receiver. What would be an appropriate "to" endpoint that just drops everything it receives?
The exception suggestion of to("log:foo"). What does this do?
.stop();work ?