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.
- 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