2016-03-29 39 views
0

我正在使用WSO2 ESB 4.9與Message Broker一起保證傳遞消息。 我的消息處理器向代理服務發送一條消息,在該服務中,我執行轉換消息併發送到遠程服務。質量嘗試結束時,我如何從ESB中刪除隊列中的消息

<messageProcessor 
    class="org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor" 
    messageStore="CyberPalt_JMS_MS" name="CyberPlat_ProcsessAddPayment" 
    targetEndpoint="CyberPlat_JMSEp" xmlns="http://ws.apache.org/ns/synapse"> 
    <parameter name="client.retry.interval">1000</parameter> 
    <parameter name="max.delivery.attempts">2</parameter> 
    <parameter name="max.delivery.drop">Disabled</parameter> 
    <parameter name="interval">1000</parameter> 
    <parameter name="is.active">true</parameter> 
</messageProcessor> 

<endpoint name="CyberPlat_JMsEp" xmlns="http://ws.apache.org/ns/synapse"> 
    <address trace="disable" uri="http://itprog3:8280/services/CyberPalt_JMS_MsProxy"/> 
</endpoint> 

<proxy name="CyberPalt_JMS_MsProxy" startOnLoad="true" trace="disable" 
    transports="http https" xmlns="http://ws.apache.org/ns/synapse"> 
    <target> 
    <inSequence> 
     <xslt key="request_xslt" /> 
     <send> 
     <endpoint key="testRemoteEp"/> 
     </send> 
    </inSequence> 
    <outSequence> 
     <send/> 
    </outSequence> 
    <faultSequence/> 
    </target> 
</proxy> 

但是,當質量嘗試結束時,消息仍然在隊列中。 質量嘗試結束時,如何刪除隊列中的消息?

回答

0

變化「max.delivery.drop」在你的MP配置中的值,使之

+0

是的,這是當端點在MessageProcessor的,對遠程服務進行配置,但不工作的時候作品在proxyService上配置端點,並在那裏在endPoint中發送消息。 –

+0

不確定要理解,你說質量嘗試結束,所以我認爲你的代理沒有迴應,然後MP再次發送消息?如果您的代理服務存在不適當的響應,您可能應該添加faulSequence或在outSequence中測試該消息並決定返回適當的消息:使用並選擇一個不同於200或500的值,以便MP確定這是一個錯誤 –

+0

在faulSequence中添加一條消息在隊列中刪除。謝謝。 –

相關問題