Following is an example configuration of protocol stack with FLOW_CONTROL
protocol. Note:Latest version of the file is located in the conf
directory of your Java Groups home.
<protocol-stack name="Default protocol stack" version="1.0.0">
<description>JavaGroups Default Protocol Stack</description>
<protocol>
<protocol-name>UDP Protocol</protocol-name>
<description>Sends and receives messages on UDP sockets</description>
<class-name>org.javagroups.protocols.UDP</class-name>
<protocol-params>
<protocol-param name="mcast_addr"
value="228.8.8.8"/>
<!-- protocol-param name="bind_addr"
value="192.168.10.10"/ -->
<protocol-param name="mcast_port"
value="45566"/>
<protocol-param name="ucast_send_buf_size" value="32000"/>
<protocol-param name="ucast_recv_buf_size" value="64000"/>
<protocol-param name="mcast_send_buf_size" value="32000"/>
<protocol-param name="mcast_recv_buf_size" value="64000"/>
<protocol-param name="use_packet_handler" value="false"/>
<protocol-param name="loopback"
value="true"/>
<protocol-param name="ip_ttl"
value="32"/>
</protocol-params>
</protocol>
<!--
<protocol>
<protocol-name>Auto Configuration</protocol-name>
<description>Senses the network properties and
allows other protocols to configure themselves
automatically</description>
<class-name>org.javagroups.protocols.AUTOCONF</class-name>
<protocol-params>
</protocol-params>
</protocol>
-->
<protocol>
<protocol-name>Ping Protocol</protocol-name>
<description>Find the initial membership</description>
<class-name>org.javagroups.protocols.PING</class-name>
<protocol-params>
<protocol-param name="timeout" value="2000"/>
<protocol-param name="num_initial_members" value="3"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>Merge Protocol</protocol-name>
<description>Periodically tries to detect subgroups and emits MERGE
events in
that case</description>
<class-name>org.javagroups.protocols.MERGE2</class-name>
<protocol-params>
<protocol-param name="min_interval" value="5000"/>
<protocol-param name="max_interval" value="10000"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>Failure Detection Socket</protocol-name>
<description>Failure detection based on sockets</description>
<class-name>org.javagroups.protocols.FD</class-name>
<protocol-params>
<protocol-param name="timeout" value="2000"/>
<protocol-param name="max_tries" value="3"/>
<protocol-param name="shun"
value="true"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>Verify Suspect</protocol-name>
<description>Double-checks that a suspected member is really dead</description>
<class-name>org.javagroups.protocols.VERIFY_SUSPECT</class-name>
<protocol-params>
<protocol-param name="timeout" value="1500"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>Stable protocol</protocol-name>
<description>Distributed message garbage collection protocol. Deletes
messages
seen by all group members</description>
<class-name>org.javagroups.protocols.pbcast.STABLE</class-name>
<protocol-params>
<protocol-param name="desired_avg_gossip" value="20000"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>Reliable mcast message transission</protocol-name>
<description>Uses a negative acknowledgement protocol for retransmissions</description>
<class-name>org.javagroups.protocols.pbcast.NAKACK</class-name>
<protocol-params>
<protocol-param name="gc_lag" value="50"/>
<protocol-param name="retransmit_timeout" value="600,1200,2400,4800"/>
<protocol-param name="max_xmit_size" value="8192"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>Unicast Protocol</protocol-name>
<description>Provides lossless transmission of unicast message (similar
to TCP)</description>
<class-name>org.javagroups.protocols.UNICAST</class-name>
<protocol-params>
<protocol-param name="timeout" value="1200,2400,3600"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>FlowControl Protocol</protocol-name>
<description>Provides multicast or unicast flow control</description>
<class-name>org.javagroups.protocols.FLOW_CONTROL</class-name>
<protocol-params>
<protocol-param name="window_size_cap" value="12000"/>
<protocol-param name="window_size" value="1000"/>
<protocol-param name="fwd_mrgn" value="200"/>
<protocol-param name="rttweight" value="0.125"/>
<protocol-param name="reduction" value="0.75"/>
<protocol-param name="expansion" value="1.25"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>Fragmentation Protocol</protocol-name>
<description>Divides up larger message into smaller pieces</description>
<class-name>org.javagroups.protocols.FRAG</class-name>
<protocol-params>
<protocol-param name="frag_size" value="8192"/>
<protocol-param name="down_thread" value="false"/>
<protocol-param name="up_thread" value="false"/>
</protocol-params>
</protocol>
<protocol>
<protocol-name>PB Cast Group Membership Protocol</protocol-name>
<description>Maintains the member ship view</description>
<class-name>org.javagroups.protocols.pbcast.GMS</class-name>
<protocol-params>
<protocol-param name="join_timeout" value="3000"/>
<protocol-param name="join_retry_timeout" value="2000"/>
<protocol-param name="shun" value="false"/>
<protocol-param name="print_local_addr" value="true"/>
</protocol-params>
</protocol>
</protocol-stack>