【发布时间】:2016-02-04 19:47:55
【问题描述】:
我有一项服务,它通过 http 入站适配器接收 xml 消息,然后将它们转换为文本,成为发送出去的电子邮件的内容。 我现在需要先将这些消息插入到 JMS 队列中,并在消息插入 Q 后将确认发送回 200 ok,然后继续进行其余处理。
<int-http:inbound-channel-adapter channel="inputChannel"
id="httpInbound"
auto-startup="true"
request-payload-type="java.lang.String"
path="/message"
supported-methods="POST"
error-channel="logger" >
<int-http:request-mapping consumes="application/xml" />
</int-http:inbound-channel-adapter>
<int:chain id="chain" input-channel="inputChannel" >
<int:service-activator ref="mailTransformerBean" method="transform" />
</int:chain>
服务激活器负责将 xml 转换为电子邮件的处理。
在此之前,我需要合并一个 JMS 队列,接收到的消息将被插入到该队列中,然后发送回确认。这是为了保留消息并在服务失败时重试。 我想将其设置为以 JMS 队列为端点的事务。 我该如何处理?
【问题讨论】:
标签: jms spring-integration spring-jms