我有一个grails的骆驼路线。当我在处理器中注释掉unmarshall行时,异常就会消失,好像花费太长时间才能及时发回TCP响应。如果我的评估是正确的,那么netty中的设置是否可以在不等待的情况下发回响应?
感谢。
from("netty4:tcp://172.25.200.66:12345?
clientMode=true&disconnectOnNoReply=false&connectTimeout=100000
&reconnect=true&allowDefaultCodec=false&decoder=#jsonDecoderFactory")
.to("log:dump?showAll=true")
.bean("messageProcessorService", "processMessage")
def processMessage (String msg) {
log.debug("MessageProcessorService processMessage")
def object = unmarshall(msg)
}
2017-01-13 13:20:58,186 | WARN | camel.component.netty4.NettyConsumer |
Caused by: [org.apache.camel.CamelExchangeException - Cannot write response to /172.25.200.66:12345.
Exchange[ID-wulg2-chij-udev-local-41278-1484313632001-0-20][Message: []].
Caused by: [java.lang.UnsupportedOperationException - unsupported message
type: Collections$UnmodifiableList (expected: ByteBuf, FileRegion)]]
org.apache.camel.CamelExchangeException: Cannot write response to
/172.25.200.66:12345.
Exchange[ID-wulg2-chij-udev-local-41278-1484313632001-0-20][Message: []].
Caused by: [java.lang.UnsupportedOperationException - unsupported message
答案 0 :(得分:1)
事实证明,选项“sync = false”将端点设置为单向。因此,不需要回写回复。