exhook.conf.example 1.4 KB

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