Configure JGroups Transport Protocols
Optionally the configuration for the JGroups transport protocols and channel name can be defined and applied to master and slave nodes. There are several ways to configure the JGroups transport details. You can either set the hibernate.search.worker.backend.jgroups.configurationFile property and specify a file containing the JGroups configuration or you can use the property hibernate.search.worker.backend.jgroups.configurationXml or hibernate.search.worker.backend.jgroups.configurationString to directly embed either the xml or string JGroups configuration into your Hibernate configuration file. All three options are shown in Example 3.11, “JGroups transport protocol configuration”. Tip If no property is explicitly specified it is assumed that the JGroups default configuration file flush-udp.xml is used. Example 3.11. JGroups transport protocol configuration ## JGroups configuration options # OPTION 1 - udp.xml file needs to be located in the classpath hibernate.search.worker.backend.jgroups.configurationFile = udp.xml # OPTION 2 - protocol stack configuration provided in XML format hibernate.search.worker.backend.jgroups.configurationXml = # OPTION 3 - protocol stack configuration provided in "old style" jgroups format hibernate.search.worker.backend.jgroups.configurationString = UDP(mcast_addr=228.1.2.3;mcast_port=45566;ip_ttl=32):PING(timeout=3000; num_initial_members=6):FD(timeout=5000):VERIFY_SUSPECT(timeout=1500): pbcast.NAKACK(gc_lag=10;retransmit_timeout=3000):UNICAST(timeout=5000): FRAG:pbcast.GMS(join_timeout=3000;shun=false;print_local_addr=true) In this JGroups master/slave configuration nodes communicate over a JGroups channel. The default channel name is HSearchCluster which can be configured as seen in Example 3.12, “JGroups channel name configuration”. Example 3.12. JGroups channel name configuration hibernate.search.worker.backend.jgroups.clusterName = Hibernate-Search-Cluster