You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by tpounds <tr...@gmail.com> on 2007/12/20 02:24:12 UTC

NetworkTTL and Duplex Problem

What is the correct configuration for networkTTL and duplex?  I cannot seem
to get this to work as expected.  The network topology I am trying to use is
shown below.

[BROKER 1] -----> [BROKER 2] <----- [BROKER 3]

Broker 1 establishes a network connection (Non Duplex) to Broker 2.
Broker 3 establishes a network connection (Duplex) to Broker 3.

The networkTTL on all the brokers has been set to 5.

What I see are messages that are generated by producers connecting directly
to Broker 2 successfully send messages to Broker 3. The problem occurs when
producers connect directly to Broker 1.  I see the messages successfully
dispatch from Broker 1 to Broker 2 but they just sit there idle and are
never forwarded to Broker 3.  Is this expected or a bug?

Thanks,
Trevor
-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14428941.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by "steven.marcus" <st...@gmail.com>.
Joe,

Thanks for the info. I tried this set up (hub unaware of spokes) and thought
it was working. However, after some more testing, involving
starting/restarting of various servers I started to see duplicate/infinite
messages even using the 5.1-SNAPSHOT of a couple of days ago. I should have
filed a jira... apologies to the activemq team. I've had to switch to
another mq as I consider 5.0 still in shakeout...

thanks again,
Steven Marcus
-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14609797.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by ttmdev <jo...@ttmsolutions.com>.
Hi Steven,

As I understand it, a hub typically listens and accepts incoming connection
requests from the spokes. In AMQ's case, the hub-broker has a transport
connector used for listening, while the spoke-brokers each have a network
connector used for connecting to the hub. As you add spokes, you don't have
to update the hub's configuration; you just point the new spoke at the hub.
You assign the duplex option to the spoke's network connector.

Joe


steven.marcus wrote:
> 
> Hello!
> 
> I just tried the latest snapshot and am having trouble setting up hub and
> spoke for distributed persistent topics.
> 
> Could someone clarify how to set up hub and spoke, especially with regard
> to the placement of the duplex property?
> 
> Does the hub need a network connector to each spoke with duplex=true?
> Or can spokes just connect to the hub?
> 
> thanks in advance,
> Steven Marcus
> 

-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14609742.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by "steven.marcus" <st...@gmail.com>.
Hello!

I just tried the latest snapshot and am having trouble setting up hub and
spoke for distributed persistent topics.

Could someone clarify how to set up hub and spoke, especially with regard to
the placement of the duplex property?

Does the hub need a network connector to each spoke with duplex=true?
Or can spokes just connect to the hub?

thanks in advance,
Steven Marcus
-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14525139.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by tpounds <tr...@gmail.com>.
Thanks guys!  I will try this out soon.

-Trevor


rajdavies wrote:
> 
> hi Joe this issue has been fixed recently:
> https://issues.apache.org/activemq/browse/AMQ-1521
> 
> cheers,
> 
> Rob
> On Dec 20, 2007, at 4:29 PM, ttmdev wrote:
> 
>>
>> Well, I pulled out my test environment for this and gave it a go  
>> against the
>> just-released AMQ 5.0 and things wouldn't work. This is my  
>> configuration.
>>
>> [producer]-->[broker 1]<-->[broker 2]-->[broker 3]<--[consumer]
>>
>> The messages would be forwarded from broker 1 to 2, but not 3.
>>
>> So, just for kicks I pulled out the duplex="true" on broker 1's cfg  
>> file to
>> get this.
>>
>> [producer]-->[broker 1]-->[broker 2]-->[broker 3]<--[consumer]
>>
>> And it now works. It seems duplex=true is the fly-in-the-ointment.
>>
>> I have networkTTL=2 set for brokers 1 and 2. Broker 3 is just  
>> listening.
>>
>> Joe
>>
>>
>>
>>
>>
>> tpounds wrote:
>>>
>>> Is this configuration used on all 3 machines?
>>>
>>>
>>> ttmdev wrote:
>>>>
>>>> Here's an example that works for me w/a similar 3 broker topology.
>>>>
>>>> <networkConnectors>
>>>>     <networkConnector
>>>>          name="twowaybridge"
>>>>          uri="static:(tcp://remotehost:61616)"      			
>>>>      	  networkTTL="2"
>>>>      	  duplex="true"/>
>>>> </networkConnectors>
>>>>
>>>> If you haven't done so already, try moving up to AMQ 5.0.
>>>>
>>>> Joe
>>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14439928.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14443027.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by Rob Davies <ra...@gmail.com>.
awesome! thanks Trevor!

On Jan 8, 2008, at 8:55 PM, tpounds wrote:

>
> I've created a JIRA issue and a patch at the following link for the
> networkTTL problem.  This problem actually affects more than just the
> networkTTL parameter as mentioned in the ticket.  See that for more  
> info.
>
> see: https://issues.apache.org/activemq/browse/AMQ-1542
>
> -Trevor
> -- 
> View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14698670.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: NetworkTTL and Duplex Problem

Posted by tpounds <tr...@gmail.com>.
I've created a JIRA issue and a patch at the following link for the
networkTTL problem.  This problem actually affects more than just the
networkTTL parameter as mentioned in the ticket.  See that for more info.

see: https://issues.apache.org/activemq/browse/AMQ-1542

-Trevor
-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14698670.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by tpounds <tr...@gmail.com>.
Upon further investigation it seems that the networkTTL is not being
forwarded as I expected due the BrokerInfo object on the connection not
containing the networkTTL parameter.  After looking in the
broker/TransportConnection.java file i can see that a new
NetworkBridgeConfiguration object is being created and its internal
variables are being set via IntrospectionSupport.setProperties method. Since
networkTTL and other parameters that are configured via XML are not present
in the network properties the networkTTL is defaulting to 1.  I believe this
is probably the root of the problem I am seeing. I will be testing this
theory out later today.  Let me know what you guys think.

Thanks,
Trevor
-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14696783.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by tpounds <tr...@gmail.com>.
Hi Rob,

This patch in AMQ-1521 doesn't seem to fix the issue I was seeing in my
previous post.

[producer]-->[broker 1]-->[broker 2]<-->[broker 3]<--[consumer]

The messages are successfully dispatched from broker 2 to 3 if there is a
producer on broker 2. The messages are not successfully dispatched from
broker 1 to 3 however.  The messages from 1 get dispatched to broker 2 but
never reach broker 3.  The networkTTL on all the connections has been set to
5.

Configuration of activemq.xml is as follows:

Broker1
<networkConnector uri="static:(tcp://broker2:61616)" networkTTL="5"/>

Broker2
<!-- No network connectors -->

Broker3
<networkConnector uri="static:(tcp://broker2:61616)" duplex="true"
networkTTL="5"/>

Thanks,
Trevor
-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14694334.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by Rob Davies <ra...@gmail.com>.
hi Joe this issue has been fixed recently: https://issues.apache.org/activemq/browse/AMQ-1521

cheers,

Rob
On Dec 20, 2007, at 4:29 PM, ttmdev wrote:

>
> Well, I pulled out my test environment for this and gave it a go  
> against the
> just-released AMQ 5.0 and things wouldn't work. This is my  
> configuration.
>
> [producer]-->[broker 1]<-->[broker 2]-->[broker 3]<--[consumer]
>
> The messages would be forwarded from broker 1 to 2, but not 3.
>
> So, just for kicks I pulled out the duplex="true" on broker 1's cfg  
> file to
> get this.
>
> [producer]-->[broker 1]-->[broker 2]-->[broker 3]<--[consumer]
>
> And it now works. It seems duplex=true is the fly-in-the-ointment.
>
> I have networkTTL=2 set for brokers 1 and 2. Broker 3 is just  
> listening.
>
> Joe
>
>
>
>
>
> tpounds wrote:
>>
>> Is this configuration used on all 3 machines?
>>
>>
>> ttmdev wrote:
>>>
>>> Here's an example that works for me w/a similar 3 broker topology.
>>>
>>> <networkConnectors>
>>>     <networkConnector
>>>          name="twowaybridge"
>>>          uri="static:(tcp://remotehost:61616)"      			
>>>      	  networkTTL="2"
>>>      	  duplex="true"/>
>>> </networkConnectors>
>>>
>>> If you haven't done so already, try moving up to AMQ 5.0.
>>>
>>> Joe
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14439928.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: NetworkTTL and Duplex Problem

Posted by ttmdev <jo...@ttmsolutions.com>.
Well, I pulled out my test environment for this and gave it a go against the
just-released AMQ 5.0 and things wouldn't work. This is my configuration.

[producer]-->[broker 1]<-->[broker 2]-->[broker 3]<--[consumer]

The messages would be forwarded from broker 1 to 2, but not 3. 

So, just for kicks I pulled out the duplex="true" on broker 1's cfg file to
get this.  

[producer]-->[broker 1]-->[broker 2]-->[broker 3]<--[consumer]

And it now works. It seems duplex=true is the fly-in-the-ointment. 

I have networkTTL=2 set for brokers 1 and 2. Broker 3 is just listening. 

Joe





tpounds wrote:
> 
> Is this configuration used on all 3 machines?
> 
> 
> ttmdev wrote:
>> 
>> Here's an example that works for me w/a similar 3 broker topology. 
>> 
>> <networkConnectors>  
>>      <networkConnector 
>>           name="twowaybridge" 
>>           uri="static:(tcp://remotehost:61616)"      			 
>>       	  networkTTL="2"
>>       	  duplex="true"/>
>> </networkConnectors> 
>> 
>> If you haven't done so already, try moving up to AMQ 5.0.
>> 
>> Joe
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14439928.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by tpounds <tr...@gmail.com>.
Is this configuration used on all 3 machines?


ttmdev wrote:
> 
> Here's an example that works for me w/a similar 3 broker topology. 
> 
> <networkConnectors>  
>      <networkConnector 
>           name="twowaybridge" 
>           uri="static:(tcp://remotehost:61616)"      			 
>       	  networkTTL="2"
>       	  duplex="true"/>
> </networkConnectors> 
> 
> If you haven't done so already, try moving up to AMQ 5.0.
> 
> Joe
> 

-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14432231.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NetworkTTL and Duplex Problem

Posted by ttmdev <jo...@ttmsolutions.com>.
Here's an example that works for me w/a similar 3 broker topology. 

<networkConnectors>  
     <networkConnector 
          name="twowaybridge" 
          uri="static:(tcp://remotehost:61616)"      			 
      	  networkTTL="2"
      	  duplex="true"/>
</networkConnectors> 

If you haven't done so already, try moving up to AMQ 5.0.

Joe




tpounds wrote:
> 
> What is the correct configuration for networkTTL and duplex?  I cannot
> seem to get this to work as expected.  The network topology I am trying to
> use is shown below.
> 
> [BROKER 1] -----> [BROKER 2] <----- [BROKER 3]
> 
> Broker 1 establishes a network connection (Non Duplex) to Broker 2.
> Broker 3 establishes a network connection (Duplex) to Broker 2.
> 
> The networkTTL on all the brokers has been set to 5.
> 
> What I see are messages that are generated by producers connecting
> directly to Broker 2 successfully send messages to Broker 3. The problem
> occurs when producers connect directly to Broker 1.  I see the messages
> successfully dispatch from Broker 1 to Broker 2 but they just sit there
> idle and are never forwarded to Broker 3.  Is this expected or a bug? Any
> help would be appreciated.
> 
> Thanks,
> Trevor
> 

-- 
View this message in context: http://www.nabble.com/NetworkTTL-and-Duplex-Problem-tp14428941s2354p14429356.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.