Commit Graph

339 Commits

Author SHA1 Message Date
JianBo He 918e2fc58f chore: bump version 4.4.4-rc.3 2022-05-27 18:14:01 +08:00
Zaiming (Stone) Shi 0402903d71 chore: update to version 4.3.15-rc.3 2022-05-26 23:49:52 +02:00
JianBo He 4b36d9b08b chore: bump version to 4.4.4-rc.2 2022-05-26 13:57:04 +08:00
JianBo He c9f45a692a chore: bump to 4.3.15-rc.2 2022-05-26 09:40:27 +08:00
Xinyu Liu 211fee3035
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-05-23 23:19:19 +08:00
Shawn 41331c5c1a chore: release 4.3.15-rc.1 2022-05-23 22:26:20 +08:00
Zaiming (Stone) Shi 4330edd674 fix(appup): bump to 4.4.4-beta.1
also fix emqx appup instructions
2022-04-23 11:50:07 +02:00
Xinyu Liu ca43fb73c5
Merge branch 'main-v4.4' into copy-of_main-v4.3 2022-04-18 12:02:11 +08:00
JianBo He c0f6c08836 chore: tag 4.3.14 2022-04-18 11:55:46 +08:00
JianBo He 89c65b6535 Merge tag 'v4.3.14-rc.4' into merge-main-v4.3-into-v4.4 2022-04-16 11:28:07 +08:00
JianBo He e986a2cf35 chore: bump vsn 2022-04-16 10:49:32 +08:00
JianBo He 5907424a83
Merge pull request #7470 from JimMoen/update-copyright-year
Update copyright years
2022-04-15 14:40:43 +08:00
JianBo He c8c52dfc39 Merge remote-tracking branch 'ce/main-v4.3' into merge-main-v4.3-into-v4.4 2022-04-14 11:56:35 +08:00
JianBo He d40a146139 chore: bump vsn 2022-04-14 11:54:05 +08:00
JimMoen 6168745f90 chore: update copyright 2022-04-14 11:23:25 +08:00
JianBo He 3f9f53a1e0 chore: bump vsn 2022-04-12 13:48:43 +08:00
JianBo He e9ed65de06 chore: bump vsn to 4.3.14-rc.2 2022-04-12 09:39:41 +08:00
JianBo He 6b636d0786 chore: bump vsn to 4.4.3-rc.1 2022-04-09 01:17:38 +08:00
Shawn 4c34df4f06 chore: release 4.3.14-rc.1 2022-04-08 18:18:19 +08:00
Shawn 4a57c10f61 chore: release 4.3.13 2022-04-02 11:41:00 +08:00
zhouzb 3610f931cf chore: bump release vsn 2022-04-02 10:29:32 +08:00
Shawn 3bbc7bf31f chore: release 4.4.2 2022-04-01 18:05:39 +08:00
Shawn 1d2aa1c8c1 chore: release 4.3.13 2022-04-01 17:55:43 +08:00
JianBo He 134d00e76b Merge tag 'v4.3.13-rc.4' into merge-main-v4.3-into-v4.4
Version v4.3.13-rc.4
2022-04-01 10:37:58 +08:00
Shawn ec0d43bcf7 chore: release 4.3.13-rc.4 2022-04-01 10:01:48 +08:00
JianBo He 5fa30b2d51 chore: bump vsn to 4.4.2-rc.2 2022-03-31 21:55:57 +08:00
Shawn c037c2cf6c chore: release 4.3.13-rc.3 2022-03-31 17:54:20 +08:00
JianBo He 65e11bcb01 chore: bump vsn for 4.4.2-rc.1 2022-03-24 14:26:52 +08:00
JianBo He 61d3ed31e8 chore: bump vsn to 4.3.13-rc.2 2022-03-24 14:23:19 +08:00
Zaiming (Stone) Shi 02aa665e54 chore: bump version to prepare the next release 2022-03-01 11:41:52 +01:00
Zaiming (Stone) Shi e13f2101f2 chore: prepare for v4.4.1 release 2022-02-21 11:34:23 +01:00
Zaiming (Stone) Shi 14575fed63 chore: prepare for release v4.4.1-rc.1 2022-02-21 08:13:53 +01:00
JianBo He 82285980a7 chore: bump version 2022-02-18 19:14:30 +08:00
Zaiming (Stone) Shi 0a66d40e39 chore: prepare for 4.4.0-rc.2 release 2022-02-17 11:21:22 +01:00
Shawn b09a38d53f chore: update release to 4.3.12 2022-02-10 18:30:22 +08:00
zhouzb e768c601ab chore(release): update emqx release version 2021-12-21 17:05:22 +08:00
zhouzb dc9631514d chore: ensure version bump for dashboard app 2021-12-17 20:28:54 +08:00
zhanghongtong daeac6edf4 chore(release): update emqx release version 2021-11-18 15:26:36 +08:00
Zaiming Shi 2a55a712d1 build: prepare for 4.4-alpha.1 release 2021-11-17 13:58:09 +01:00
Zaiming Shi d05e2ff0b1 Merge remote-tracking branch 'origin/main-v4.3' into main-v4.4-alpha.1 2021-11-15 13:41:51 +01:00
zhouzb 04a4462f1e chore(release): update version to 4.3.10 2021-11-12 10:36:27 +08:00
zhongwencool 835ad52498
feat(trace): http api for trace (#6052)
* feat(trace): add http trace API

* feat: sub/unsub trace topic

* chore(trace): stream log use _page and _limit

* fix: elvis warning

* fix: mod_trace test failed

* fix: http api meta rename _page/_limit to _page/_limit

* fix: clientid string not working

* fix: add emqx_mod_trace to module

* fix(trace): fixed by review suggestions
2021-11-11 14:54:40 +08:00
Zaiming Shi fec83590a6 chore: bump release version to 4.4.0 2021-11-08 21:38:18 +01:00
Turtle f00e254bdf chore(release): update version to 4.3.9 2021-11-02 18:26:57 +08:00
zhanghongtong aaa7cd0a44 chore(release): update emqx release version 2021-09-06 10:55:02 +08:00
Turtle 87ee94b6f2 chore(version): update emqx version to 4.3.7 2021-08-04 18:44:47 +08:00
zhanghongtong 07f58c0e9e chore(release): update emqx release version 2021-07-28 16:45:54 +08:00
zhanghongtong 0c66fcef00 chore(release): update emqx release version 2021-06-28 11:14:33 +08:00
zhanghongtong bfc6c3aa42 chore(release): update emqx release version 2021-06-23 17:52:42 +08:00
JianBo He 42a6f2aba5
fix(mqttsn): fix proto_name to MQTT-SN instead of MQTT (#4961) 2021-06-11 11:08:24 +08:00
zhanghongtong 4891c4f8de chore(release): update emqx release version 2021-06-05 15:34:07 +08:00
zhanghongtong 96466aba40 chore(release): update emqx release version 2021-05-27 17:54:50 +08:00
Rory-Z ff4ac624d0 chore(release): update emqx release version 2021-05-14 11:28:12 +00:00
Zaiming Shi 80a93c225f build: prepare for 4.3.0 2021-05-06 21:05:39 +02:00
Zaiming Shi bf4baf708a fix(emqx_packet): list element index out of range 2021-05-04 09:24:54 +02:00
zhanghongtong 883614e8c3 chore(release): update emqx release version 2021-04-26 20:42:36 +08:00
Zaiming Shi bc6a87946c refactor(emqx_trie): store only prefixes
This commit refactors emqx_trie implementation
with mainly two changes

1. Deleted the edge table.

   In the old implementation, trie consist of nodes and edges.
   e.g. for topic 'a/b/+/d', node 'a' with edge 'b'
   points to node 'a/b' and so on.

   However, edges can be computed at runtime,
   so there is no need to store them in a table.
2021-04-26 14:18:40 +02:00
Zaiming Shi 6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
zhanghongtong cf16a822b8 chore(release): update emqx release version 2021-04-16 17:07:24 +08:00
zhanghongtong 9e219ed68d chore(release): update emqx release version 2021-03-30 18:51:02 +08:00
Zaiming Shi 6c77fa1bf7 fix(emqx_channel): Receive Maximum spec compliance
According to MQTT 5.0 specification
If the Receive Maximum value is absent then its value defaults to
65,535.
2021-03-29 09:42:07 +02:00
Zaiming Shi b10a60cddb fix(conninfo): Ensure receive_maximum do not exceed limit 2021-03-29 09:42:07 +02:00
zhanghongtong 52743839d0 chore(release): update emqx release version 2021-03-26 14:50:56 +08:00
zhanghongtong 4ce7229382 chore(release): update emqx release version 2021-03-23 23:09:38 +08:00
Zaiming Shi 00a2daba19 chore(build): add more enterprise build support 2021-03-06 10:56:07 +01:00
zhanghongtong b12d4f481f chore(script): remove the prefix of pkg-vsn.sh 2021-03-06 10:40:32 +08:00
Zaiming Shi 9b3ab169ce chore(versioning): detach package version from emqx app version 2021-03-04 20:24:58 +01:00
JianBo He d437f9f228 chore(elvis): fix elvis warnings 2021-01-14 15:46:16 +08:00
Ayodele 2b481dabe7
Fix some dialyzer warnings (#3988) 2021-01-05 20:49:50 +01:00
zhouzb 43b49edd28 feature(alarm): new design for alarm 2020-07-31 18:07:20 +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
zhouzb 3b537760d5 Read new configuration items when plugins is loaded 2020-03-23 15:23:38 +08:00
zhouzb 7ea75f4289 Update copyright 2020-01-03 18:31:08 +08:00
turtled 9786dd5305 Support configuration log line 2019-12-20 15:40:58 +08:00
Feng Lee 0c377c67cd Use 'erlang:system_time' to replace 'os:timestamp' (#3088)
Use 'erlang:system_time/1' to replace 'os:timestamp/0'
2019-12-09 16:27:25 +08:00
Feng Lee 9c3273a2c6 Improve the process of handling MQTT control packets (#3079) 2019-12-06 19:51:06 +08:00
zhouzb b7cafc0ba0 Update record banned 2019-11-15 14:55:14 +08:00
zhouzb d004a5b68e Rename 'client_id' field to 'clientid' 2019-09-29 16:46:27 +08:00
Feng Lee 2790ab318d Rename 'client_id' field to 'client' 2019-09-24 13:53:46 +08:00
Feng Lee 2ed9e9480e Remove the default value of 'headers' field 2019-09-19 11:18:04 +08:00
zhouzb 2089c2108e Default rap is 0 2019-09-06 20:32:10 +08:00
Michael Schmidt 3038bd4570 Add support for logger per module filtering (#2873)
Add mfa to the meta data to suppor the Erlang Logger's per module / per app filtering
2019-09-06 11:03:47 +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 c69a2b1b48 Ensure session expiration (#2825)
Ensure session expiration
2019-08-23 09:35:29 +08:00
Gilbert 79744af681 Wrapper proper test cases into common test cases (#2785)
* Wrapper proper test cases into common test cases

* Improve test cases for reason code module (#2789)

* Split 3 proper tests into 3 ct cases

* Improve test cases for client, rpc and request-response

* Add psk suites to increase coverage

* Add sys test cases
2019-08-16 18:07:12 +08:00
turtled 91a8dbda56 Fix conflicts 2019-08-09 16:41:11 +08:00
周子博 ef9cbe51eb Fix conflict 2019-08-02 10:41:46 +08:00
Feng Lee c95a89ed1e Merge branch 'nchannel' into develop 2019-07-31 14:03:48 +08:00
terry-xiaoyu b0e2b7db0c Support inter-node messages via RPC cast 2019-07-27 12:59:07 +08:00
Feng Lee c091e89796 Remove the unnecessary include/emqx_client.hrl 2019-07-23 10:56:14 +08:00
Feng Lee a6262ffb30 Remove the 'rc' field from DEFAULT_SUBOPTS 2019-07-22 17:07:58 +08:00
Feng Lee dfa2c2370e Define 'Otherwise' macro 2019-07-13 12:25:25 +08:00
Gilbert 70be888f3b Compat windows (#2665) 2019-07-05 23:10:13 +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 177dc44155 Define 'Otherwise' macro 2019-07-02 13:39:23 +08:00
Feng Lee f32a415a83 Merge branch 'channel3' 2019-06-25 15:55:31 +08:00
Feng Lee 795fe4e0bc Add 'PUBLISH_PACKET(QoS, Topic, PacketId)' macro 2019-06-25 14:29:26 +08:00
turtled 481458d8ec Add plugin type 2019-06-21 19:52:53 +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 c64751a53c Support module level logger header 2019-06-18 14:37:32 +08:00
Feng Lee 21162f88b8 Update copyright 2019-06-18 14:27:06 +08:00
Feng Lee 1d88f8fd9e Improve the emqx_connection, emqx_ws_connection and emqx_frame modules (#2611)
* Adopt channel architecture and improve the MQTT frame parser

* Update the test cases for emqx_channel, emqx_protocol

- Improve emqx_client to Use the new emqx_frame:parse/2
- Update the ct suites for emqx_channel, emqx_ws_channel

* Fix test case
2019-06-14 12:44:27 +08:00
Feng Lee d386b27e8a Adopt channel architecture and improve the MQTT frame parser 2019-06-11 23:18:38 +08:00
Gilbert Wong bcbb4b68e9 Add flapping detect feature 2019-04-19 16:34:33 +08:00
spring2maz 48450d1d37 Move request response out of emqx client (#2293)
* Delete response_topic_prefix

The Response-Infomation in CONNACK was misinterpreated, it should
not be a broker's global config, instead, it should be per-client
or even per-session prefix/suffix mechanism

* Delete request-response code from emqx_client

* Add request-response test code

* meck as default dependency --- temp workaround for dep-vsn-check
2019-03-13 11:27:25 +08:00
Gilbert b1ca0120a2 Move bridge modules out of bridge directory (#2273) 2019-02-28 17:04:39 +08:00
Gilbert 771f8c052a
Merge branch 'develop' into introduce-new-bridge-impl 2019-02-28 15:14:40 +08:00
Feng Lee 08204fc7a8 Improve the emqx_connection module using gen_statem behaviour (#2235) 2019-02-28 15:08:29 +08:00
Gilbert Wong 911a813891 Fix copyright and unify log method 2019-02-28 11:18:12 +08:00
spring2maz efc9e34033 Make use of BUMP_PACKET_ID the only way to generate packet IDs 2019-02-28 11:17:27 +08:00
spring2maz 67376727c9 Add batch send support for emqx_client:publish/2
also cover emqx_portal_mqtt with CT
2019-02-28 11:17:27 +08:00
spring2maz fbe67e6784 Introduce new bridge impl 2019-02-28 11:17:27 +08:00
Gilbert c3e6f3c3b2 Improve try catch syntax (#2263)
* Replace case catch.. with try ... catch
Prior to this change, case catch ... would cost a lot of performance
because it would retrieve the whole stacktrace. However, try...catch
will not retrieve the whole stacktrace. So try...catch syntax is better.
2019-02-28 09:54:28 +08:00
Feng Lee 269b74232a Introduce some common types 2019-02-19 17:16:11 +08:00
张奇怪 44d3eff094 Auto-pull-request-by-2019-02-19 (#2232)
* Update Copyright to 2019 (#2191)

* Disable bridges by default (#2189)

* Fix warning logger args emqx#2195

* Ambiguity elimination (#2217)

* Fix emqx_ws_connection: prevent crashes on pong (#2210)

* Issue#2184 (#2194)

* Delete dep-vsn-check

* Format app.src
2019-02-19 14:00:34 +08:00
turtled 31e95b56c4 Update Copyright to 2019 2019-01-29 10:43:25 +08:00
Feng Lee d7254cdc7f Add more macros for logger 2019-01-04 17:30:27 +08:00
terry-xiaoyu 3b8eb41347 Remove the log header macro 2019-01-04 17:30:27 +08:00
Shawn eeb0cab3e3 Update proc meta-data for empty clientid (#1980) 2018-11-23 18:11:46 +08:00
terry-xiaoyu bc1464a33f Lazy logging without header 2018-11-19 11:17:58 +08:00
terry-xiaoyu 82b8047349 Helper funcs for adding proc meta-data 2018-11-19 11:17:58 +08:00
terry-xiaoyu e8cc65ef40 Change logger micros 2018-11-19 11:17:58 +08:00
terry-xiaoyu 41315bff0d Log macros for lazy evaluation 2018-11-19 11:17:58 +08:00
Gilbert Wong 32d3826440 Replace macro QOS$i to QOS_$I
The two styles of qos macro name in one project is chaotic. It is not
a good practice.

So I change the QOS$i to QOS_$i
2018-11-08 20:42:31 +08:00
spring2maz ae743ad1f0 Rewrite emqx_mqueue.erl
Fixed bugs:

- Priority queue lack of a `len + 1` logic in `in/2`

Changed behaviors:

- Topics not found in priority table (from config) will be treated with default priority,
  instead of hasing topic name to a priority number.
- Default priority is now configurable (it was always lower than all configured priorities)
- The dropped message due to reaching `max_len` is now returned from `in/2`,
  so the queue owner (`in/2` caller) can perform autopsy on it
2018-10-27 14:21:53 +02:00
Gilbert 4c40f75f4b Request & Response (broker and client) (#1819)
Add request & response support for CONNECT & CONNACK

Prior to this change, there is no validate and specified process for
Request-Response-Information and Response-Information

Also added basic Request/Response functionality to emqx_client implementation
2018-10-18 19:21:05 +02:00
terry-xiaoyu dd8513ad35 Update for banned API
Use `mnesia:foldl` to traverse mnesia rather than `mnesia:first` and
`mnesia:next`, as a badarg exception would occur if the record was
deleted while travering the whole table.
2018-09-07 14:10:16 +08:00
周子博 83e11b6e39 Add emqx_banned test suite, and fix bugs in emqx_banned 2018-08-30 22:45:08 +08:00
Feng Lee 567aeb274f Define types in emqx_types, emqx_mqtt_types modules 2018-08-29 23:08:55 +08:00
turtled 6478f811bf Fix conflicts 2018-08-27 10:29:22 +08:00
turtled 95d36d0204 Fix share sub bug 2018-08-27 10:15:41 +08:00
Feng Lee 0e3728c940 Add emqx_types module and 'credentials' type 2018-08-26 16:24:51 +08:00
Feng Lee b10f49b52c Add CONNACK macros for MQTT V3.1.1 2018-08-25 11:49:19 +08:00
Feng Lee 0f052ce352 Upgrade connection, protocol and session modules for MQTT 5.0 2018-08-24 18:39:59 +08:00
Feng Lee 6ab489a9b5 Change the MAX_CLIENTID_LEN to 65535 2018-08-10 15:38:08 +08:00
turtled 4d9e03a803 Refactor websocket conn using cowboy 2018-08-08 18:36:14 +08:00
Feng Lee 7d0cba9427 Add MQTT 5.0 supports for connection, protocol and session modules 2018-08-06 16:33:10 +08:00
Feng Lee b110a154ef Upgrade header files for EMQ X 3.0 2018-07-18 14:27:11 +08:00
Feng Lee bffdd2ba74 Upgrade esockd and add more test cases 2018-05-22 13:01:19 +08:00
Feng Lee 31bc091873 Implement MQTT Version 5.0 client 2018-05-06 17:45:18 +08:00
Feng Lee dc7804a2dc Support MQTT Version 5.0 Client 2018-04-30 12:27:39 +08:00
Feng Lee 2a4ffc6645 Add more service modules for MQTT Version 5.0 2018-04-18 16:34:23 +08:00
Feng Lee bbb66ff92e Refactor the broker, router modules 2018-04-10 18:17:07 +08:00
Feng Lee bfb23ff0b2 Improve the design of MQTT session management 2018-04-08 15:16:05 +08:00
Feng Lee 39548cc399 Improve the session management 2018-04-04 15:28:01 +08:00
Feng Lee 2eed46310c Misc fix for the MQTT Version 5.0 2018-03-30 17:18:08 +08:00
Feng Lee 9976327c8d Add emqx_mqtt module 2018-03-23 18:13:09 +08:00
Feng Lee 56b88dd7f7 Improve the design of session management 2018-03-23 16:39:23 +08:00