1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

Added queue type config for topic, values are classic and quorum

This commit is contained in:
Tuna Celik 2024-03-02 13:38:42 +01:00
parent 3e6d8db98d
commit 22c843c49c
4 changed files with 14 additions and 2 deletions

View file

@ -12,6 +12,7 @@ class Hook(hook.BaseHook):
super().__init__(configuration)
self._endpoint = configuration.get("hook", "rabbitmq_endpoint")
self._topic = configuration.get("hook", "rabbitmq_topic")
self._queue_type = configuration.get("hook", "rabbitmq_queue_type")
self._encoding = configuration.get("encoding", "stock")
self._make_connection_synced()
@ -23,7 +24,7 @@ class Hook(hook.BaseHook):
self._channel = connection.channel()
def _make_declare_queue_synced(self):
self._channel.queue_declare(queue=self._topic, durable=True)
self._channel.queue_declare(queue=self._topic, durable=True, arguments={"x-queue-type": self._queue_type})
def notify(self, notification_item):
if isinstance(notification_item, HookNotificationItem):