2016-10-17 18 views
0

的JGroups使用「IP多播在默認情況下將消息發送給所有成員(UDP)和初始成員的發現。但是,如果組播不能使用的,UDP可被配置爲發送,而不是一個多播消息的多個單播消息。要配置UDP使用多個單播消息來發送組消息,而不是使用IP多播的,所述ip_mcast屬性必須被設置爲假。」 (按照jboss文檔https://developer.jboss.org/如何設置JGroups的UDP單播,而不是在獨立-ha.xml默認組播

我的問題是我怎麼能通過「ip_mcast」值在野蠻假?下面是在獨立-ha.xml樣品的JGroups子系統。在xsd中,我看不到傳遞此值的方法。請幫忙!!

<subsystem xmlns="urn:jboss:domain:jgroups:4.0"> 
     <channels default="ee"> 
     <channel name="ee" stack="udpgossip"/> 
     </channels> 
     <stacks> 
     <stack name="udpgossip"> 
      <transport type="UDP" socket-binding="jgroups-tcp"/> 
      <protocol type="TCPGOSSIP"> 
      <property name="initial_hosts">172.17.0.2[12001]</property> 
     </protocol> 
      <protocol type="MERGE3"/> 
      <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/> 
      <protocol type="FD"/> 
      <protocol type="VERIFY_SUSPECT"/> 
      <protocol type="pbcast.NAKACK2"/> 
      <protocol type="UNICAST3"/> 
      <protocol type="pbcast.STABLE"/> 
      <protocol type="pbcast.GMS"/> 
      <protocol type="MFC"/> 
      <protocol type="FRAG2"/> 
     </stack> 
     </stacks> 
    </subsystem> 

回答

0

在架構,<transport/>擴展<protocol/>和協議可以有屬性,爲你的配置樣品已經具備了。因此要設置正確的方法應該是

<transport type="UDP" socket-binding="jgroups-tcp"> 
    <property name="ip_mcast">false</property> 
</transport>