[ https://issues.apache.org/activemq/browse/CAMEL-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-3267. -------------------------------- Resolution: Fixed > 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 > Reporter: Johan Edstrom > Assignee: Johan Edstrom > Priority: Minor > Fix For: 2.6.0 > > Attachments: Camel____Syslog_support.patch > > > 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 : > {code:xml} > 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> > {code} > Example 2 > {code} > 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"); > } > }; > {code} > Example 3: > {code} > 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"); > } > }; > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.