Hi Andrea

1/ if address1 == address2 == localhost, you need to use a different port number for the ActiveMQ broker. For example, the first node on 61616 and the second one on 616167.
2/ The ActiveMQ transportConnectors should match the networkConnectors.
If you define a transportConnectors like this:
<amq:transportConnector uri="tcp://localhost:616161" discoveryUri="multicast://default"/>
you should have a networkConnectors like this:
<amq:networkConnector uri="multicast://default"/>
The networkConnector is responsible of the ActiveMQ brokers plug.
3/ If you use localhost as address, you can't use multicast as it's not supported by the lo interface. In that case, you need to use static ActiveMQ broker declaration like this:
<amq:transportConnectors>
        <amq:transportConnector uri="tcp://localhost:61616"/>
</amq:transportConnectors>
<amq:networkConnectors>
<amq:networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:616167)"/>
</amq:networkConnectors>

Regards
JB

andrealibero.valori wrote:
Hi, I'm a student working on a project based on Servicemix.
The project need to run two Servicemix 3.3.1 instances in two separate hosts
in the same network, one with poller endpoints, the other with writer
endpoints, and possibly use transparent routing between the SMX instances.
I tried following instructions from mailing lists and the SMX website with
no success.

In particular:
- name the two JBI container with different names in servicemix.xml
- set the JBI container flowName to "jms"
- name the two ActiveMQ brokers with different names in actimemq.xml
- set the AMQ connectors to:
SMX instance 1
<amq:transportConnector uri="tcp://[address1]:61616"
discoveryUri="multicast://default"/>
SMX instance 2
<amq:transportConnector uri="tcp://[address2]:61616"
discoveryUri="multicast://default"/>

when [address1] = [address2] = localhost one of the SMX instances writes
repeatedly
WARN - DiscoveryNetworkConnector could not start NetworkBridge...
java.net.UnknownHostException: PC1

when [address1] = [address2] = 0.0.0.0 no instance write anything on screen,
but they don't see each other, and there is no "NetworkBridge" in jConsole
under "org.apache.activemq/localhost"

when [address1] = 192.168.0.2 and [address2] = 192.168.0.5 one of the
instances writes repeatedly
WARN - DiscoveryNetworkConnector could not start NetworkBridge... java.net.ConnectException: Connection timed out


Can someone help me? Thanks in advance


Reply via email to