Gossip & SWIM starter for Spring Boot App withe ScaleCube Cluster support.
- Edit application pom.xml and add following dependency:
<dependency>
<groupId>org.mvnsearch.boot</groupId>
<artifactId>gossip-spring-boot-starter</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
- Open application.properties and add gossip.seeds configuration.
gossip.seeds=seed_1_ip:7946,seed_2_ip:7946
- /actuator/gossip: display Gossip Cluster info
- /actuator/gossip/shutdown: leave from cluster
- /actuator/gossip/event: gossip an event to cluster.
POST http://localhost:8080/actuator/gossip/event
Content-Type: application/vnd.spring-boot.actuator.v2+json
{
"type": "com.foobar.user.LoginEvent",
"source": "source-1",
"datacontenttype": "text/plain",
"data": "uid:1234"
}