Question

I have a weblogic JMS persistent queue with a small sized message. However, my MDB logic needs atleast 2 minutes to process the message. 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. 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.

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. The msg gets deleted from store only after the first MDB sucessfully completes it.

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.

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?

Was it helpful?

Solution

Problem solved. The MDB timeout was set to 60 seconds in the weblogic-ejb-jar.xml. 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. Previously after a minute, MDB timeout was happening and hence the message was getting redelivered. Once the MDB time out had croseed, the MDB continued to process, but JMS tried to redeliver the message. Increasing the Timeout, now This problem doesnt happen. Thanks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top