fix for https://issues.apache.org/activemq/browse/AMQ-2359 - staticallyIncludedDestinations and duplicate messages

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@806107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2009-08-20 10:17:05 +00:00
parent 7d5131eaca
commit ea44017640
3 changed files with 8 additions and 5 deletions

View File

@ -73,11 +73,10 @@ public class ConduitBridge extends DemandForwardingBridge {
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);

View File

@ -167,7 +167,7 @@ public abstract class JmsSendReceiveTestSupport extends TestSupport implements M
}
}
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);

View File

@ -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>