You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Johan Edstrom (JIRA)" <ji...@apache.org> on 2010/10/26 23:51:40 UTC

[jira] Commented: (CAMEL-3267) camel-syslog - DataFormat, TypeConverters, Spring DSL enhancments, test and an added Netty TypeConverter

    [ https://issues.apache.org/activemq/browse/CAMEL-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62852#action_62852 ] 

Johan Edstrom commented on CAMEL-3267:
--------------------------------------

Cleaning up this patch for inclusion in 2.6-SNAPSHOT

> 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
>            Priority: Minor
>             Fix For: 2.6.0
>
>
> 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&amp;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.