You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by yygcyupeng <40...@qq.com> on 2014/02/20 10:30:50 UTC

Duplex networkConnector can not reconnect when network is restored on ActiveMQ 5.9.

Hi All, 

We are attempting to use a duplex networkConnector  for sending message from
brokerA to brokerB.like this:
                       URI uri = new URI("static:(tcp://" + ip + ":"+ port +
")");
			nc = new DiscoveryNetworkConnector(uri); 
			nc.setDuplex(true);
			nc.setName(ncUniqueName);
			nc.setBrokerName("localBrokerName");
			nc.setDecreaseNetworkConsumerPriority(false);
			requestQueue = new EMQQueue("localBrokerName:"+name);
			EMQQueue responseQueue = new EMQQueue(name+":localBrokerName");
			nc.setStaticBridge(true);
			nc.addStaticallyIncludedDestination(requestQueue);
			nc.addStaticallyIncludedDestination(responseQueue);
			brokerService.addNetworkConnector(nc); 
			nc.start();

With in AtiveMQ 5.7,when network interupted are restored,brokerA will
reconnect brokerB,and messages still send.but now ,when we update to
activemq 5.9,messages cant send from brokerA to brokerB.
And why? Whats the difference between 5.7 and 5.9 on static network
connector?


Best regards, 
-John



--
View this message in context: http://activemq.2283324.n4.nabble.com/Duplex-networkConnector-can-not-reconnect-when-network-is-restored-on-ActiveMQ-5-9-tp4678187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Duplex networkConnector can not reconnect when network is restored on ActiveMQ 5.9.

Posted by Yin Wang <su...@gmail.com>.
It's hard to enumerate differences between them, even for developers.
You'd better to create a similar test case to see what's up inside broker,
here are some examples,
https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=blob_plain;f=activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryUriTest.java;hb=17cc9c0228cf8907a40307d4dab80857f9b460f4


2014-02-20 17:30 GMT+08:00 yygcyupeng <40...@qq.com>:

> Hi All,
>
> We are attempting to use a duplex networkConnector  for sending message
> from
> brokerA to brokerB.like this:
>                        URI uri = new URI("static:(tcp://" + ip + ":"+ port
> +
> ")");
>                         nc = new DiscoveryNetworkConnector(uri);
>                         nc.setDuplex(true);
>                         nc.setName(ncUniqueName);
>                         nc.setBrokerName("localBrokerName");
>                         nc.setDecreaseNetworkConsumerPriority(false);
>                         requestQueue = new
> EMQQueue("localBrokerName:"+name);
>                         EMQQueue responseQueue = new
> EMQQueue(name+":localBrokerName");
>                         nc.setStaticBridge(true);
>                         nc.addStaticallyIncludedDestination(requestQueue);
>                         nc.addStaticallyIncludedDestination(responseQueue);
>                         brokerService.addNetworkConnector(nc);
>                         nc.start();
>
> With in AtiveMQ 5.7,when network interupted are restored,brokerA will
> reconnect brokerB,and messages still send.but now ,when we update to
> activemq 5.9,messages cant send from brokerA to brokerB.
> And why? Whats the difference between 5.7 and 5.9 on static network
> connector?
>
>
> Best regards,
> -John
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Duplex-networkConnector-can-not-reconnect-when-network-is-restored-on-ActiveMQ-5-9-tp4678187.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Duplex networkConnector can not reconnect when network is restored on ActiveMQ 5.9.

Posted by yygcyupeng <40...@qq.com>.
<broker xmlns="http://activemq.apache.org/schema/core" advisorySupport="true" 
brokerName="etp_server" 
		persistent="true" >
		<destinationPolicy>
			<policyMap>
				<policyEntries>
					<policyEntry queue=">"  />
					<policyEntry queue=">" producerFlowControl="false"
optimizedDispatch="true"/> 
					<policyEntry topic=">">
						<dispatchPolicy>
							<strictOrderDispatchPolicy />
						</dispatchPolicy>
						<subscriptionRecoveryPolicy>
							<lastImageSubscriptionRecoveryPolicy />
						</subscriptionRecoveryPolicy>
					</policyEntry>
				</policyEntries>
			</policyMap>
		</destinationPolicy>
		<managementContext>
            <managementContext createConnector="true" connectorPort="1099"/>
        </managementContext>
		<persistenceAdapter>
			<kahaDB directory="/cache"/>
		</persistenceAdapter>


        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="10 gb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="20 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="20 gb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>
		<transportConnectors>
			<transportConnector name="openwire" uri="tcp://0.0.0.0:61616" />
		</transportConnectors>
	</broker>



--
View this message in context: http://activemq.2283324.n4.nabble.com/Duplex-networkConnector-can-not-reconnect-when-network-is-restored-on-ActiveMQ-5-9-tp4678187p4678286.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Duplex networkConnector can not reconnect when network is restored on ActiveMQ 5.9.

Posted by "shooeugenesea.tw" <sh...@yahoo.com.tw>.
Can you provide detail configuration?
I can't reproduce it.


yygcyupeng wrote
> I still can not solver this problem ,am I wrong about creating static
> networkbridge?





--
View this message in context: http://activemq.2283324.n4.nabble.com/Duplex-networkConnector-can-not-reconnect-when-network-is-restored-on-ActiveMQ-5-9-tp4678187p4678284.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Duplex networkConnector can not reconnect when network is restored on ActiveMQ 5.9.

Posted by Gary Tully <ga...@gmail.com>.
first. enable trace level logging (log4j) for activemq - there may be
some indication of a problem in the logs.
then try putting the bridge config in the xml to see if that changes anything.

On 22 February 2014 02:14, yygcyupeng <40...@qq.com> wrote:
> I still can not solver this problem ,am I wrong about creating static
> networkbridge?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Duplex-networkConnector-can-not-reconnect-when-network-is-restored-on-ActiveMQ-5-9-tp4678187p4678271.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com

Re: Duplex networkConnector can not reconnect when network is restored on ActiveMQ 5.9.

Posted by yygcyupeng <40...@qq.com>.
I still can not solver this problem ,am I wrong about creating static
networkbridge?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Duplex-networkConnector-can-not-reconnect-when-network-is-restored-on-ActiveMQ-5-9-tp4678187p4678271.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.