[ 
https://issues.apache.org/jira/browse/JAMES-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16547832#comment-16547832
 ] 

ASF GitHub Bot commented on JAMES-2295:
---------------------------------------

Github user nstdio commented on a diff in the pull request:

    https://github.com/apache/james-project/pull/127#discussion_r203375579
  
    --- Diff: 
server/queue/queue-activemq/src/test/java/org/apache/james/queue/activemq/ActiveMQMailQueueBlobTest.java
 ---
    @@ -69,7 +69,8 @@ public void setUp(BrokerService broker) {
             RawMailQueueItemDecoratorFactory mailQueueItemDecoratorFactory = 
new RawMailQueueItemDecoratorFactory();
             NoopMetricFactory metricFactory = new NoopMetricFactory();
             String queueName = BrokerExtension.generateRandomQueueName(broker);
    -        mailQueue = new ActiveMQMailQueue(connectionFactory, 
mailQueueItemDecoratorFactory, queueName, USE_BLOB, metricFactory);
    +        ActiveMQConsumerOptions consumerOptions = 
ActiveMQConsumerOptions.builder().prefetchSize(0).build();
    --- End diff --
    
    I thought about that and had a feeling that introducing `noPrefetch()` 
method will be highly coupled with our issue.
    
    Perfectly OK with that.


> JMS mailqueue deadlock when a single thread issue several consume
> -----------------------------------------------------------------
>
>                 Key: JAMES-2295
>                 URL: https://issues.apache.org/jira/browse/JAMES-2295
>             Project: James Server
>          Issue Type: Bug
>          Components: Queue
>    Affects Versions: 3.0.0, master, 3.0.1
>            Reporter: Tellier Benoit
>            Priority: Major
>              Labels: bug
>
> This will lead to a dead lock:
> {code:java}
>         MailQueue.MailQueueItem mailQueueItem1 = getMailQueue().deQueue();
>         MailQueue.MailQueueItem mailQueueItem2 = getMailQueue().deQueue();
>         mailQueueItem1.done(true);
>         mailQueueItem2.done(true);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to