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 "Benoit Tellier (Jira)" <se...@james.apache.org> on 2019/11/12 04:05:00 UTC
[jira] [Commented] (JAMES-2979) Message delivery rate with activemq
is too slow since 3.4
[ https://issues.apache.org/jira/browse/JAMES-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16972046#comment-16972046 ]
Benoit Tellier commented on JAMES-2979:
---------------------------------------
Regarding https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html#repeat-- it is pretty clear that items are generated one by one in the resulting flux.
With that test:
{code:java}
@Test
void dequeueShouldBeMultiThreaded() {
IntStream.range(0, 1000)
.forEach(Throwing.intConsumer(i -> mailQueue.enQueue(defaultMail()
.name("name" + i)
.build())));
AtomicInteger i = new AtomicInteger(0);
ConcurrentLinkedDeque<Mail> dequeuedMails = new ConcurrentLinkedDeque<>();
mailQueue.deQueue()
.subscribeOn(Schedulers.boundedElastic())
.flatMap(item -> {
System.out.println("Dequeue " + i.incrementAndGet() + " on thread " + Thread.currentThread().getName());
dequeuedMails.add(item.getMail());
try {
item.done(true);
return Mono.empty();
} catch (MailQueue.MailQueueException e) {
return Mono.error(e);
}
})
.subscribe();
Awaitility.await()
.atMost(Duration.ONE_MINUTE)
.until(() -> dequeuedMails.size() == 1000);
}
{code}
I can clearly see that all dequeues happens on the same thread.
I have been trying several alternative Flux generation strategy:
- generate - one by one - same behaviour as defer + repeat
- create - not able to make it work
- parrallel on subscriber side - no effect
> Message delivery rate with activemq is too slow since 3.4
> ---------------------------------------------------------
>
> Key: JAMES-2979
> URL: https://issues.apache.org/jira/browse/JAMES-2979
> Project: James Server
> Issue Type: Bug
> Reporter: René Cordier
> Priority: Major
>
> From a James user:
> {code:java}
> Hi, I have a problem with the last version, 3.4.0, i've running a server with 3.3.0 cassandra+activemq with a messages rate 50/1 min approx, but when i upgrade to the 3.4.0, the rate is only 1 or 2 each minute, with the same configuration, i'm try to up the number of deliveryThreads, and when i'm connect with JMX only 2 threads of RemoteDelivery are running, one running and other waiting, but the outgoing queue have more than 200 message pending, any solutions?
> {code}
> We need to investigate and fix the issue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org