JianBo He
3d7f4335a0
fix(emqx_cm): replace ?tp with ?LOG
2021-11-10 11:34:30 +08:00
Zaiming Shi
915c827fdc
fix(session): force kill session for 'kick' and 'discard'
...
Prior to this fix, 'kick' and 'discard' calls may timeout (or
fail for other reason), failures lead to only a log, then
continue to allow the new session to get registered.
As a result, in case a client is stuck, there is no way to
force it to step down, end up with multiple connections (sessions)
for the client ID in dashboard.
After this fix, the stale pids are notified to shutdown
via a gen_server:call, and forced with a exit(Pid, kill) for any
exception happend to the gen_server:call
2021-11-09 18:12:10 +08:00
JianBo He
7b177a7929
fix: more safe session call
2021-09-26 20:10:23 +08:00
JianBo He
e411b4bad3
fix(cm): fix never matching clause
2020-08-28 17:10:26 +08: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
JianBo He
3fb82f7234
Fix(connect): fix the race condition for openning session
...
- Remove the register_channel/1,2 functions
2020-06-02 17:21:06 +08:00
qingchuwudi
7ba801c8d4
Fix reload acl module and clean acl caches ( #3409 )
2020-04-26 15:45:55 +08:00
张奇怪
78144c0ca5
Update error log ( #3342 )
...
Optimize content of error log
2020-03-27 10:10:23 +08:00
JianBo He
f6b0ad8873
Ignore some discarded exceptions
2020-02-17 09:40:44 +08:00
zhouzb
7ea75f4289
Update copyright
2020-01-03 18:31:08 +08:00
Feng Lee
46ca3f2f82
Add metrics for session's lifecircle
...
- session.created
- session.resumed
- session.takeovered
- session.discarded
- session.terminated
2019-12-30 09:29:41 +08:00
Feng Lee
b7ca3905a6
Breaking Change: Add new hooks for client and session lifecircle ( #3138 )
2019-12-27 16:31:06 +08:00
zhouzb
32500685a1
Export emqx_cm:kick_session/2
2019-12-07 13:35:55 +08:00
zhouzb
5b949fda2c
Add emqx_cm:kick_session/1
2019-12-07 13:31:33 +08:00
Feng Lee
9c3273a2c6
Improve the process of handling MQTT control packets ( #3079 )
2019-12-06 19:51:06 +08:00
Feng Lee
2b1b58fc66
Add the new 'emqx_limiter' module
2019-11-01 08:10:58 +08:00
Feng Lee
20ddd498fc
Rename the 'client_id' field to 'clientid'
2019-09-24 17:06:25 +08:00
Feng Lee
98b7e3d948
Rename the type 'client()' to 'client_info()'
...
- Rename tye type 'client()' to 'client_info()'
- Rename the 'client' field of channel to 'client_info'
- Fix the function specs
2019-09-21 15:27:05 +08:00
zhouzb
db1cf4469b
Fix crash
2019-09-20 20:27:08 +08:00
tigercl
b72a82e50b
Merge pull request #2919 from emqx/fix-test-cases
...
Add 'unregister_channel/1' function and test cases
2019-09-20 19:57:47 +08:00
Feng Lee
d0a8086d73
Add 'unregister_channel/1' function and test cases
2019-09-20 19:42:59 +08:00
zhouzb
f0a1ffc3b1
Fix test case
2019-09-20 17:58:31 +08:00
Feng Lee
a313d1c722
Improve the 'open_session/3' API
2019-09-18 19:48:55 +08:00
Feng Lee
847375d2fb
Improve connection and channel modules ( #2860 )
...
Improve the connection and channel modules
2019-09-05 14:17:15 +08:00
Feng Lee
710302f377
Fix case clause error
2019-08-23 14:52:11 +08:00
Feng Lee
82b9a7c301
Improve session takeover ( #2831 )
...
Implement the session takover/resumption across nodes
2019-08-23 14:09:00 +08:00
Feng Lee
8b03371a4a
Improve the keepalive, connection, channel and session modules ( #2813 )
2019-08-22 16:38:25 +08:00
tigercl
749ef823ab
Refix code about mqtt spec ( #2806 )
...
Refix code about mqtt spec
2019-08-19 10:50:52 +08:00
Feng Lee
52b2f31ced
Merge branch 'improve-channel-design-again' into develop
2019-08-17 14:09:26 +08:00
Feng Lee
f26505d40a
Implement session takeover and resumption.
...
- Implement session takeover
- Remove `init_proc_mng_policy/1' from emqx_misc module
- Remove `conn_proc_mng_policy/1' from emqx_misc module
- Add `emqx_oom' module to monitor OOM of channel process
2019-08-17 13:37:48 +08:00
Shawn
b2ddcb26e2
Testcase logf ( #2800 )
...
* Add test cases for logger formatter
* Remove the unregister API
2019-08-16 15:11:38 +08:00
周子博
f6d6f7f04d
Fix test case
2019-08-09 19:45:43 +08:00
Feng Lee
0a6468cf48
Introduce the 'pipeline' design pattern
...
- Introduce the 'pipeline' design pattern in emqx_protocol module
- Reame the '{dispatch, ...' to '{deliver, ...' in emqx_broker module
- Rename type 'credentials' to 'client'
2019-07-31 08:09:47 +08:00
Feng Lee
5b3a61b799
Merge the connection and session tabs into channel tab
2019-07-25 09:25:45 +08:00
Feng Lee
6b84eb0595
Rewrite the channel, protocol and session modules.
2019-07-22 17:08:53 +08:00
Feng Lee
42da51e1c5
Implement batch delivery for the new channel design
...
- Implement a new emqx_channel module
- Improve the emqx_frame:serialize/2 API
- Improve the emqx_connection, emqx_ws_connection modules
2019-07-02 13:40:52 +08:00
Feng Lee
fb54fe0fad
Improve export_type attr
2019-06-25 14:45:23 +08:00
Feng Lee
3877c4db1a
Merge branch 'channel2' into channel3
2019-06-18 16:49:26 +08:00
Feng Lee
7774b85f81
Implement the channel architecture
2019-06-18 15:03:51 +08:00
terry-xiaoyu
7092748266
Improve log messages using logger header
2019-06-18 14:37:32 +08:00
Feng Lee
f801ff1e53
Optimize metrics using counters and persistent_term ( #2597 )
...
* Optimize emqx_metrics module using persistent_term and counters in OTP 22
2019-06-05 23:16:35 +08:00
Gilbert
eaa1deab20
Refactor flapping code ( #2476 )
...
* Refactor flapping code
2019-04-24 10:42:26 +08:00
周子博
0fbf771543
Readjust log level into error when got unexpected message
2019-03-27 11:07:58 +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
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
Feng Lee
e882af9369
Use the new logger macros
2019-01-10 08:53:10 +08:00
turtled
1e2c5db36c
Modify batch size
2018-12-18 15:42:54 +08:00
Feng Lee
721b72b96a
Add 'active_n' option to optimize the CPU usage of emqx_connection ( #2060 )
...
* Add 'active_n' option to optimize the CPU usage of emqx_connection
* Supports batch processing 'DOWN' events
2018-12-17 19:53:29 +08:00