我使用JMS端點和Apache ActiveMQ的在我的騾子的應用程序(我按照教程,不知道我在做依託JMS作爲端點正確的事)如何在Mule ESB中保存包含Java消息的隊列?
<jms:activemq-connector name="jms-connector" brokerURL="${BrokerURL}" disableTemporaryReplyToDestinations="true" specification="1.1"/>
<jms:endpoint connector-ref="jms-connector" exchange-pattern="one-way" name="UnsortedOrders" queue="UnsortedOrders"/>
<jms:endpoint connector-ref="jms-connector" exchange-pattern="one-way" name="DestinationEMC" queue="DestinationEMC" />
<jms:endpoint connector-ref="jms-connector" exchange-pattern="one-way" name="DestinationOriginal" queue="DestinationOriginal"/>
在這一點上我需要自動 - 存儲(堅持在磁盤上)與關聯的隊列,以便電源故障和其他故障不會終止未完成的永久進程,並且只要mule再次啓動,進程就會繼續。
我以前使用ObjectStore標記,但我不知道如何將它與JMS端點隊列綁定。這是我之前如何使用ObjectStore:
<spring:bean id="objectStore" class="org.mule.util.store.QueuePersistenceObjectStore"/>
<until-successful objectStore-ref="objectStore" maxRetries="${MaximumRetry}" secondsBetweenRetries="${RetryInterval}">
<http:outbound-endpoint address="${ECMURL}" exchange-pattern="one-way">
<transformer ref="contentTypeTextXML"/>
</http:outbound-endpoint>
</until-successful>
謝謝。好答案。那麼「Destination.EMC」在默認情況下會將持久(磁盤上)隊列排隊?我的意思是即使在停電時我也不會丟失數據,它們將被存儲在磁盤上? – MoienGK 2015-02-10 05:54:54
是的,因爲您沒有禁用JMS提供程序(ActiveMQ)上的持久性。我想不是,除非你應該知道。您還應該發送持久性消息(默認情況下爲它們)。 – 2015-02-10 14:36:58