Hi, all
we use akka 2.5 version and setting cluster.
under is config example
akka {
#loglevel = "DEBUG"
extensions = ["com.romix.akka.serialization.kryo.KryoSerializationExtension$","akka.cluster.client.ClusterClientReceptionist"]
actor {
provider = "cluster"
default-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 8
parallelism-factor = 0.5
parallelism-max = 32
}
# Throughput defines the number of messages that are processed in a batch before the thread is returned to the pool.
throughput = 20
# Throughput deadline for Dispatcher, set to 0 or negative for no deadline
throughput-deadline-time = 500ms
}
kryo {
type = "graph"
idstrategy = "default"
serializer-pool-size = 16
buffer-size = 4096
max-buffer-size = -1
use-manifests = true
post-serialization-transformations = "off"
implicit-registration-logging = false
kryo-trace = false
}
serializers {
java = "akka.serialization.JavaSerializer"
kryo = "com.romix.akka.serialization.kryo.KryoSerializer"
}
serialization-bindings {
"java.io.Serializable" = none
"com.gamevilcom2us.hive.notification.push.data.domain.processing.Letter" = kryo
"com.gamevilcom2us.hive.notification.push.data.domain.processing.Mail" = kryo
}
}
remote {
use-dispatcher = akka.actor.cluster-dispatcher
use-passive-connections = off
log-remote-lifecycle-events = off
maximum-payload-bytes = 4194304 bytes
netty {
tcp {
hostname = "localhost"
port = {portNumber}
maximum-frame-size = 4194304b
}
# (I&O) Used to configure the number of I/O worker threads on server sockets
server-socket-worker-pool {
pool-size-min = 8
pool-size-factor = 1.0
pool-size-max = 256
}
# (I&O) Used to configure the number of I/O worker threads on client sockets
client-socket-worker-pool {
pool-size-min = 8
pool-size-factor = 1.0
pool-size-max = 256
}
}
watch-failure-detector {
threshold = 12
heartbeat-interval = 15s
acceptable-heartbeat-pause = 3s
}
transport-failure-detector {
heartbeat-interval = 15s
acceptable-heartbeat-pause = 30s
}
}
coordinated-shutdown.terminate-actor-system = on
cluster {
use-dispatcher = akka.actor.cluster-dispatcher
seed-nodes = [
"akka.tcp://test-service@localhost:2551",
"akka.tcp://test-service@localhost:2552",
"akka.tcp://test-service@localhost:2553",
"akka.tcp://test-service@localhost:2554",
"akka.tcp://test-service@localhost:2555",
"akka.tcp://tset-service@localhost:2556"
]
pub-sub {
routing-logic = round-robin
gossip-interval = 15s
}
shutdown-after-unsuccessful-join-seed-nodes = 45s
#shutdown-after-unsuccessful-join-seed-nodes = off
#run-coordinated-shutdown-when-down = off
receptionist {
name = receptionist
use-dispatcher = akka.actor.cluster-dispatcher
response-tunnel-receive-timeout = 60s
heartbeat-interval = 15s
acceptable-heartbeat-pause = 3s
failure-detection-interval = 5s
}
client {
initial-contacts = [
"akka.tcp://test-service@localhost:2551/system/receptionist",
"akka.tcp://test-service@localhost:2552/system/receptionist",
"akka.tcp://test-service@localhost:2553/system/receptionist",
"akka.tcp://test-service@localhost:2554/system/receptionist",
"akka.tcp://test-service@localhost:2555/system/receptionist",
"akka.tcp://test-service@localhost:2556/system/receptionist"
]
establishing-get-contacts-interval = 7s
heartbeat-interval = 15s
acceptable-heartbeat-pause = 9s
}
}
# Akka Streams Kafka Configuration
kafka {
# Kafka Consumer
consumer {
server-list = "localhost:9092"
poll-interval = 250ms
poll-timeout = 5s
stop-timeout = 30s
close-timeout = 20s
commit-timeout = 30s
commit-time-warning = 5s
wait-close-partition = 5s
wakeup-debug = true
kafka-clients {
enable.auto.commit = true
}
# Consumers
test {
group-id = "test-service-group"
client-id = "test-daemon-reload-consumer"
auto-offset-reset = "earliest"
topic = "test-daemon-reload"
parallelism = 1
}
}
# Kafka Producer
producer {
server-list = "localhost:9092"
json {
client-id = "test-json-producer"
acks = "0"
}
}
}
}
In our case If one node jvm was down, then all cluster node jvm was exit.
we want to if some node jvm was down then cluster member remove and cluster well working.
why all cluster node was shutdown??
plase help me. Thank you.