Skip to content
Snippets Groups Projects
Commit eb0d488b authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Make bind queue optional when start consume

parent d0323af9
4 merge requests!147Merge previous default branch feat-cod-rmq into main,!113WIP: Feat block user,!112User state agent,!111Update rcrmq class
...@@ -124,11 +124,13 @@ class RCRMQ(object): ...@@ -124,11 +124,13 @@ class RCRMQ(object):
routing_key = obj.get("routing_key", queue or None) routing_key = obj.get("routing_key", queue or None)
durable = obj.get("durable", True) durable = obj.get("durable", True)
exclusive = obj.get("exclusive", False) exclusive = obj.get("exclusive", False)
bind = obj.get("bind", True)
if self._connection is None: if self._connection is None:
self.connect() self.connect()
self.bind_queue(queue, routing_key, durable, exclusive) if bind:
self.bind_queue(queue, routing_key, durable, exclusive)
if self.DEBUG: if self.DEBUG:
print("Queue: " + queue + "\nRouting_key: " + routing_key) print("Queue: " + queue + "\nRouting_key: " + routing_key)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment