You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by realSri <ko...@washington.edu> on 2008/03/19 23:31:47 UTC

networkconnector excludeDestinations ...


Version: 5.0

We have a simple setup to test excludedDestinations config ...We are using
the broker and  example producer & consumer from the binary distribution
(broker instances A & B are on different hosts
Setup:

producer --- A ---- B--- consumer

    <networkConnectors>
      <networkConnector name="toB" uri="static://(tcp://B.foo.com:61616)">
           <excludedDestinations>
                <queue physicalName="TEST.>" />
           </excludedDestinations>
     </networkConnector>
    </networkConnectors>

We noticed that none of the queue or topic wildcards work, only specific
topic or queue names work in the exclusion. However,
http://activemq.apache.org/networks-of-brokers.html states "N.B. You can use
wildcards in inclusive , exclusive destination properties". Are we missing
anything ?

Thanks
- Sri

-- 
View this message in context: http://www.nabble.com/networkconnector-excludeDestinations-...-tp16154709s2354p16154709.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: networkconnector excludeDestinations ...

Posted by realSri <ko...@washington.edu>.


Rob,

I did a little investigation and the problem appears to be here:

DemandForwardingBridgeSupport.java:
    protected boolean isPermissableDestination(ActiveMQDestination
destination) {
        // Are we not bridging temp destinations?
        if (destination.isTemporary() &&
!configuration.isBridgeTempDestinations()) {
            return false;
        }

       A****  DestinationFilter filter =
DestinationFilter.parseFilter(destination);
        ActiveMQDestination[] dests = excludedDestinations;
        if (dests != null && dests.length > 0) {
            for (int i = 0; i < dests.length; i++) {
                ActiveMQDestination match = dests[i];
                if (match != null && filter.matches(match)) {
                    return false;
                }
            }
      }

The DestinationFilter returned (A above) is SimpleDestinationFilter because
the destination (TEST.FOO) is "simple" ==> filter.matches tries to string
comparison eventually( TEST.FOO with TEST.>) and does not match it.
        
 I am not very familiar with the code, but shouldn't  the DestinationFilter
reflect wildcard/prefix in either excludedDestination or the queue/topic
destination ? 
Thanks
- Sridhar
 

rajdavies wrote:
> 
> 
> On 19 Mar 2008, at 22:31, realSri wrote:
> 
>>
>>
>> Version: 5.0
>>
>> We have a simple setup to test excludedDestinations config ...We are  
>> using
>> the broker and  example producer & consumer from the binary  
>> distribution
>> (broker instances A & B are on different hosts
>> Setup:
>>
>> producer --- A ---- B--- consumer
>>
>>    <networkConnectors>
>>      <networkConnector name="toB" uri="static://(tcp://B.foo.com: 
>> 61616)">
>>           <excludedDestinations>
>>                <queue physicalName="TEST.>" />
>>           </excludedDestinations>
>>     </networkConnector>
>>    </networkConnectors>
>>
>> We noticed that none of the queue or topic wildcards work, only  
>> specific
>> topic or queue names work in the exclusion. However,
>> http://activemq.apache.org/networks-of-brokers.html states "N.B. You  
>> can use
>> wildcards in inclusive , exclusive destination properties". Are we  
>> missing
>> anything ?
>>
>> Thanks
>> - Sri
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/networkconnector-excludeDestinations-...-tp16154709s2354p16154709.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> This should work - there's some please raise a jira and a test case
> 
> 
> 
> cheers,
> 
> Rob
> 
> http://open.iona.com/ -Enterprise Open Integration
> http://rajdavies.blogspot.com/
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/networkconnector-excludeDestinations-...-tp16154709s2354p16190406.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: networkconnector excludeDestinations ...

Posted by Rob Davies <ra...@gmail.com>.
On 19 Mar 2008, at 22:31, realSri wrote:

>
>
> Version: 5.0
>
> We have a simple setup to test excludedDestinations config ...We are  
> using
> the broker and  example producer & consumer from the binary  
> distribution
> (broker instances A & B are on different hosts
> Setup:
>
> producer --- A ---- B--- consumer
>
>    <networkConnectors>
>      <networkConnector name="toB" uri="static://(tcp://B.foo.com: 
> 61616)">
>           <excludedDestinations>
>                <queue physicalName="TEST.>" />
>           </excludedDestinations>
>     </networkConnector>
>    </networkConnectors>
>
> We noticed that none of the queue or topic wildcards work, only  
> specific
> topic or queue names work in the exclusion. However,
> http://activemq.apache.org/networks-of-brokers.html states "N.B. You  
> can use
> wildcards in inclusive , exclusive destination properties". Are we  
> missing
> anything ?
>
> Thanks
> - Sri
>
> -- 
> View this message in context: http://www.nabble.com/networkconnector-excludeDestinations-...-tp16154709s2354p16154709.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

This should work - there's some please raise a jira and a test case



cheers,

Rob

http://open.iona.com/ -Enterprise Open Integration
http://rajdavies.blogspot.com/