240.5. 例子
240.5.1. 使用 Request-Reply 和 serialized 对象有效负载的 UDP Netty 端点
RouteBuilder builder = new RouteBuilder() { public void configure() { from("netty4:udp://localhost:5155?sync=true") .process(new Processor() { public void process(Exchange exchange) throws Exception { Poetry poetry = (Poetry) exchange.getIn().getBody(); poetry.setPoet("Dr. Sarojini Naidu"); exchange.getOut().setBody(poetry); } } } };