I have tried apache-activemq-5.5.1-fuse-01-06 and 
apache-activemq-5.5.1-fuse-01-11 but they both donot work for the issue.
I will attach my configuration files.I'm so depressed after lots of tests.




At 2011-12-07 00:05:42,"Torsten Mielke" <[email protected]> wrote:
>Yep, the latest release version. 
>I have already seen a customer using it. 
>
>
>
>On Dec 6, 2011, at 5:02 PM, SuoNayi wrote:
>
>> Thanks Torsten,It's the release version not snapshot version,right?
>> 
>> http://repo.fusesource.com/nexus/content/repositories/releases/org/apache/activemq/apache-activemq/5.5.1-fuse-01-06/
>> 
>> 
>> 
>> 
>> At 2011-12-06 23:44:49,"Torsten Mielke" <[email protected]> wrote:
>>> The latest 5.5 release from FuseSource should already have this feature 
>>> implemented, AFAIK.
>>> 
>>> 
>>> On Dec 6, 2011, at 3:43 PM, SuoNayi wrote:
>>> 
>>>> Yes, it's a feature of AMQ 5.6 which is not released yet.
>>>> The trunk is a snapshot version but I want a release version for my 
>>>> product enviroment.
>>>> So I want to modify some to solve this issue.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> At 2011-12-06 19:44:36,"Torsten Mielke" <[email protected]> wrote:
>>>>> Hi,
>>>>> 
>>>>> Is it the replayWhenNoConsumers feature that you're looking for?
>>>>> 
>>>>> <conditionalNetworkBridgeFilterFactory replayWhenNoConsumers="true" />
>>>>> 
>>>>> See http://activemq.apache.org/networks-of-brokers.html, part "Stuck 
>>>>> messages".
>>>>> 
>>>>> 
>>>>> Torsten Mielke
>>>>> [email protected]
>>>>> [email protected]
>>>>> 
>>>>> 
>>>>> 
>>>>> On Dec 6, 2011, at 6:54 AM, SuoNayi wrote:
>>>>> 
>>>>>> Hi all and professionals at fusesource, is there a simple way to solve 
>>>>>> the issuse of stuck messages when network?
>>>>>> Could I modify some source code ,for example the matchesForwardingFilter 
>>>>>> method in the class NetworkBridgeFilter ?
>>>>>> I want to annotate the line code which checks a message passes through 
>>>>>> the target broker or not,
>>>>>> but this maybe cause other potential and unknown problem.
>>>>>> So could anyone give me a advice or some tips?Thanks a lot!
>>>>> 
>>>>> 
>>>>> 
>>> 
>>> Torsten Mielke
>>> [email protected]
>>> [email protected]
>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
    http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!--  
    Create a dynamic network of brokers
    For more information, see:
    
    http://activemq.apache.org/networks-of-brokers.html
    
    To run this example network of ActiveMQ brokers run
    
    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
    
    and
    
    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
    
    in separate consoles
 -->
<beans
  xmlns="http://www.springframework.org/schema/beans";
  xmlns:amq="http://activemq.apache.org/schema/core";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd";>

    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker xmlns="http://activemq.apache.org/schema/core"; brokerName="mybroker1" dataDirectory="${activemq.base}/data">

        <!-- Destination specific policies using destination names or wildcards -->
        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" producerFlowControl="false" memoryLimit="512mb">
                    	<networkBridgeFilterFactory>
                    		<conditionalNetworkBridgeFilterFactory replayWhenNoConsumers="true" />
                    	</networkBridgeFilterFactory>
                    </policyEntry>
                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
        <managementContext>
            <managementContext createConnector="true"/>
        </managementContext>

        <!--
            Configure network connector to use multicast protocol
            For more information, see
            
            http://activemq.apache.org/multicast-transport-reference.html
        -->
	    <networkConnectors>
			<networkConnector 	uri="multicast://default?group=knet"
		      					name="nc1"
								duplex="true"
								networkTTL="6"
								dynamicOnly="true"
								prefetchSize="1"
								conduitSubscriptions="true"
								suppressDuplicateQueueSubscriptions="false"
								suppressDuplicateTopicSubscriptions="true"
						        decreaseNetworkConsumerPriority="true" />
		</networkConnectors>
	    
        <persistenceAdapter>
            <kahaDB directory="${activemq.base}/data/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
        </persistenceAdapter>
        
        <!--  The maximum amount of space the broker will use before slowing down producers -->
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="1 gb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="10 gb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="1 gb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>

	    <!-- 
            The transport connectors ActiveMQ will listen to
            Configure discovery URI to use multicast protocol
        -->
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default?group=knet" />
        </transportConnectors>
        

    </broker>
	<import resource="jetty.xml"/>
</beans>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
    http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!--  
    Create a dynamic network of brokers
    For more information, see:
    
    http://activemq.apache.org/networks-of-brokers.html
    
    To run this example network of ActiveMQ brokers run
    
    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
    
    and
    
    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
    
    in separate consoles
 -->
<beans
  xmlns="http://www.springframework.org/schema/beans";
  xmlns:amq="http://activemq.apache.org/schema/core";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd";>

    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker xmlns="http://activemq.apache.org/schema/core"; brokerName="mybroker2" dataDirectory="${activemq.base}/data">

        <!-- Destination specific policies using destination names or wildcards -->
        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" producerFlowControl="false" memoryLimit="512mb">
                    	<networkBridgeFilterFactory>
                    		<conditionalNetworkBridgeFilterFactory replayWhenNoConsumers="true" />
                    	</networkBridgeFilterFactory>
                    </policyEntry>
                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>

        <!--
            Configure network connector to use multicast protocol
            For more information, see
            
            http://activemq.apache.org/multicast-transport-reference.html
        -->
	    <networkConnectors>
			<networkConnector 	uri="multicast://default?group=knet"
		      					name="nc2"
								duplex="true"
								networkTTL="6"
								dynamicOnly="true"
								prefetchSize="1"
								conduitSubscriptions="true"
								suppressDuplicateQueueSubscriptions="false"
								suppressDuplicateTopicSubscriptions="true"
						        decreaseNetworkConsumerPriority="true" />
		</networkConnectors>
	    
        <persistenceAdapter>
            <kahaDB directory="${activemq.base}/data/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
        </persistenceAdapter>
        
        <!--  The maximum amount of space the broker will use before slowing down producers -->
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="1 gb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="10 gb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="1 gb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>

	    <!-- 
            The transport connectors ActiveMQ will listen to
            Configure discovery URI to use multicast protocol
        -->
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618" discoveryUri="multicast://default?group=knet" />
        </transportConnectors>
        

    </broker>
	<import resource="jetty.xml"/>
</beans>

Reply via email to