From 48ca2cd63d9b5cb237ba768b3c98e68cb99f2a76 Mon Sep 17 00:00:00 2001 From: Nitzan Miron Date: Wed, 14 Dec 2011 14:52:16 +0200 Subject: [PATCH] Added support for queue prefixes in SQS. --- kombu/transport/SQS.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kombu/transport/SQS.py b/kombu/transport/SQS.py index d31a9249..d86f9193 100644 --- a/kombu/transport/SQS.py +++ b/kombu/transport/SQS.py @@ -158,6 +158,7 @@ class Channel(virtual.Channel): def _new_queue(self, queue, **kwargs): """Ensures a queue exists in SQS.""" + queue = self.queue_name_prefix + queue try: return self._queue_cache[queue] except KeyError: @@ -322,6 +323,10 @@ class Channel(virtual.Channel): @cached_property def visibility_timeout(self): return self.transport_options.get("visibility_timeout") + + @cached_property + def queue_name_prefix(self): + return self.transport_options.get("queue_name_prefix", '') @cached_property def supports_fanout(self):