james-project icon indicating copy to clipboard operation
james-project copied to clipboard

JAMES-2295 JMS mailqueue deadlock.

Open nstdio opened this issue 7 years ago • 3 comments

This issue is related to ActiveMQ prefetch mechanics. Now new give ability to configure prefetch size for all types of MailQueues.

nstdio avatar Jul 08 '18 16:07 nstdio

Hi @chibenwa

I was trying to implement the new version of ConsumerOptions that we discussed.

interface ConsumerOptions {
    ImmutableMap<String, String> parameters();
}

Here is sort of contradiction:

here we should reference the prefetchSize size, but we don't know whether underlying JMS implementation does support that option or not. Is there anything that I get wrong ?

nstdio avatar Jul 18 '18 10:07 nstdio

Ah I see your concern...

Maybe JMSMailQueue can accept a ConsumerOptions interface. We don't implement this interface for JMSMailQueue as it don't make sens (as you mentionned above), and jsut provide an empty version. In the tests we can enforce the prefetchSize (as ActiveMQ is used under the hood) via a lambda.

chibenwa avatar Jul 18 '18 10:07 chibenwa

In the tests we can enforce the prefetchSize (as ActiveMQ is used under the hood) via a lambda.

I really can't figure out how...

nstdio avatar Jul 18 '18 11:07 nstdio

Is there any plan to carry on this work?

chibenwa avatar Aug 30 '22 07:08 chibenwa

@chibenwa sorry, I've lost context for this PR long ago and actually don't have a time to proceed with it.

nstdio avatar Sep 01 '22 09:09 nstdio

From what I can see the initial issue won't happen anymore because the dequeue semantic changed (ie reactor migration).

Having prefetch for ActiveMQ might make sense on a performance standpoint but I think that it is not required for correctness.

As such I will close this PR and ticket.

Thanks again for your time on diagnostic and proposing a fix.

Best regards,

Benoit

chibenwa avatar Sep 01 '22 09:09 chibenwa