【问题标题】:Spring Integration - Custom JMSCorrelationId using jms:outbound-gatewaySpring Integration - 使用 jms:outbound-gateway 自定义 JMSCorrelationId
【发布时间】:2014-09-09 21:17:03
【问题描述】:

是否可以在使用时传递自定义 JMSCorrelationId ?

我想这样做是因为我的消息的消费者系统将有效负载属性设置为 JMSCorrelationId。

我检查了 JMSOutboundGateway.java 是否相同,但它似乎是使用 JMSmessageId 或生成的唯一 id 作为 JMSCorrelationId 来映射传入的消息。

有什么帮助吗?

更新

我可以设置使用 header-enricher 接收输入通道上的输入,并且这个丰富的 header 输出由 jms 出站网关接收。但是我在 JMSOutboundGateway 中看到了代码,它使用 JMSMessageID 创建了选择器,因此我无法接收到消息。

<int:header-enricher input-channel="input" output-channel="output">
            <int:header name="jms_correlationId" value="12345"/>
        </int:header-enricher>

有什么想法吗?

【问题讨论】:

    标签: spring-integration


    【解决方案1】:

    4.0.1 开始,&lt;int-jms:outbound-gateway correlation-key&gt; 支持JMSCorrelationID* 令牌以重用请求消息中的现有correlationId

    https://jira.spring.io/browse/INT-3405

    http://docs.spring.io/spring-integration/docs/latest-ga/reference/html/jms.html#d4e8792

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-11
      • 1970-01-01
      • 2018-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多