【问题标题】:How to Set Jgroups UDP to unicast instead of default multicast in standalone-ha.xml如何在standalone-ha.xml 中将 Jgroups UDP 设置为单播而不是默认多播
【发布时间】:2017-02-26 11:22:44
【问题描述】:

Jgroups 默认使用“IP 多播向所有成员 (UDP) 发送消息并用于发现初始成员。但是,如果无法使用多播,则可以将 UDP 配置为发送多个单播消息而不是一个多播消息. 要将 UDP 配置为使用多个单播消息发送组消息而不是使用 IP 多播,必须将 ip_mcast 属性设置为 false。” (根据 jboss 文档 https://developer.jboss.org/

我的问题是如何在 Wildfly 中将“ip_mcast”值传递给 false?下面是standalone-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>

【问题讨论】:

    标签: udp jboss7.x wildfly jgroups unicast


    【解决方案1】:

    在架构中,&lt;transport/&gt; 扩展了 &lt;protocol/&gt;,并且协议可以具有属性,正如您的配置示例已经显示的那样。所以正确的设置方式应该是

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

    【讨论】:

      猜你喜欢
      • 2023-03-25
      • 2019-04-29
      • 2012-07-09
      • 2020-09-05
      • 1970-01-01
      • 2010-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多