Skip to content

Commit

Permalink
Passive queue option per queue
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmatthias committed Mar 20, 2024
1 parent 236b087 commit cf9cddc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/amqpstorm_flask/RabbitMQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def queue(
queue_arguments: dict = None,
prefetch_count: int = 1,
queue_name: str = None,
full_message_object: bool = False
full_message_object: bool = False,
passive_queue: bool = None
):
if queue_arguments is None:
queue_arguments = {"x-queue-type": "quorum"}
Expand All @@ -211,7 +212,7 @@ def new_consumer():
self.channel.queue.declare(
queue=queue,
durable=self.queue_params.durable,
passive=self.queue_params.passive,
passive=self.queue_params.passive if passive_queue is None else passive_queue,
auto_delete=self.queue_params.auto_delete,
arguments=queue_arguments,
)
Expand Down

0 comments on commit cf9cddc

Please sign in to comment.