Vinod,

Try setting the network connector attribute called 'dynamicOnly' to true as
follows. 

<networkConnector name="default-nc" dynamicOnly="true"
uri="multicast://default"/> 

This will instruct the broker to forward messages only if there are active
consumers at the connected broker. By default, dynamicOnly is set to false. 

Joe
 


Vinod Venkatraman wrote:
> 
> Hi,
> 
> Am using apache-activemq-5.0-20071015.164042-22.zip
> 
> I have couple of standalone store and forward brokers running. With
> configuration as shown below. Producers/Consumers/Brokers are using
> multicast discovery.
> 
> Following is the problem i am facing:
> When producer and consumer happen to discover and connect to the same
> broker (say B1) even then many messages are getting forwarded to B2. And
> since there are no consumers on B2 they remain there and are never
> consumed. 
> 
> Meanwhile the consumer connected to B1 receives no/very few messages.
> 
> I verified this by making a 2nd consumer connect directly to B2 and then
> it consumes all the forwarded messages.
> 
> What I was expecting is that messages would never be forwarded to B2 as it
> does not have any registered consumers.
> 
> When producer and consumer happen to discover and connect to different
> brokers things work fine and all messages are consumed. 
> 
> Any help would be appreciated.
> 
> <beans>
> 
>   <!-- Allows us to use system properties as variables in this
> configuration file -->
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> 
>     <broker brokerName="broker_vinod" useJmx="true"
> xmlns="http://activemq.org/config/1.0";>
>     <persistenceAdapter>
>         <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.base}/activemq-data/broker1_slave"/>
>     </persistenceAdapter>
> 
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>     </transportConnectors>
> 
>     <networkConnectors>
>       <!-- by default just auto discover the other brokers -->
>       <networkConnector name="default-nc" uri="multicast://default"/>
>     </networkConnectors>
> 
>   </broker>
> 
> 
> 
> Thanks,
> Vinod
> 

-- 
View this message in context: 
http://www.nabble.com/Store-and-forward-brokers-issue-tf4670537s2354.html#a13364379
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to