camel-syslog - DataFormat, TypeConverters, Spring DSL enhancments, test and an added Netty TypeConverter --------------------------------------------------------------------------------------------------------
Key: CAMEL-3267 URL: https://issues.apache.org/activemq/browse/CAMEL-3267 Project: Apache Camel Issue Type: New Feature Affects Versions: Future Reporter: Johan Edstrom Priority: Minor Fix For: Future Allows camel to deal with BSD Syslog messages over UDP. Patch located at : http://github.com/seijoed/camel/commit/b18016fff2ce37c2b47f5de17b4852648b6df5a7 Provides marshal / unmarshal and spring language. Example route : camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring"> <dataFormats> <syslog id="mySyslog"/> </dataFormats> <route> <from uri="netty:udp://localhost:10514?sync=false&allowDefaultCodec=false"/> <unmarshal ref="mySyslog"/> <to uri="mock:stop1"/> <marshal ref="mySyslog"/> <to uri="mock:stop2"/> </route> </camelContext> Example 2 public void configure() throws Exception { context.setTracing(true); DataFormat syslogDataFormat = new Rfc3164SyslogDataFormat(); // we setup a Syslog listener on a random port. from("netty:udp://127.0.0.1:" + serverPort + "?sync=false&allowDefaultCodec=false") .unmarshal(syslogDataFormat).process(new Processor() { public void process(Exchange ex) { assertTrue(ex.getIn().getBody() instanceof SyslogMessage); } }).to("mock:syslogReceiver"). marshal(syslogDataFormat).to("mock:syslogReceiver2"); } }; Example 3: public void configure() throws Exception { //context.setTracing(true); DataFormat syslogDataFormat = new Rfc3164SyslogDataFormat(); // we setup a Syslog listener on a random port. from("mina:udp://127.0.0.1:" + serverPort) .unmarshal(syslogDataFormat).process(new Processor() { public void process(Exchange ex) { assertTrue(ex.getIn().getBody() instanceof SyslogMessage); } }).to("mock:syslogReceiver"). marshal(syslogDataFormat).to("mock:syslogReceiver2"); } }; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.