【问题标题】:Spring integration publishes a message in an outbound topicSpring 集成在出站主题中发布消息
【发布时间】:2012-03-04 22:25:45
【问题描述】:

我有 Spring 集成管道,应该将消息发布到 ActiveMQ 主题。我正在尝试使用以下配置配置 de spring xml 文件

<bean id="myTopic" class="org.apache.activemq.command.ActiveMQTopic">
<constructor-arg value="topicMQ" />
</bean>


<si:channel id="myChannel" />
<jms:outbound-channel-adapter id="jmsOut" channel="myChannel" destination="myTopic" />

但是消息没有发布到主题。您知道如何配置 Spring 集成以将消息发布到 JMS 主题吗? 我会期待你的答案。 谢谢, 弗洛林

【问题讨论】:

    标签: jms spring-integration


    【解决方案1】:

    我找到了这个解决方案:

      <bean id="myTopic" class="org.apache.activemq.command.ActiveMQTopic">
       <constructor-arg value="topicMQ" />
      </bean>
    
       <si:channel id="myChannel" />
    
      <jms:outbound-channel-adapter id="jmsOut"
       channel="myChannel" destination="myTopic"
       pub-sub-domain="true" delivery-persistent="true" time-to-live="600000" />
    

    希望这会有所帮助!

    【讨论】:

    • 这不适用于我的 Spring-Integration 设置。你能多给点你的吗?也许是您的连接工厂或 JMS 模板?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-07-12
    • 1970-01-01
    • 1970-01-01
    • 2018-06-20
    • 1970-01-01
    • 2016-01-17
    • 1970-01-01
    相关资源
    最近更新 更多