cluster-with-static.conf.example 907 B

123456789101112131415161718192021222324
  1. ##--------------------------------------------------------------------
  2. ## Cluster in service discovery via static nodes mode
  3. ##
  4. ## Configs to instruct how individual nodes can discover each other
  5. ##--------------------------------------------------------------------
  6. ## Note: This is an example of how to configure this feature
  7. ## you should copy and paste the below data into the emqx.conf for working
  8. cluster {
  9. ## Human-friendly name of the EMQX cluster.
  10. name = emqxcl
  11. ## Service discovery method for the cluster nodes
  12. discovery_strategy = static
  13. ## List of core nodes that the replicant will connect to
  14. core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
  15. ## If true, the node will try to heal network partitions automatically
  16. autoheal = true
  17. ## List EMQX node names in the static cluster
  18. static.seeds = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
  19. }