簡體   English   中英

如何防止Java MDB暫停IBM Websphere WAS 8.5上的錯誤?

[英]How to prevent Java MDB from pausing on errors on IBM Websphere WAS 8.5?

拋出異常后,我們的Java MDB應用程序的MQ消息端點正在暫停消息

CWWMQ0007W: The message endpoint <APP> has been paused by the system.  Message delivery failed to the endpoint more than <N> times.

我理解這是根據應用程序規范,這種行為對於許多應用程序來說是合理的。

在我們的例子中,我們希望從隊列中消耗導致異常的MQ消息,並且應用程序仍在運行,即。 處理下一條消息。

除了在MDB onMessage方法中捕獲任何Throwable之外,有沒有辦法實現這種方式?

閱讀本文WebSphere Application Server V8.x如何處理有害消息 ,它描述了各種場景。

如果要在不停止端點的情況下繼續處理,則Stop endpoint if message delivery fails取消選中“ Stop endpoint if message delivery fails或者Number of sequential delivery failures before suspending endpoint到激活規范配置中的某個更高值Number of sequential delivery failures before suspending endpoint設置Number of sequential delivery failures before suspending endpoint 您還必須在WebSphere MQ中配置Backout threshold (BOTHRESH)屬性。

這樣,MQ將把異常消息放到DEAD.LETTER.QUEUE ,並允許您處理下DEAD.LETTER.QUEUE消息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM