Commit Graph

643 Commits

Author SHA1 Message Date
JimMoen c5c3f78c5a test(frame): variable_byte_integer and proxy_protocol disabled 2022-03-10 17:16:30 +08:00
JimMoen 3505e286ba test(frame): malformed utf-8 packet 2022-03-10 14:01:29 +08:00
zhongwencool 8bb9ad7206 fix: sys_mem alarm is not triggered after reboot. 2022-01-26 15:03:00 +08:00
JimMoen e57c30a0b9 fix(conf): change `max_topic_levels` default configuration 2021-11-25 20:39:12 +08:00
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 b9527cfe9d test: increase waiting time to avoid test failure 2021-09-26 20:10:23 +08:00
JianBo He 7b177a7929 fix: more safe session call 2021-09-26 20:10:23 +08:00
William Yang 806cd33d1f chore(ct): fix a testcase timing. 2021-04-28 17:01:54 +02:00
Shawn 238eaa8e40 fix(emqx): validate mqtt malformed variable byte integer 2021-03-10 19:42:44 +08:00
emqx-ci-robot 6c1129dc6a
Auto-pull-request-on-2021-01-29 (#4114)
* fix(share sub): fix the issue that the number of subscriptions dropped to 0 during the picking subscriber and caused a crash

* Connection Busy Alarms (#3992)

feat(emqx_connection): improve port_busy alarm

* fix(emqx_connection): tune the congestion alarm params

* chore(deps): upgrade esockd to 5.7.5
* fix(appup): correct the appup file
2021-01-30 10:30:18 +08:00
Turtle f8369f5280 test: comment the will message cases 2020-12-04 22:33:29 +08:00
JianBo He ca0f6b69a4 chore: supply the code_change logic 2020-12-04 22:33:29 +08:00
JianBo He 80c503fd64 refactor(conn): not saving anonymous func 2020-12-04 22:33:29 +08:00
Shawn cc69225b6d feature(tcp): alarm when tcp connection congested (#3818) 2020-11-10 23:36:11 +08:00
JianBo He 139306b61c fix(json): fix decoding/encoding empty object error 2020-11-10 23:36:11 +08:00
JianBo He b883e238bf fix(ws): take ws_cookie to clientinfo
see: https://github.com/emqx/emqx/issues/3747#issuecomment-702268570
2020-11-10 23:36:11 +08:00
turtled eb4b9936dc fix(modules): fix conflicts 2020-10-11 11:12:39 +08:00
turtleDeng edcbdcce87 improve: module_acl_internal load/unload api (#3706) 2020-09-05 17:23:22 +08:00
JianBo He 90b33b044d feature(ratelimit): support to set ratelimit & quota policy 2020-09-05 17:23:22 +08:00
terry-xiaoyu 9985e2675c fix(logger): resolve issues when starting and stopping log handlers 2020-08-28 17:10:26 +08:00
zhouzb e232032ec0 fix(mqtt-piggyback): fix test case 2020-08-22 15:27:11 +08:00
Rory Z f47e10e08a feature(emqx_mod_rewrite): separate rewrite rules for pub and sub (#3676) 2020-08-22 15:27:11 +08:00
zhouzb dbeabf3de0 refactor(telemetry): remove telemetry code from emqx core 2020-08-22 15:27:11 +08:00
tigercl e37a70509b feature(telemetry): support for collecting telemetry data and disable it by default (#3653) 2020-08-14 16:58:08 +08:00
JianBo He 98faa698f3 feature(quota): add quota confs to limit the number of message forwards 2020-08-14 16:58:08 +08:00
zhouzb aaf29ee164 fix(alarm): fix the issue that memory watermark were not set correctly 2020-07-31 18:07:20 +08:00
zhouzb 1ba4743213 refactor(alarm): new data structure and support regular cleaning of deactivated alarms 2020-07-31 18:07:20 +08:00
zhouzb 43b49edd28 feature(alarm): new design for alarm 2020-07-31 18:07:20 +08:00
zhanghongtong 0817761aee fix(emqx_channel): EMQ X replaces MQTT properties when node connects using "topic-alias-maximum" property 2020-07-31 18:07:20 +08:00
JianBo He 1c316cb5f0 fix(test): fix badmatch error 2020-07-31 18:07:20 +08:00
JianBo He 83a2af812f feat(ratelimit): refactor ratelimit 2020-07-31 18:07:20 +08:00
Rory Z 492d224728
Auto-pull-request-on-2020-07-17 (#3600)
* refactor(channel): skip the ACL checking for inner subscribe
* fix(props): fix the prop_emqx_sys results of judgment
* Update esockd to 5.7.1
* test(topic-metrics): add test cases for topic metrics
* perf(emqx_vm): make emqx_vm:get_memory/0 more efficiency
2020-07-17 18:25:46 +08:00
JianBo He 600b1055f3 fix(json): convert a proplists to ejson instead of map 2020-06-20 15:42:07 +08:00
tigercl 1b6a586948
feature(mqtt): support response information (#3533) 2020-06-20 15:07:37 +08:00
zhanghongtong 8707afa54c fix(enhanced_auth): fix bug when "conn_props = undefined" 2020-06-20 14:29:20 +08:00
JianBo He 9a8859a44c refactor(topic): move triples/1 func into emqx_trie module 2020-06-18 17:38:34 +08:00
JianBo He 1700a7a98a refactor(test): put all property cases to test/props directory 2020-06-18 17:38:34 +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
terry-xiaoyu 6ad65d587e feature(properties): add properties in message header
1. Add MQTT5.0 properties when invoking the hooks.

- Add a new key `properties` into the message header:

  We used to put all of the properties into the `#message.headers`:

  ```erlang
  #message{headers = #{'User-Property' => {<<"reason">>,<<"normal">>},
                       'Message-Expiry-Interval' => 60,
                       allow_publish => true}
  ```

  I put them instead under a single key:

  ```erlang
  #message{headers = #{properties =>
                        #{'User-Property' => {<<"reason">>,<<"normal">>},
                          'Message-Expiry-Interval' => 60},
                       allow_publish => true}
  ```

  Note that the column `properties` may contain all the properties for
  Publish and Will messages.

- Add `disconn_props` into the `Channel.conninfo`

- Add `puback_props` also into the message header:

  ```erlang
  #message{headers = #{puback_props =>
                        #{'User-Property' => {<<"reason">>,<<"normal">>}},
                       allow_publish => true}
  ```

2. Change the data type of `#message.headers` and `#message.flags` to map.

   It used to support `undefined`.
2020-06-17 18:46:26 +08:00
JianBo He ea2a424ce2
Add ensure/2 funcs to avoid needless logs (#3483) 2020-06-04 10:46:53 +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
zhouzb 83b1f3e6c8 Fix unexpected packet before connected 2020-05-22 18:18:52 +08:00
tigercl 7a0ad0f8af
Update certs (#3447)
* Update certs

* Update certs

* Fix test cases fail

Co-authored-by: turtleDeng <deng@emqx.io>
2020-05-12 10:37:26 +08:00
qingchuwudi 7ba801c8d4
Fix reload acl module and clean acl caches (#3409) 2020-04-26 15:45:55 +08:00
zhouzb 7cf97acddd Delete expiried client 2020-04-26 15:38:29 +08:00
zhouzb d5f405259d Fix test case 2020-04-17 20:46:57 +08:00
zhanghongtong dccf3560f0 Add hook to auth packet 2020-04-16 16:07:01 +08:00
张奇怪 9ba938b9d9
EMQX failed to start when the listening port was occupied (#3354) 2020-04-11 10:18:35 +08:00
turtleDeng d49f4118fe
Mgmt emqx modules (#3376) 2020-04-10 19:55:21 +08:00