james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [2/2] james-project git commit: JAMES-2544 Correct RabbitMQ Enqueuer asynchronous logic
Date Tue, 27 Nov 2018 10:43:00 GMT
JAMES-2544 Correct RabbitMQ Enqueuer asynchronous logic


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/7ac8c9f2
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/7ac8c9f2
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/7ac8c9f2

Branch: refs/heads/master
Commit: 7ac8c9f2b03bcf7b80e1715c9ab50c5eb56f8d92
Parents: edac184
Author: Benoit Tellier <btellier@linagora.com>
Authored: Mon Nov 26 11:56:33 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Tue Nov 27 17:41:58 2018 +0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/james/queue/rabbitmq/Enqueuer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/7ac8c9f2/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Enqueuer.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Enqueuer.java
b/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Enqueuer.java
index b0dbc84..7a93fe0 100644
--- a/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Enqueuer.java
+++ b/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Enqueuer.java
@@ -62,7 +62,7 @@ class Enqueuer {
     void enQueue(Mail mail) throws MailQueue.MailQueueException {
         saveMail(mail)
             .thenApply(Throwing.<MimeMessagePartsId, EnqueuedItem>function(partsId
-> publishReferenceToRabbit(mail, partsId)).sneakyThrow())
-            .thenApply(mailQueueView::storeMail)
+            .thenCompose(mailQueueView::storeMail)
             .thenRun(enqueueMetric::increment)
             .join();
     }


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


Mime
View raw message