Skip to content

Commit c9de1ea

Browse files
authored
Use RabbitMQ default queue type for listener queues (#1878)
Remove explicit durable=False and set auto_delete=False to make listener queues compatible with RabbitMQ's configured default queue type. Previously, the queues were always created as classic queues because durable=False and auto_delete=True are not supported by quorum queues. With these changes, the osism-listener-* queues will use the vhost's default queue type (e.g., quorum queues in RabbitMQ 4 with the openstack vhost created by migrate rabbitmq3to4 prepare). AI-assisted: Claude Code Signed-off-by: Christian Berendt <[email protected]>
1 parent 8ffab3a commit c9de1ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

osism/services/listener.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,13 @@ def get_consumers(self, consumer, channel):
350350
passive=True,
351351
)
352352
# Create our own queue bound to the existing exchange
353-
# Our queue can have its own properties (non-durable, auto-delete)
353+
# Don't set durable explicitly to use RabbitMQ's configured default
354+
# queue type (e.g., quorum queues in RabbitMQ 4)
354355
queue = Queue(
355356
config["queue"],
356357
exchange,
357358
routing_key=config["routing_key"],
358-
durable=False,
359-
auto_delete=True,
359+
auto_delete=False,
360360
no_ack=True,
361361
)
362362
consumers.append(consumer(queue, callbacks=[self.on_message]))

0 commit comments

Comments
 (0)