[英]Is it possible to remove a message from the MQ Queue without retriving it or clearing the queue?
[英]SpringIntegration remove message from the Queue without processing
我們的應用程序中有一個JMS關閉隊列,需要關閉具有特定事件的Spring上下文的運行節點。
為了正確關閉正在運行的ApplicationContext而不在啟動時再次處理此“關閉”消息,我們需要有一個單獨的kill Thread ,以確保在殺死ApplicationContext之前已處理了該消息。
有沒有辦法避免額外殺死線程 ?
例如:在從Queue讀取消息之后,立即配置SpringIntegration流以將消息標記為已讀,而忽略可能的處理失敗。
如果將kill消息路由到ExecutorChannel
(或QueueChannel
),則該消息將被傳遞到另一個線程,並且事務將立即提交。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.