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 bt...@apache.org on 2019/01/25 03:55:22 UTC

[06/10] james-project git commit: MAILBOX-374 Turn off exclusive - auto-deletes queues

MAILBOX-374 Turn off exclusive - auto-deletes queues

In the face of network errors, we can not achieve a 'safety' and 'liveness' property.

 - 'liveness': A James node that is not failmed always have its Key registration queue
 - 'safety': The "key registration queue" gets deleted when there is not more consumer.

If the network partition exceeded the configured heartbeat, then the queue is going to be deleted and James is going to fail (as its queue disapeared).

We choose the safer option of not having RabbitMQ responsible of automatic queue deletion. The admin is going to be responsible of queue cleanup after crash.


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

Branch: refs/heads/master
Commit: 7ab8c67e4804dce703786d1545ebcb8c92378a1d
Parents: c1a2a95
Author: Benoit Tellier <bt...@linagora.com>
Authored: Thu Jan 24 15:46:18 2019 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Fri Jan 25 10:33:25 2019 +0700

----------------------------------------------------------------------
 .../apache/james/mailbox/events/KeyRegistrationHandler.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/7ab8c67e/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java
----------------------------------------------------------------------
diff --git a/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java b/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java
index 6e84254..d8418be 100644
--- a/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java
+++ b/mailbox/event/event-rabbitmq/src/main/java/org/apache/james/mailbox/events/KeyRegistrationHandler.java
@@ -78,10 +78,10 @@ class KeyRegistrationHandler {
     }
 
     void start() {
-        sender.declareQueue(QueueSpecification.queue()
+        sender.declareQueue(QueueSpecification.queue(eventBusId.asString())
             .durable(DURABLE)
-            .exclusive(EXCLUSIVE)
-            .autoDelete(AUTO_DELETE)
+            .exclusive(!EXCLUSIVE)
+            .autoDelete(!AUTO_DELETE)
             .arguments(NO_ARGUMENTS))
             .map(AMQP.Queue.DeclareOk::getQueue)
             .doOnSuccess(registrationQueue::initialize)


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