2
我有一個服務,它通過http入站適配器接收xml消息,然後將它們轉換爲成爲發送出去的電子郵件內容的文本。 我現在需要首先將這些消息插入到JMS隊列中,並在消息插入Q後將確認返回爲200 OK,然後繼續執行其餘的處理。將消息插入到JMS隊列中,然後使用Spring集成發回確認
<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隊列的事務作爲端點。 我如何解決這個問題?
謝謝阿爾喬姆,多數民衆贊成正是我需要的! – user5758361