Spring XML 파일에서는 포트 10514에서 udp 메시지를 수신 대기하도록 끝점을 구성합니다. netty에서 defaultCodec를 비활성화합니다. 이
에서는 NettyTypeConverter로 대체를 허용하고 InputStream으로 메시지를 전달합니다.
<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"/>
</route>
</camelContext>
<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"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
<dataFormats>
<syslog id="mySyslog"/>
</dataFormats>
<route>
<from uri="mina:udp://localhost:10514"/>
<unmarshal ref="mySyslog"/>
<to uri="mock:stop1"/>
</route>
</camelContext>
<camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
<dataFormats>
<syslog id="mySyslog"/>
</dataFormats>
<route>
<from uri="mina:udp://localhost:10514"/>
<unmarshal ref="mySyslog"/>
<to uri="mock:stop1"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow