【问题标题】:Camel jms: How to set replyToCamel jms:如何设置replyTo
【发布时间】:2023-03-16 22:55:02
【问题描述】:

这是路线:

 <from uri="timer://tick-tock-timer?period=50000" />
          <transform>
          <simple>Message at ${date:now:yyyy-MM-dd HH:mm:ss}</simple>
        </transform>
          <to uri="activemq:queue:inbox" pattern="InOut" />
         </route>



<route id="consumer14">
        <from uri="activemq:queue:inbox"/>
        <convertBodyTo type="java.lang.String"/>
       <transform>
          <simple>${in.body}&#13;</simple>
       </transform>
        <log message="${body}"/>
      </route>

我尝试发送回复表明消息已收到,但我不知道它应该在哪里。 我该怎么做?

【问题讨论】:

    标签: jms apache-camel activemq message-queue


    【解决方案1】:

    您可以在 Camel JMS 组件文档页面上阅读有关 replyTo 选项的信息:​​

    你可以告诉replyTo应该是什么

    <to uri="activemq:queue:inbox?replyTo=foo" pattern="InOut" />
    

    然后第二条路由将在路由结束时发送回回复消息时自动使用它。

    还要注意各种类型的回复队列,例如临时的、共享的或独占的。

    【讨论】:

    • 感谢您的回复!与&lt;to uri="activemq:queue:inbox?replyTo=foo&amp;amp;replyToType=Exclusive" pattern="InOut" /&gt; 我收到此消息错误:The OUT message was not received within: 20000 millis due reply message with correlationID: Camel-ID-SMART-51182-1447233432669-0-6 not received on destination: queue://foo. Exchange[Message: Message at 2015-11-11 10:18:04
    猜你喜欢
    • 2014-10-02
    • 1970-01-01
    • 2019-10-21
    • 1970-01-01
    • 1970-01-01
    • 2012-02-09
    • 1970-01-01
    • 1970-01-01
    • 2015-02-09
    相关资源
    最近更新 更多