You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "ouvtam (Jira)" <se...@james.apache.org> on 2022/11/02 23:28:00 UTC

[jira] [Updated] (JAMES-3848) ActiveMQ dequeuing can block (infinite timeout)

     [ https://issues.apache.org/jira/browse/JAMES-3848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ouvtam updated JAMES-3848:
--------------------------
    Description: 
While working on JAMES-3841 I stumbled upon blocking code that might be investigated.

When calling ActiveMQMessageConsumer#receive(timeout) it blocks until a new message is received when prefetchSize is zero (see org.apache.activemq.ActiveMQMessageConsumer#receive) even when a timeout is given. That would explain some observed timeouts in disabled tests in the test package org.apache.james.queue.activemq.

One way to mitigate this is to set prefetch size greater than zero to make the timeout occur. But this would also mean that code that relies on blocking dequeues must be rewritten.

What do you think?

  was:
While working on JAMES-3841 I stumbled blocking code that might be investigated.

When calling ActiveMQMessageConsumer#receive(timeout) it blocks until a new message is received when prefetchSize is zero (see org.apache.activemq.ActiveMQMessageConsumer#receive) even when a timeout is given. That would explain some observed timeouts in disabled tests in the test package org.apache.james.queue.activemq.

One way to mitigate this is to set prefetch size greater than zero to make the timeout occur. But this would also mean that code that relies on blocking dequeues must be rewritten.

What do you think?


> ActiveMQ dequeuing can block (infinite timeout)
> -----------------------------------------------
>
>                 Key: JAMES-3848
>                 URL: https://issues.apache.org/jira/browse/JAMES-3848
>             Project: James Server
>          Issue Type: Improvement
>          Components: Queue
>            Reporter: ouvtam
>            Priority: Minor
>
> While working on JAMES-3841 I stumbled upon blocking code that might be investigated.
> When calling ActiveMQMessageConsumer#receive(timeout) it blocks until a new message is received when prefetchSize is zero (see org.apache.activemq.ActiveMQMessageConsumer#receive) even when a timeout is given. That would explain some observed timeouts in disabled tests in the test package org.apache.james.queue.activemq.
> One way to mitigate this is to set prefetch size greater than zero to make the timeout occur. But this would also mean that code that relies on blocking dequeues must be rewritten.
> What do you think?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org