qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonat...@apache.org
Subject svn commit: r1056473 - /qpid/trunk/qpid/python/qpid/messaging/driver.py
Date Fri, 07 Jan 2011 19:44:02 GMT
Author: jonathan
Date: Fri Jan  7 19:44:02 2011
New Revision: 1056473

URL: http://svn.apache.org/viewvc?rev=1056473&view=rev
Log:
Eliminates duplicate ExchangeBind when x-bindings are present.

Modified:
    qpid/trunk/qpid/python/qpid/messaging/driver.py

Modified: qpid/trunk/qpid/python/qpid/messaging/driver.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/driver.py?rev=1056473&r1=1056472&r2=1056473&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/driver.py Fri Jan  7 19:44:02 2011
@@ -82,6 +82,7 @@ class Pattern:
   # XXX: this should become part of the driver
   def _bind(self, sst, exchange, queue):
     from qpid.ops import ExchangeBind
+
     sst.write_cmd(ExchangeBind(exchange=exchange, queue=queue,
                                binding_key=self.value.replace("*", "#")))
 
@@ -244,8 +245,10 @@ class LinkIn:
                     overrides=declare)
       _rcv.on_unlink = [QueueDelete(_rcv._queue)]
       subject = _rcv.subject or SUBJECT_DEFAULTS.get(subtype)
-      sst.write_cmd(ExchangeBind(_rcv._queue, _rcv.name, subject))
       bindings = get_bindings(link_opts, _rcv._queue, _rcv.name, subject)
+      if not bindings:
+        sst.write_cmd(ExchangeBind(_rcv._queue, _rcv.name, subject))
+
     elif type == "queue":
       _rcv._queue = _rcv.name
       if _rcv.options.get("mode", "consume") == "browse":



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message