exhook.conf.example 1.5 KB

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