Commit Graph

64 Commits

Author SHA1 Message Date
Shawn 753f70bab8 chore: final EMQ X -> EMQX 2023-03-09 01:58:40 +08:00
Shawn 1f4869fba3 fix: the application stop order is wrong after ekka:join/1 2023-02-07 10:26:45 +08:00
Zaiming (Stone) Shi 14ba75502f chore: update copyright year 2023-01-02 14:54:38 +01:00
Zaiming (Stone) Shi fbc06b3dc6 chore(emqx.erl): sync changes from ee 2022-11-03 12:43:22 +01:00
Zaiming (Stone) Shi edf69cee88 feat: mute emqx shutdown log in rpc calls 2022-10-10 17:57:33 +02:00
zhongwencool c2f1f1aab8 chore: rename on_xxx_hooks to on_xxx 2022-09-22 10:04:52 +08:00
zhongwencool 4635d52273 chore: add reboot_hook/shutdown_hook for enterprise 2022-09-22 10:02:00 +08:00
Thales Macedo Garitezi 977ac04d24 chore: fix dialyzer errors 2022-08-26 16:09:39 -03:00
JimMoen 6168745f90 chore: update copyright 2022-04-14 11:23:25 +08:00
Georgy Sychev 1a715c8708 feat(emqx_dashboard): subsciption to update password
emqx_dashboard restarted in ekka hook
Closes #3155
2022-04-05 10:40:09 +02:00
zhongwencool 78f294cda2 fix: sys_mem alarm is not triggered after reboot. 2022-01-25 16:12:17 +08:00
Zaiming Shi 2e6ad828a0 chore: remove copyright and license Erlang macros 2021-04-23 20:43:00 +02:00
Zaiming Shi 6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
JianBo He 16c999ed9b
Start emqx-modules application by default (#4518)
* fix(modules): start emqx_modules by default

* chore(test): eliminate some compile warnings
2021-04-12 09:45:31 +08:00
Zaiming Shi 8201e4c820 feat(emqx.erl): Add a help function to load debug secret 2021-03-19 21:46:03 +01:00
Ayodele 2b481dabe7
Fix some dialyzer warnings (#3988) 2021-01-05 20:49:50 +01:00
ayodele.akingbule b9bb88d9eb fix(emqx): fix dialyzer warnings 2021-01-04 14:14:55 +01:00
ayodele.akingbule b68a0b3730 fix(emqx_lua_hook): fix dialyzer warnings. 2020-12-25 07:42:01 +08:00
ayodele.akingbule b9b20ba268 fix(emqx.erl): Dialyzer warnings 2020-12-10 11:22:38 +01:00
Zaiming Shi d4aa5ebf55 fix(emqx): Fix dialyzer warnings 2020-12-10 09:35:35 +01:00
JianBo He e3489b9d46 refactor(style): improve all types declaration
- Add dialyzer for code analysis
- Correct all the module type declarations
- Use `-type()` to declaration a type instead of `-opaque`
  (It is advantageous to the code dialyzer)

BROKEN CHANGES:
- Add a ?DEFAULT_SUBOPTS for emqx_broker:subscribe/1,2,3
- Remove the needless internal function `emqx_vm:port_info(PortTerm, Keys)`
2020-06-18 17:38:34 +08:00
zhouzb 7ea75f4289 Update copyright 2020-01-03 18:31:08 +08:00
Feng Lee 88321fe6fe Remove the emqx_config module
- Remove the emqx_config module
- Move get_env/1, get_env/2 to emqx module
2019-09-09 10:18:10 +08:00
turtled 91a8dbda56 Fix conflicts 2019-08-09 16:41:11 +08:00
terry-xiaoyu b0e2b7db0c Support inter-node messages via RPC cast 2019-07-27 12:59:07 +08:00
Feng Lee 3877c4db1a Merge branch 'channel2' into channel3 2019-06-18 16:49:26 +08:00
terry-xiaoyu 7092748266 Improve log messages using logger header 2019-06-18 14:37:32 +08:00
Feng Lee 21162f88b8 Update copyright 2019-06-18 14:27:06 +08:00
turtled f46205daff Restart mnesia application 2019-06-05 11:50:09 +08:00
Gilbert Wong 0c64da6da7 Change default log level from info to critical when shutdown 2019-03-29 10:57:52 +08:00
周子博 58e1b4d485 Readjust log level and unify log format 2019-03-26 22:18:31 +08:00
HeeeJianBo fc2df9aff5 Adapt to new export style 2019-03-22 14:58:24 +08:00
Shawn 02fe8560e2
Improve emqx_hooks and credentials (#2309)
* Improve emqx_hooks and credentials

1. Modify the return modes of emqx hooks.

Change the return value of hook functions to:
- ok: stop the hook chain and return ok
- {error, Reason}: stop the hook chain and return error
- continue: continue the hook chain

And the return value of emqx_hooks:run/2 is changed to:
- ok
- {error, Reason}

And the return value of emqx_hooks:run/3:
- {ok, Acc}
- {error, Reason, Acc}

2. Treat password as a member of credentials.

Password should be wrapped in the `credentials` data-structure, as the
username/password pair together consists of an authentication method.
There can be some methods using some other credential data (e.g.
a JWT token), and these credential data should also be wrapped in the
the `credentials` data-structure.

An event `client.authenticate` is triggered when an user logs in:
```erlang
emqx_hooks:run('client.authenticate', [], Credentials)
```

A `default callback` that deny/allow any user (according to the
`allow_anonymous` config) should be appended to the end of the
callback chain.

The `credentails` is passed through all of the callbacks, and
can be changed over in this process.

* Refactor emqx hooks return mode

* Remove password from PState
2019-03-16 10:43:53 +08:00
spring2maz f2df92fef2 Unload emqx_alarm_handler before unloading plugins when shuting down (#2316)
emqx_alarm_handler publishes mqtt messages,
having it running while plugins are shutdown triggered some
annoying crashes
2019-03-15 17:11:24 +08:00
Feng Lee 7a645dd9cc Add 'include/types.hrl' and introduce some common types 2019-02-19 17:16:11 +08:00
turtled 31e95b56c4 Update Copyright to 2019 2019-01-29 10:43:25 +08:00
turtleDeng 00863acea3
Merge emqx30 (#2181)
* Change the reason code in will topic acl check (#2168)

* Fix bridge bug (#2160)

* Limit bridge QoS less than 1

* Improve shared sub dispatch implementation. (#2144)

* Upgrade ekka, esockd libraries

* Improve the 'try_open_session' function

* Reload config (#2180)
2019-01-25 13:01:48 +08:00
Feng Lee 2a747c9d53 Improve the subscription sharding. 2018-12-12 13:40:01 +08:00
Feng Lee bce1ddc5c4 Implement a hash-based subscription sharding 2018-12-06 18:45:07 +08:00
Feng Lee 2a75105580 Improve the Hooks's design 2018-09-06 16:27:16 +08:00
Feng Lee ea1ae70833 Fix errors found by dialyzer 2018-08-31 16:46:51 +08:00
Feng Lee 567aeb274f Define types in emqx_types, emqx_mqtt_types modules 2018-08-29 23:08:55 +08:00
Feng Lee 2dc8f9c4c5 Merge branch 'emqx30-feng' of github.com:emqtt/emqttd into emqx30-feng 2018-08-29 17:55:13 +08:00
Feng Lee e62d215792 Shutdown and reboot ranch application 2018-08-29 17:52:55 +08:00
Feng Lee 465963fec3
Merge branch 'emqx30' into emqx30-feng 2018-08-29 17:36:38 +08:00
Feng Lee 594819b752 Upgrade the publish sequence of QoS1/2 messages 2018-08-29 02:53:22 +08:00
Gilbert Wong 224aaaf8a7 unsubscribe function should have two params 2018-08-27 17:11:54 +08:00
Gilbert Wong 087bfe80c8 fix unsubscribe emqx_mock_client error 2018-08-27 15:24:40 +08:00
Gilbert Wong 28e22825ba fix emqx subscriptions error 2018-08-27 12:35:36 +08:00
Gilbert Wong ee11627828 delete duplicated subscribe function 2018-08-25 18:36:17 +08:00