- 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)`
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`.
* 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
* 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
* 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
* 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.