qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1406809 - /qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp
Date Wed, 07 Nov 2012 21:10:12 GMT
Author: chug
Date: Wed Nov  7 21:10:11 2012
New Revision: 1406809

URL: http://svn.apache.org/viewvc?rev=1406809&view=rev
Log:
QPID-4423 C++ Broker federated bridge creation should not declare named queues.

Named queues are assumed to exist and should not be declared during bridge creation.


Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?rev=1406809&r1=1406808&r2=1406809&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp Wed Nov  7 21:10:11 2012
@@ -121,28 +121,30 @@ void Bridge::create(Connection& c)
         peer->getMessage().flow(args.i_dest, 1, 0xFFFFFFFF);
         QPID_LOG(debug, "Activated bridge " << name << " for route from queue
" << args.i_src << " to " << args.i_dest);
     } else {
-        FieldTable queueSettings;
+        if (!useExistingQueue) {
+            FieldTable queueSettings;
 
-        if (args.i_tag.size()) {
-            queueSettings.setString("qpid.trace.id", args.i_tag);
-        } else {
-            const string& peerTag = c.getFederationPeerTag();
-            if (peerTag.size())
-                queueSettings.setString("qpid.trace.id", peerTag);
+            if (args.i_tag.size()) {
+                queueSettings.setString("qpid.trace.id", args.i_tag);
+            } else {
+                const string& peerTag = c.getFederationPeerTag();
+                if (peerTag.size())
+                    queueSettings.setString("qpid.trace.id", peerTag);
+            }
+
+            if (args.i_excludes.size()) {
+                queueSettings.setString("qpid.trace.exclude", args.i_excludes);
+            } else {
+                const string& localTag = link->getBroker()->getFederationTag();
+                if (localTag.size())
+                    queueSettings.setString("qpid.trace.exclude", localTag);
+            }
+
+            bool durable = false;//should this be an arg, or would we use srcIsQueue for
durable queues?
+            bool exclusive = true;  // only exclusive if the queue is owned by the bridge
+            bool autoDelete = exclusive && !durable;//auto delete transient queues?
+            peer->getQueue().declare(queueName, altEx, false, durable, exclusive, autoDelete,
queueSettings);
         }
-
-        if (args.i_excludes.size()) {
-            queueSettings.setString("qpid.trace.exclude", args.i_excludes);
-        } else {
-            const string& localTag = link->getBroker()->getFederationTag();
-            if (localTag.size())
-                queueSettings.setString("qpid.trace.exclude", localTag);
-        }
-
-        bool durable = false;//should this be an arg, or would we use srcIsQueue for durable
queues?
-        bool exclusive = !useExistingQueue;  // only exclusive if the queue is owned by the
bridge
-        bool autoDelete = exclusive && !durable;//auto delete transient queues?
-        peer->getQueue().declare(queueName, altEx, false, durable, exclusive, autoDelete,
queueSettings);
         if (!args.i_dynamic)
             peer->getExchange().bind(queueName, args.i_src, args.i_key, FieldTable());
         peer->getMessage().subscribe(queueName, args.i_dest, (useExistingQueue &&
args.i_sync) ? 0 : 1, 0, false, "", 0, options);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message