activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r806107 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/network/ConduitBridge.java test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java test/resources/org/apache/activemq/usecases/sender.xml
Date Thu, 20 Aug 2009 10:17:06 GMT
Author: dejanb
Date: Thu Aug 20 10:17:05 2009
New Revision: 806107

URL: http://svn.apache.org/viewvc?rev=806107&view=rev
Log:
fix for https://issues.apache.org/activemq/browse/AMQ-2359 - staticallyIncludedDestinations
and duplicate messages

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
    activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java?rev=806107&r1=806106&r2=806107&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
Thu Aug 20 10:17:05 2009
@@ -73,11 +73,10 @@
     protected boolean addToAlreadyInterestedConsumers(ConsumerInfo info) {
         // search through existing subscriptions and see if we have a match
         boolean matched = false;
-        DestinationFilter filter = DestinationFilter.parseFilter(info.getDestination());
         for (Iterator i = subscriptionMapByLocalId.values().iterator(); i.hasNext();) {
             DemandSubscription ds = (DemandSubscription)i.next();
-            
-            if (filter.matches(ds.getLocalInfo().getDestination())) {
+            DestinationFilter filter = DestinationFilter.parseFilter(ds.getLocalInfo().getDestination());
+            if (filter.matches(info.getDestination())) {
                 if (LOG.isDebugEnabled()) {
                     LOG.debug(configuration.getBrokerName() + " matched (add interest) to
exsting sub for: " + ds.getRemoteInfo()
                             + " with sub: " + info);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java?rev=806107&r1=806106&r2=806107&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
Thu Aug 20 10:17:05 2009
@@ -167,7 +167,7 @@
             }
         }
 
-        assertEquals("Not enough messages received", data.length, receivedMessages.size());
+        assertEquals("Invalid number of messages received", data.length, receivedMessages.size());
 
         for (int i = 0; i < data.length; i++) {
             Message received = receivedMessages.get(i);

Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml?rev=806107&r1=806106&r2=806107&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml
(original)
+++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml
Thu Aug 20 10:17:05 2009
@@ -23,7 +23,11 @@
     </transportConnectors>
 
     <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:62002)"/>
+      <networkConnector uri="static:(tcp://localhost:62002)">
+        <staticallyIncludedDestinations>
+          <topic physicalName=">"/>
+        </staticallyIncludedDestinations>
+      </networkConnector>
     </networkConnectors>
 
     <persistenceAdapter>



Mime
View raw message