rpc-with-ssl.conf.example 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. ##--------------------------------------------------------------------
  2. ## RPC With SSL
  3. ## See rpc-with-tcp.conf.example for RPC with TCP
  4. ## EMQX inter-broker communication
  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. ## Note: Most of the time the default config should work
  9. ## you do not need to modify it unless you know what it is for
  10. rpc {
  11. ## Communication mode
  12. ## Type: async | sync
  13. mode = async
  14. ## Transport protocol used for inter-broker communication
  15. ## Type: tcp | ssl
  16. protocol = ssl
  17. ## The maximum number of batch messages sent in asynchronous mode
  18. ## Type: Integer
  19. async_batch_size = 256
  20. ## Port discovery strategy
  21. ## Type:
  22. ## - manual :: discover ports by tcp_server_port
  23. ## - stateless :: discover ports in a stateless manner, using the following algorithm:
  24. ## If node name is emqxN@127.0.0.1, where the N is an integer, then the listening port will be 5370 + N
  25. port_discovery = stateless
  26. ## Listening port used by RPC local service
  27. ssl_server_port = 5369
  28. ## Set the maximum number of RPC communication channels initiated by this node to each remote node
  29. ## Type: Range from 1 to 256
  30. tcp_client_num = 10
  31. ## Timeout for establishing an RPC connection
  32. connect_timeout = 5s
  33. ## Path to TLS certificate file used to validate identity of the cluster nodes
  34. certfile = "data/cert.pem"
  35. ## Path to the private key file
  36. keyfile = "data/key.pem"
  37. ## Path to certification authority TLS certificate file
  38. cacertfile = "data/cacert.pem"
  39. ## Timeout for sending the RPC request
  40. send_timeout = 5s
  41. ## Timeout for the remote node authentication
  42. authentication_timeout = 5s
  43. ## Timeout for the reply to a synchronous RPC
  44. call_receive_timeout = 15s
  45. ## How long the connections between the brokers should remain open after the last message is sent
  46. socket_keepalive_idle = 15m
  47. ## The interval between keepalive messages
  48. socket_keepalive_interval = 75s
  49. ## How many times the keepalive probe message can fail to receive a reply until the RPC connection is considered lost
  50. socket_keepalive_count = 9
  51. ## TCP sending buffer size
  52. socket_sndbuf = 1MB
  53. ## TCP receiving buffer size
  54. socket_recbuf = 1MB
  55. ## Socket buffer size in user mode
  56. socket_buffer = 1MB
  57. }