2016-10-17 19 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>