emqx_hooks.hrl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. %%--------------------------------------------------------------------
  2. %% Copyright (c) 2021-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
  3. %%
  4. %% Licensed under the Apache License, Version 2.0 (the "License");
  5. %% you may not use this file except in compliance with the License.
  6. %% You may obtain a copy of the License at
  7. %%
  8. %% http://www.apache.org/licenses/LICENSE-2.0
  9. %%
  10. %% Unless required by applicable law or agreed to in writing, software
  11. %% distributed under the License is distributed on an "AS IS" BASIS,
  12. %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. %% See the License for the specific language governing permissions and
  14. %% limitations under the License.
  15. %%--------------------------------------------------------------------
  16. %% Definitions for Hook Priorities
  17. %% Highest Priority = 1000, don't change this value as the plugins may depend on it.
  18. -define(HP_HIGHEST, 1000).
  19. %% hooks used by the emqx core app
  20. -define(HP_PSK, 990).
  21. -define(HP_REWRITE, 980).
  22. -define(HP_AUTHN, 970).
  23. -define(HP_AUTHZ, 960).
  24. -define(HP_SYS_MSGS, 950).
  25. -define(HP_MSG_VALIDATION, 945).
  26. -define(HP_TOPIC_METRICS, 940).
  27. -define(HP_RETAINER, 930).
  28. -define(HP_AUTO_SUB, 920).
  29. -define(HP_RULE_ENGINE, 900).
  30. %% apps that can work with the republish action
  31. -define(HP_SLOW_SUB, 880).
  32. -define(HP_BRIDGE, 870).
  33. -define(HP_DELAY_PUB, 860).
  34. %% apps that can stop the hooks chain from continuing
  35. -define(HP_NODE_REBALANCE, 110).
  36. -define(HP_EXHOOK, 100).
  37. %% == Lowest Priority = 0, don't change this value as the plugins may depend on it.
  38. -define(HP_LOWEST, 0).