qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r824105 - /qpid/trunk/qpid/python/qpid/driver.py
Date Sun, 11 Oct 2009 16:54:18 GMT
Author: rhs
Date: Sun Oct 11 16:54:18 2009
New Revision: 824105

URL: http://svn.apache.org/viewvc?rev=824105&view=rev
Log:
fixed subscription to use subject if present

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

Modified: qpid/trunk/qpid/python/qpid/driver.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/driver.py?rev=824105&r1=824104&r2=824105&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/driver.py Sun Oct 11 16:54:18 2009
@@ -546,11 +546,18 @@
         else:
           _rcv._queue = "%s.%s" % (rcv.session.name, rcv.destination)
           sst.write_cmd(QueueDeclare(queue=_rcv._queue, durable=DURABLE_DEFAULT, exclusive=True,
auto_delete=True))
-          # XXX
-          if _rcv.options.get("filter") is None:
+          filter = _rcv.options.get("filter")
+          if _rcv.subject is None and filter is None:
             f = FILTER_DEFAULTS[result.type]
+          elif _rcv.subject and filter:
+            # XXX
+            raise Exception("can't supply both subject and filter")
+          elif _rcv.subject:
+            # XXX
+            from messaging import Pattern
+            f = Pattern(_rcv.subject)
           else:
-            f = rcv.filter
+            f = filter
           f._bind(sst, _rcv.name, _rcv._queue)
         do_link()
       sst.write_query(ExchangeQuery(name=_rcv.name), do_exchange_q)



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


Mime
View raw message