Hi Gert,

thanks for the prompt answer!

>I guess you're not really experiencing problems with this, you're just
>wondering about why things happen, right?

Yes, exactly. In CXF, I got the answer I expected, but I am really more 
interested in the traffic flow, which just looked weird to me. And since that 
might just as well have been due to my inability to configure ServiceMix, I 
thought I'd better ask and make sure.

>You currently have two ServiceMix containers running, each with an
>embedded ActiveMQ broker.  When you configure the ActiveMQ instances
>to connect to each other, every instance becomes a 'client' of the
>other instance.  E.g. the nataku:35486 - kakyou:61616 connection is
>where nataku connected to the ActiveMQ broker on kakyou.  The source
>port will be automatically assigned, but it's the target port (61616)
>that really tells you what kind of connection you're looking at.

>Now, the exchange we're looking at is a JBI InOut that is sent between
>nataku and kakyou.  If you look at the diagram under Invocation
>Example on [1], you'll notice that this involves:
>- sending an Active exchange (with only the in message) from the
>consumer to the provider
>- sending an Active exchange (with both the in and out message) from
>the provider back to the consumer
>- sending a Done exchange from the consumer to the provider to finish
>the exchange

>So, in order to send the first Active exchange from nataku to kakyou,
>you'll see the connection from nataku to kakyou being used.  Sending
>the second Active exchange goes the other way around, so it uses the
>client connection from kakyou to nataku, etc...

>Does this make any more sense now?

I don't get why it is necessary to repeat the messages, but apart from that, 
yes. Thank you very much!

Regards,
Anne

>Gert Vanthienen
>------------------------
>Open Source SOA: http://fusesource.com
>Blog: http://gertvanthienen.blogspot.com/


>[1] http://servicemix.apache.org/5-jbi.html#5.JBI-Invocationexample
---------------------------------------------------------------------------
2009/4/7 Diefenbach Anne <[email protected]>:
> Hello,
>
> I have a question regarding the traffic flow between two clustered SMX 
> instances. I have the following setup:
>
>       kakyou ------------------- nataku ---------------- kanoe
> SMX with CXF SE    SMX with CXF BC    CXF consumer
>
> I have monitored the traffic between Kakyou and Nataku with tcpdump, and I 
> found the results rather surprising, which is why I want to make sure it is 
> the expected behaviour, and if not, get some tips as to what I did wrong.
>
> First surprise was that there are two TCP connections between the SMX 
> instances: one which goes from kakyou:35518 to nataku:61617 and one from 
> nataku:35486 to kakyou:61616. I would have expected one connection from 
> nataku:61617 to kakyou:61616. Second surprise was that messages from 
> operations following a request-response pattern are transmitted over both 
> connections: It seems that with every message, the one received before is 
> "quoted", so to speak. To be precise, for a request from Kanoe the following 
> happens:
> 1) The CXF request is transmitted from Kanoe to Nataku.
> 2) The normalized request is transmitted over the nataku:35486 - kakyou:61616 
> connection.
> 3) Request and response are transmitted over the kakyou:35518 - nataku:61617 
> connection.
> 4) Request and response are transmitted over the nataku:35486 - kakyou:61616 
> connection.
> 5) CXF response is transmitted from Nataku to Kanoe.
>
> Is this what is supposed to be happening? (I wouldn't be surprised if it 
> wasn't; I was trying to find out what I was actually configuring, but all the 
> relevant entries over at the ActiveMQ site were marked TODO.)
>
> Kakyou's ActiveMQ configuration is the following:
>
> -----------------------------------------------------------------
> <beans xmlns:amq="http://activemq.org/config/1.0";>
>
>  <amq:broker id="broker" depends-on="jmxServer" useShutdownHook="false">
>
>    <amq:managementContext>
>      <bean class="org.apache.activemq.broker.jmx.ManagementContext">
>        <property name="createConnector" value="false" />
>      </bean>
>    </amq:managementContext>
>
>    <amq:persistenceAdapter>
>      <amq:journaledJDBC journalLogFiles="5" 
> dataDirectory="/opt/iona/fuse-esb-3.3.1.9/data/amq"/>
>    </amq:persistenceAdapter>
>
>    <amq:transportConnectors>
>       <amq:transportConnector uri="tcp://localhost:61616"/>
>    </amq:transportConnectors>
>
>    <amq:networkConnectors>
>            <amq:networkConnector uri="static://(tcp://nataku:61617)" />
>    </amq:networkConnectors>
>
>  </amq:broker>
> </beans>
> -----------------------------------------------------------------
>
> Nataku's is:
>
> -----------------------------------------------------------------
> <beans xmlns:amq="http://activemq.org/config/1.0";>
>
>  <amq:broker id="broker" depends-on="jmxServer" useShutdownHook="false">
>
>    <amq:managementContext>
>      <bean class="org.apache.activemq.broker.jmx.ManagementContext">
>        <property name="createConnector" value="false" />
>      </bean>
>    </amq:managementContext>
>
>    <amq:persistenceAdapter>
>      <amq:journaledJDBC journalLogFiles="5" 
> dataDirectory="/opt/iona/fuse-esb-3.3.1.9/data/amq"/>
>    </amq:persistenceAdapter>
>
>    <amq:transportConnectors>
>       <amq:transportConnector uri="tcp://localhost:61617"/>
>    </amq:transportConnectors>
>
>    <amq:networkConnectors>
>        <amq:networkConnector uri="static://(tcp://kakyou:61616)" />
>    </amq:networkConnectors>
>
>  </amq:broker></beans>
> -----------------------------------------------------------------
>
> I would appreciate your input.
>
> Regards,
>
> Anne Diefenbach
> - FKIE-KOM -
> *************************************************
> Forschungsgesellschaft für
> Angewandte Naturwissenschaften e. V. (FGAN)
> E-Mail:  [email protected]
> Web:    www.fgan.de
> ************************************************
>
>

Reply via email to