activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SuoNayi <suonayi2...@163.com>
Subject Reply:Re: Reply:Reply:Re: Reply:Re: Reply:Re: Is there a simple way to solve the issuse of stuck messages when network?
Date Wed, 07 Dec 2011 15:18:31 GMT
So why not set a new messageId for messages which will be forwarded to the original broker?




At 2011-12-07 19:18:21,"Gary Tully" <gary.tully@gmail.com> wrote:
>yes, that feature needs to be combined with the audit=false destinationPolicy
>
>2011/12/7 SuoNayi <suonayi2006@163.com>:
>> Another confusion abount forwarding messages and back.
>> The lastest release version such as apache-activemq-5.5.1-fuse-01-06 and apache-activemq-5.5.1-fuse-01-11
has added a new conditionalNetworkBridgeFilter to allow messages to be forwarded back to the
original broker where it come from.
>> while in the forward process,forward bridge does not set new messageId for the message.
>> Duplicate audit will be applied when the message comes back from the remote broker
and it will be recognized to be duplicate message and suppressed, won't it?
>> Counld someone make me clear?
>> Thanks.
>>
>>
>> At 2011-12-07 12:36:31,SuoNayi <suonayi2006@163.com> wrote:
>>>I have tested apache-activemq-5.5.1-fuse-01-06 and apache-activemq-5.5.1-fuse-01-11
and they don't work as well.
>>>I'm depressed so much after lots of tests.
>>>My configuration files are the following:
>>>------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>><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">
>>>
>>>        <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>
>>>
>>>        <managementContext>
>>>            <managementContext createConnector="true"/>
>>>        </managementContext>
>>>
>>>        <networkConnectors>
>>>            <networkConnector     uri="multicast://default?group=knet"
>>>                                  name="nc1"
>>>                                duplex="true"
>>>                                networkTTL="6"
>>>                                dynamicOnly="true"
>>>                                prefetchSize="1"
>>>                                conduitSubscriptions="true"
>>>                                suppressDuplicateQueueSubscriptions="true"
>>>                                suppressDuplicateTopicSubscriptions="true"
>>>                                decreaseNetworkConsumerPriority="true" />
>>>        </networkConnectors>
>>>
>>>        <persistenceAdapter>
>>>            <kahaDB directory="${activemq.base}/data/kahadb" enableJournalDiskSyncs="false"
indexWriteBatchSize="10000" indexCacheSize="1000"/>
>>>        </persistenceAdapter>
>>>
>>>        <systemUsage>
>>>            <systemUsage>
>>>                <memoryUsage>
>>>                    <memoryUsage limit="1 gb"/>
>>>                </memoryUsage>
>>>                <storeUsage>
>>>                    <storeUsage limit="10 gb" name="foo"/>
>>>                </storeUsage>
>>>                <tempUsage>
>>>                    <tempUsage limit="1 gb"/>
>>>                </tempUsage>
>>>            </systemUsage>
>>>        </systemUsage>
>>>
>>>        <transportConnectors>
>>>            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default?group=knet"
/>
>>>        </transportConnectors>
>>>
>>>
>>>    </broker>
>>>    <import resource="jetty.xml"/>
>>></beans>
>>>------------------------------------------------------------------------------------------------------------------------------------------------------
>>><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">
>>>
>>>        <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>
>>>
>>>        <managementContext>
>>>            <managementContext createConnector="false"/>
>>>        </managementContext>
>>>
>>>        <networkConnectors>
>>>            <networkConnector     uri="multicast://default?group=knet"
>>>                                  name="nc2"
>>>                                duplex="true"
>>>                                networkTTL="6"
>>>                                dynamicOnly="true"
>>>                                prefetchSize="1"
>>>                                conduitSubscriptions="true"
>>>                                suppressDuplicateQueueSubscriptions="true"
>>>                                suppressDuplicateTopicSubscriptions="true"
>>>                                decreaseNetworkConsumerPriority="true" />
>>>        </networkConnectors>
>>>
>>>        <persistenceAdapter>
>>>            <kahaDB directory="${activemq.base}/data/kahadb" enableJournalDiskSyncs="false"
indexWriteBatchSize="10000" indexCacheSize="1000"/>
>>>        </persistenceAdapter>
>>>
>>>        <systemUsage>
>>>            <systemUsage>
>>>                <memoryUsage>
>>>                    <memoryUsage limit="1 gb"/>
>>>                </memoryUsage>
>>>                <storeUsage>
>>>                    <storeUsage limit="10 gb" name="foo"/>
>>>                </storeUsage>
>>>                <tempUsage>
>>>                    <tempUsage limit="1 gb"/>
>>>                </tempUsage>
>>>            </systemUsage>
>>>        </systemUsage>
>>>
>>>        <transportConnectors>
>>>            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default?group=knet"
/>
>>>        </transportConnectors>
>>>
>>>
>>>    </broker>
>>>    <import resource="jetty.xml"/>
>>></beans>
>>>---------------------------------------------------------------------------------------------------------------------------------------------------------
>>>
>>>
>>>
>>>
>>>At 2011-12-07 00:05:42,"Torsten Mielke" <torsten@fusesource.com> 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" <torsten@fusesource.com>
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" <torsten@fusesource.com>
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
>>>>>>>> torsten@fusesource.com
>>>>>>>> tmielke@blogspot.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 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
>>>>>> torsten@fusesource.com
>>>>>> tmielke@blogspot.com
>>>>
>>>
>>>
>>>
>>>
>>>--
>>>
>>>Wangyin
>>>SuoNayi2006@163.com
>>>
>
>
>
>-- 
>http://fusesource.com
>http://blog.garytully.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message