You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2023/03/16 09:17:17 UTC
[james-project] 01/02: JAMES-3891 Memory mailqueue should not display worrying logs upon shotdown
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 1e25f478e6d9a05f7f525a1373abb517c8618ae7
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Mar 13 15:13:35 2023 +0700
JAMES-3891 Memory mailqueue should not display worrying logs upon shotdown
Manage Interrupted exception
---
.../org/apache/james/queue/memory/MemoryMailQueueFactory.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/server/queue/queue-memory/src/main/java/org/apache/james/queue/memory/MemoryMailQueueFactory.java b/server/queue/queue-memory/src/main/java/org/apache/james/queue/memory/MemoryMailQueueFactory.java
index 10622462ef..73bf35f1d7 100644
--- a/server/queue/queue-memory/src/main/java/org/apache/james/queue/memory/MemoryMailQueueFactory.java
+++ b/server/queue/queue-memory/src/main/java/org/apache/james/queue/memory/MemoryMailQueueFactory.java
@@ -116,7 +116,13 @@ public class MemoryMailQueueFactory implements MailQueueFactory<MemoryMailQueueF
this.inProcessingMailItems = new LinkedBlockingDeque<>();
this.name = name;
this.scheduler = Schedulers.newSingle("memory-mail-queue");
- this.flux = Mono.fromCallable(mailItems::take)
+ this.flux = Mono.<MemoryMailQueueItem>create(sink -> {
+ try {
+ sink.success(mailItems.take());
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
+ })
.repeat()
.subscribeOn(scheduler)
.flatMap(item ->
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org