引用:http://camel.apache.org/jms.html
我正在尝试以 Activity MQ 队列的请求-答复模式处理答复。这是上面页面的代码:
我尝试过这样做:
from("file://C:\\Users\\Thom\\git\\brms-poc-esb\\rule-cancel\\data").
log("Processing ${file:name}").
process(requestProcess).
log("Generated ${body}").
to(queueUri).inOut().
process(new ResultProcess());
当我处理这个问题时,我仍然收到发送到 Activity MQ 的流。
如何处理回复?
最佳答案
使用.to(ExchangePattern.InOut,queueUri)
就像在.to()
之后使用inOut()
一样,不推荐使用。
或者你也可以这样做
.setExchangePattern(ExchangePattern.InOut)
.to(queueUri)
例如在调用端点之前设置模式。
您始终可以使用跟踪器来查看路由过程中发生的情况,这可以帮助您了解:http://camel.apache.org/tracer
关于java - DSL 处理来自 activeMQ 的回复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38079474/