In some environments creating new queues might be restricted, even though queue exists.
Issue:
The current implementation will declare a queue if it does not yet exist in Broker.queues and since Broker.queues initialized empty Broker.decalre_queue will always try to create the sqs queue.
I'd like to add support for already defined queues.
By allowing to pass the queues attribute to the broker initialization can solve predefined queues issue.
If a new task with a new queue will be presented to the broker - the broker will still try to create a queue and it should give the desired result (Created queue in case of CreateQueue policy is granted, or Error that will describe the lack of permissions to do so)
Motivation:
In some environments creating new queues might be restricted, even though queue exists.
Issue:
The current implementation will declare a queue if it does not yet exist in
Broker.queues
and sinceBroker.queues
initialized emptyBroker.decalre_queue
will always try to create the sqs queue.I'd like to add support for already defined queues. By allowing to pass the
queues
attribute to the broker initialization can solve predefined queues issue.If a new task with a new queue will be presented to the broker - the broker will still try to create a queue and it should give the desired result (Created queue in case of CreateQueue policy is granted, or Error that will describe the lack of permissions to do so)