You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by gio2375 <gi...@hotmail.com> on 2013/10/18 12:47:28 UTC

Connection over FleetBroadband (satellite)

Hi all,

for our customer we have an application using ActiveMq and all works well.
Now our customer want to install it on a ship with a satellite connection.
We never tried it on this type of connection and we must to be sure it'll
works well.

In our configuration we have a broker network:
<amq:networkConnector userName="name" password="password"
name="brokerOffice" duplex="true"  brokerName="brokerOffice"
dispatchAsync="true" prefetchSize="1" conduitSubscriptions="true"
decreaseNetworkConsumerPriority="false"
uri="masterslave:(tcp://test1:61611?wireFormat.maxInactivityDuration=0,tcp://test2:61611?wireFormat.maxInactivityDuration=0)"/>

The problem is that on the ship the connection is on-demand. It means that
when a software try to connect with server on the other side of connection,
a connection with the satellite will be established in a transparently way
for the software. After that, the connection between client and server can
be established. When client or server close the connection, the satellite
connection will be stopped.
For the contract type that our client have, he pay for each satellite
connection. So, my question is, there is a way to configure ActiveMq to
remain connected not always but only for a minimal time?
Can someone suggest some way to do it?

Thanks
Giovanni




--
View this message in context: http://activemq.2283324.n4.nabble.com/Connection-over-FleetBroadband-satellite-tp4672977.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Connection over FleetBroadband (satellite)

Posted by gio2375 <gi...@hotmail.com>.
Any suggestions? Is my configuration correct?

Giovanni



--
View this message in context: http://activemq.2283324.n4.nabble.com/Connection-over-FleetBroadband-satellite-tp4672977p4673089.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Connection over FleetBroadband (satellite)

Posted by gio2375 <gi...@hotmail.com>.
Hi,

in my configuration I've a broker on the office side (broker D) and n
brokers (one for each ship) on ship side (broker A) so, in my configuration,
brokers A connect to broker D to send and receive messages.
The networkConnector of brokers A are dubplex (<amq:networkConnector
duplex="true" ... )
So (if my configuration is correct) I don't have <amq:networkConnectors> tag
on Broker D.


This is my configuration for a ship broker (One of the Brokers A)
ship_activeMqBroker.xml
<http://activemq.2283324.n4.nabble.com/file/n4673045/ship_activeMqBroker.xml>  

And this is my configuration for Office broker (Broker D)
activeMqBroker.xml
<http://activemq.2283324.n4.nabble.com/file/n4673045/activeMqBroker.xml>  


Giovanni



--
View this message in context: http://activemq.2283324.n4.nabble.com/Connection-over-FleetBroadband-satellite-tp4672977p4673045.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Connection over FleetBroadband (satellite)

Posted by Christian Posta <ch...@gmail.com>.
open a transportConnector on Broker D specific for the network connections
from the ship. Put maxInactivityDuration on that connector.

For the other configs, put those on the network of brokers connector (in
Broker A) masterslave:(X,X)??options=here




On Fri, Oct 18, 2013 at 7:26 AM, gio2375 <gi...@hotmail.com> wrote:

> Thanks so much for your reply. I understand the idea but i can't get it
> works. I try to explain my configuration:
>
> Ship Side
> ----------
>
> 1) broker A: configuration <amq:networkConnector userName="name"
> password="password"  name="brokerOffice" duplex="true"
> brokerName="brokerOffice" dispatchAsync="true" prefetchSize="1"
> conduitSubscriptions="true" decreaseNetworkConsumerPriority="false"
> uri="masterslave:(tcp://test1:61611,tcp://test2:61611)"/>
>
> <amq:transportConnectors>
>                 <amq:transportConnector name="openwire"
> uri="tcp://broker.ship3:61616" />
> </amq:transportConnectors>
>
> 2) Consumer B: configuration: <bean id="jmsConnectionFactoryConsumer"
>
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                 <property name="brokerURL"
> value="tcp://broker.ship3:61616" />
>                 <property name="userName" value="name" />
>                 <property name="password" value="password" />
>         </bean>
>
> 3) Publisher C: configuration: <bean id="jmsConnectionFactory"
>
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                 <property name="brokerURL"
> value="tcp://broker.ship3:61616" />
>                 <property name="userName" value="name" />
>                 <property name="password" value="password" />
>         </bean>
>
>
> On the other side, on Office Side:
> -------------------------------------
>
> 4) Broker D: configuration: <amq:transportConnectors>
>                         <amq:transportConnector name="openwire" uri="tcp://
> office1.it:61611" />
>                 </amq:transportConnectors>
>
>
> 5) Consumer E: configuration: <bean id="jmsConnectionFactoryConsumer"
>
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                 <property name="brokerURL" value="tcp://office1.it:61611"
> />
>                 <property name="userName" value="name" />
>                 <property name="password" value="password" />
>         </bean>
>
> 6) Publisher F: configuration: <bean id="jmsConnectionFactory"
>
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                 <property name="brokerURL" value="tcp://office1.it:61611"
> />
>                 <property name="userName" value="name" />
>                 <property name="password" value="password" />
>         </bean>
>
>
> So Consumer and Publisher connect to their relative brokers and Broker A
> (ship) connect to Broker D (Office).
>
> So, where I've to put maxInactivityDuration=0 ? And where
>
> ?transport.readCheckTime=4000&transport.initialDelayTime=30000&transport.ignoreRemoteWireFormat=true
> ?
>
> I tried to put
>
> ?transport.readCheckTime=4000&transport.initialDelayTime=30000&transport.ignoreRemoteWireFormat=true
> on broker A but doesn't works.
>
>
> Giovanni
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Connection-over-FleetBroadband-satellite-tp4672977p4672987.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Connection over FleetBroadband (satellite)

Posted by gio2375 <gi...@hotmail.com>.
Thanks so much for your reply. I understand the idea but i can't get it
works. I try to explain my configuration:

Ship Side
----------

1) broker A: configuration <amq:networkConnector userName="name"
password="password"  name="brokerOffice" duplex="true" 
brokerName="brokerOffice" dispatchAsync="true" prefetchSize="1"
conduitSubscriptions="true" decreaseNetworkConsumerPriority="false"
uri="masterslave:(tcp://test1:61611,tcp://test2:61611)"/>

<amq:transportConnectors>
		<amq:transportConnector name="openwire" uri="tcp://broker.ship3:61616" />
</amq:transportConnectors>

2) Consumer B: configuration: <bean id="jmsConnectionFactoryConsumer"
			class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="tcp://broker.ship3:61616" />
		<property name="userName" value="name" />
		<property name="password" value="password" />
	</bean>

3) Publisher C: configuration: <bean id="jmsConnectionFactory"
			class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="tcp://broker.ship3:61616" />
		<property name="userName" value="name" />
		<property name="password" value="password" />
	</bean>


On the other side, on Office Side:
-------------------------------------

4) Broker D: configuration: <amq:transportConnectors>
			<amq:transportConnector name="openwire" uri="tcp://office1.it:61611" />
		</amq:transportConnectors>


5) Consumer E: configuration: <bean id="jmsConnectionFactoryConsumer"
			class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="tcp://office1.it:61611" />
		<property name="userName" value="name" />
		<property name="password" value="password" />
	</bean>

6) Publisher F: configuration: <bean id="jmsConnectionFactory"
			class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="tcp://office1.it:61611" />
		<property name="userName" value="name" />
		<property name="password" value="password" />
	</bean>


So Consumer and Publisher connect to their relative brokers and Broker A
(ship) connect to Broker D (Office).

So, where I've to put maxInactivityDuration=0 ? And where
?transport.readCheckTime=4000&amp;transport.initialDelayTime=30000&amp;transport.ignoreRemoteWireFormat=true
?

I tried to put
?transport.readCheckTime=4000&amp;transport.initialDelayTime=30000&amp;transport.ignoreRemoteWireFormat=true 
on broker A but doesn't works.


Giovanni



--
View this message in context: http://activemq.2283324.n4.nabble.com/Connection-over-FleetBroadband-satellite-tp4672977p4672987.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Connection over FleetBroadband (satellite)

Posted by Gary Tully <ga...@gmail.com>.
the network connector wants to be always up, and when it is down you
can configure the retry strategy, delay, backoff multiplier etc. such
that it effectively polls.
To get it to die, you can configure the inactivitymonitor to be
asymmetric; have the one end (hub) disable (maxInactivityDuration=0)
and the other end use it. In this way, one end will abort the
connection after some period of inactivity b/c there will be no reply
to its keepAlive calls.

On the spoke(client) broker do something like:
  ?transport.readCheckTime=4000&amp;transport.initialDelayTime=30000&amp;transport.ignoreRemoteWireFormat=true

So the networkBridge will die after 4seconds of inactivity and
reconnect after 30seconds. You can tweak those values.
Maybe have a dedicated transport connector for this  satellite broker,
so the others can use the usual symmetric inactivity monitor.




On 18 October 2013 11:47, gio2375 <gi...@hotmail.com> wrote:
> Hi all,
>
> for our customer we have an application using ActiveMq and all works well.
> Now our customer want to install it on a ship with a satellite connection.
> We never tried it on this type of connection and we must to be sure it'll
> works well.
>
> In our configuration we have a broker network:
> <amq:networkConnector userName="name" password="password"
> name="brokerOffice" duplex="true"  brokerName="brokerOffice"
> dispatchAsync="true" prefetchSize="1" conduitSubscriptions="true"
> decreaseNetworkConsumerPriority="false"
> uri="masterslave:(tcp://test1:61611?wireFormat.maxInactivityDuration=0,tcp://test2:61611?wireFormat.maxInactivityDuration=0)"/>
>
> The problem is that on the ship the connection is on-demand. It means that
> when a software try to connect with server on the other side of connection,
> a connection with the satellite will be established in a transparently way
> for the software. After that, the connection between client and server can
> be established. When client or server close the connection, the satellite
> connection will be stopped.
> For the contract type that our client have, he pay for each satellite
> connection. So, my question is, there is a way to configure ActiveMq to
> remain connected not always but only for a minimal time?
> Can someone suggest some way to do it?
>
> Thanks
> Giovanni
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Connection-over-FleetBroadband-satellite-tp4672977.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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