简体   繁体   English

问题-即使在成功处理后,Weblogic JMS持久消息仍重新传递到MDB

[英]issue - Weblogic JMS Persistent Messages redelivered to MDB Even after successful processing

I have a weblogic JMS persistent queue with a small sized message. 我有一个带有小型消息的weblogic JMS持久队列。 However, my MDB logic needs atleast 2 minutes to process the message. 但是,我的MDB逻辑至少需要2分钟来处理该消息。 I am testing my setup with only one message in queue and the problem I have is whilst the MDB is still processing the message , exactly after a minute I can see the message is redelivered, and another mdb strats processing it. 我正在测试我的设置,队列中只有一条消息,而我的问题是MDB仍在处理该消息时,恰好在一分钟后,我可以看到消息已重新传递,而另一个mdb则正在处理它。 The second one fails immediately as there is a unique constaint in my table. 第二个立即失败,因为我的桌子上有一个唯一的约束。 The first MDB still continues and finishes successfully after 2 minutes. 第一个MDB仍然继续,并在2分钟后成功完成。

I tried using both CLIENT_ACKNOWLEDGE and DUPS_OK_ACKNOWLEDGE while sending the message to the queue, and I can see that the message stays in the persistent store (oracle table) even after the MDB has started processing it and since it takes 2 minutes, it redelivers after a minute which is not ideal. 在将消息发送到队列时,我尝试同时使用CLIENT_ACKNOWLEDGE和DUPS_OK_ACKNOWLEDGE,并且即使MDB开始处理该消息,消息也仍保留在持久性存储(oracle表)中,因为它需要2分钟,因此它会在等待一段时间后重新发送分钟,这并不理想。 The msg gets deleted from store only after the first MDB sucessfully completes it. 仅在第一个MDB成功完成之后,才从存储中删除味精。

I tried setting the weblogic Default Redelivery Delay: to 600000 ms but same thing happens, except that it now waits for 600000 ms befroe redelivering, evn though the first one is now sucessfully completed the message. 我尝试将weblogic的“默认重新发送延迟”设置为600000 ms,但发生了同样的事情,除了它现在等待重新发送之前等待6000000 ms,尽管第一个消息现在已成功完成了该消息。

Can some one help me with the correct setting that I should use considering My process will take 2 minutes or more to complete, so the message is not redelivered, or deleted from persistent store as soon as MDB receives it? 考虑到我的过程将需要2分钟或更长时间才能完成,因此消息不能重新传递,或者一旦MDB收到后便从持久性存储中删除,是否有人可以帮助我进行正确的设置?

Problem solved. 问题解决了。 The MDB timeout was set to 60 seconds in the weblogic-ejb-jar.xml. 在weblogic-ejb-jar.xml中,MDB超时设置为60秒。 Since I anticipate my MDB to run more than a minute, for now I have set it to 600 seconds and now it doesnt try to redeliver. 由于我预计我的MDB会运行一分钟以上,因此目前我将其设置为600秒,现在它不尝试重新交付。 Previously after a minute, MDB timeout was happening and hence the message was getting redelivered. 以前,一分钟后,发生MDB超时,因此该消息被重新传递。 Once the MDB time out had croseed, the MDB continued to process, but JMS tried to redeliver the message. 一旦发生MDB超时,MDB就会继续处理,但是JMS试图重新传递该消息。 Increasing the Timeout, now This problem doesnt happen. 现在增加超时,不会发生此问题。 Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM