Skip to content

Commit

Permalink
Merge pull request #83 from NOAA-GSL/chore/idsse-860/support-setting-…
Browse files Browse the repository at this point in the history
…ack-nack-timeout

Fixed KeyError where 'x-queue-type' was assumed to be in args
  • Loading branch information
Geary-Layne authored Nov 1, 2024
2 parents 125a867 + b4ea48f commit 3da736c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/idsse_common/idsse/common/rabbitmq_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ def subscribe_to_queue(

def _setup_exch_and_queue(channel: Channel, exch: Exch, queue: Queue):
"""Setup an exchange and queue and bind them with the queue's route key(s)"""
if queue.arguments['x-queue-type'] == 'quorum' and queue.auto_delete:
if queue.arguments and 'x-queue-type' in queue.arguments and \
queue.arguments['x-queue-type'] == 'quorum' and queue.auto_delete:
raise ValueError('Quorum queues can not be configured to auto delete')

_setup_exch(channel, exch)
Expand Down

0 comments on commit 3da736c

Please sign in to comment.