A.4. The TCPGOSSIP JGroups Protocol
TCPGOSSIP
discovery protocol uses one or more configured GossipRouter processes to store information about the nodes in the cluster.
Important
The GossipRouter is included in the JGroups jar file, and must be running before any nodes are started. This process may be started by pointing to the GossipRouter
class in the JGroups jar file included with JBoss Data Grid:
java -classpath jgroups-${jgroups.version}.jar org.jgroups.stack.GossipRouter -bindaddress IP_ADDRESS -port PORT
In Library Mode the JGroups xml file should be used to configure TCPGOSSIP
; however, there is no TCPGOSSIP
configuration included by default. It is recommended to use one of the preexisting files specified in Section 30.2.2, “Pre-Configured JGroups Files” and then adjust the configuration to include TCPGOSSIP
. For instance, default-configs/default-jgroups-ec2.xml
could be selected and the S3_PING
protocol removed, and then the following block added in its place:
<TCPGOSSIP initial_hosts="IP_ADDRESS_0[PORT_0],IP_ADDRESS_1[PORT_1]" />
In Remote Client-Server Mode a stack
may be defined for TCPGOSSIP
in the jgroups
subsystem of the server's configuration file. The following configuration snippet contains an example of this:
<subsystem xmlns="urn:infinispan:server:jgroups:8.0" default-stack="${jboss.default.jgroups.stack:tcpgossip}"> [...] <stack name="jdbc_ping"> <transport type="TCP" socket-binding="jgroups-tcp"/> <protocol type="TCPGOSSIP"> <property name="initial_hosts">IP_ADDRESS_0[PORT_0],IP_ADDRESS_1[PORT_1]</property> </protocol> <protocol type="MERGE3"/> <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK2"> <property name="use_mcast_xmit">false</property> </protocol> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="MFC"/> <protocol type="FRAG2"/> </stack> [...] </subsystem>