exhook.conf.example 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ##--------------------------------------------------------------------
  2. ## gRPC Hook Extension
  3. ##
  4. ## Allows users to process EMQX Hooks using other programming languages
  5. ##--------------------------------------------------------------------
  6. exhook.servers = [
  7. {
  8. ## Name of the exhook server
  9. name = "server_1"
  10. ## Feature switch
  11. enable = false
  12. ## URL of gRPC server
  13. url = "http://127.0.0.1:9090"
  14. ## The timeout of request gRPC server
  15. request_timeout = 5s
  16. ## This value will be returned when the request to the gRPC server fails for any reason
  17. ## Type:
  18. ## - deny :: stop to execute this hook.
  19. ## - ignore :: continue to execute this hook
  20. failed_action = deny
  21. ## Interval of automatically reconnecting the gRPC server when the connection is broken
  22. ## Type:
  23. ## - false :: Never reconnect
  24. ## - Time Duration, e.g.15s, 10m, 1h :: Reconnecting Interval
  25. auto_reconnect = 60s
  26. ## The process pool size for gRPC client
  27. pool_size = 8
  28. ## Connection socket options
  29. socket_options {
  30. ## Whether periodic transmission on a connected socket when no other data is exchanged
  31. keepalive = true
  32. ## TCP_NODELAY switch
  33. nodelay = true
  34. ## The minimum size of receive buffer to use for the socket
  35. recbuf = "64KB"
  36. ## The minimum size of send buffer to use for the socket
  37. sndbuf = "16KB"
  38. }
  39. },
  40. {name = "server_2", url = "http://127.0.0.1:9091"}
  41. ]