linjun
16165ce935
Use conn_mod instead of socktype
2019-02-28 11:32:05 +08:00
linjun
44529a278d
Adjusting code
2019-02-27 14:39:49 +08:00
linjun
7af6051e25
Refactor code
2019-02-27 13:54:24 +08:00
linjun
760ac9f2f9
Add the value of attribute socktype in emqx_conn_type table
2019-02-27 11:09:45 +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
YoukiLin
78b3c375d8
Improving 'emqx_ws_connection' coverage ( #2107 )
2019-01-03 12:59:39 +08:00
Feng Lee
10e5210581
Workaround ssl:setopts(SslSock, [{active, N}]) ( #2095 )
...
* Set '{active, true}' for SSL socket
2018-12-21 15:39:24 +08:00
Feng Lee
3fec9cdf0a
Try to simulate a '{ssl_passive, Sock}' message:(
2018-12-21 12:03:40 +08:00
Feng Lee
367b717c40
Implement a new 'emqx_gc' module ( #2090 )
...
Update connection/session module to using the new emqx_gc API
2018-12-20 22:42:18 +08:00
Feng Lee
14cffcf7fb
Add the 'emqx_pd' module
...
Add utility functions for erlang process dictionary
Add test cases for emqx_pd
2018-12-20 16:45:25 +08:00
Feng Lee
14a12e0c6c
Move the 'LOG_HEADER' macro above '-include(logger.hrl)'
2018-12-20 14:45:52 +08:00
Feng Lee
6e1b47f1f9
Improve the emqx_connection module
...
Rename 'publish_limit' to 'pub_limit'
'try ... of ... catch' to replace 'case catch'
2018-12-20 14:45:52 +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
周子博
ea62b15c87
Alter apis provided by emqx_metrics, and use existing timer to commit metrics
2018-11-30 17:44:29 +08:00
周子博
194dbc02c8
Add batch commit for metrics
2018-11-30 17:44:29 +08:00
Shawn
eeb0cab3e3
Update proc meta-data for empty clientid ( #1980 )
2018-11-23 18:11:46 +08:00
terry-xiaoyu
82b8047349
Helper funcs for adding proc meta-data
2018-11-19 11:17:58 +08:00
terry-xiaoyu
41315bff0d
Log macros for lazy evaluation
2018-11-19 11:17:58 +08:00
terry-xiaoyu
2269967f1a
Lazy evaluation when logging messages
...
Formatting variables and then passing them into the logger functions leads
to performance issues. i.e.
```erlang
logger:debug("RECV ~s", [emqx_packet:format(Packet)])
```
Above message will only be printed when the current log level set to
`debug`, but the function emqx_packet:format/1 will always be evaluated no
matter what the current log level is.
OTP 21 provides a special meta-data named `report_cb`, which can be used
for lazy evaluation. The fun is only evaluated if the primary/handler log level
check passes, and is therefore recommended if it is expensive to generate
the message.
2018-11-19 11:17:58 +08:00
Gilbert Wong
35460d8227
Refactor send_fun
2018-10-22 09:04:03 +08:00
Gilbert Wong
a748e8f1d8
Refactor send_fun in protocol and other connection module
...
Prior to this change, in the send function, the packet is forced to
use emqx:serialize to serialize packet, it is a wrong design because
other plugins which need to transform the mqtt packet to other packets
can not use their own serialize function to serialize packet.
This change solve the problem issued above.
2018-10-18 13:24:06 +08:00
spring2maz
e3f2ae8db8
Change from customized total heap size check to set process flag
...
The `max_heap_size` process flag can be used to limit total
heap size of a process, and it gives much more detailed
crash log if the limit is hit.
2018-09-29 21:36:34 +08:00
turtleDeng
8653732bae
Revert "Calculate the 1.5 keep alive time exactly"
2018-09-22 14:52:31 +08:00
Feng Lee
ee7a7e2479
Fix typo
2018-09-22 06:05:29 +08:00
spring2maz
b61615323b
Move shutdown policy config to zone configs
2018-09-21 18:58:18 +02:00
spring2maz
6fca651a84
Add connection/session shutdown policy
...
The hibernation behaviour is also changed (implicitly) in this commit:
Prior to this change, connection/session always hibernates after
the stats timer expires regardless of messages in mailbox.
After this commit, connection/session process only goes to hibernate
when the timer expires AND there is nothing left in the mailbox to
process
2018-09-21 18:58:18 +02:00
spring2maz
721f237bc4
Rewrite emqx_gc.erl
...
The implementation prior to this commit supports
only one gc enforcement policy which is message count threshold.
The new implementation introduces 1 more: volume threshold based
2018-09-21 22:56:34 +08:00
周子博
ab2697671a
Change the location of the recording last packet timestamp
2018-09-21 19:59:32 +08:00
周子博
aade94711c
Use process dictionaries to record last packet timestamp
2018-09-21 18:50:26 +08:00
周子博
768d1786c7
Fix bug
2018-09-20 15:55:36 +08:00
周子博
073bf481c9
Calculate the 1.5 keep alive time exactly
2018-09-20 15:51:28 +08:00
HuangDan
fde6a2a4c3
Fixed issue #1811
...
Add tests case for issue #1811
2018-09-13 22:55:15 +08:00
Feng Lee
ea1ae70833
Fix errors found by dialyzer
2018-08-31 16:46:51 +08:00
Feng Lee
0379219a04
Improve the design of session discard
2018-08-30 23:14:09 +08:00
Feng Lee
53a2f93b7e
Add emqx_connection:attrs/1, emqx_protocol:attrs/1, emqx_session:attrs/1 APIs
2018-08-30 03:03:19 +08:00
Feng Lee
1607e576de
Update connection, session, stats modules
2018-08-27 21:34:11 +08:00
Feng Lee
68cfcf6e0e
Pass paho mqtt interoperability tests
2018-08-24 23:19:11 +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
f80cd2d986
Improve the MQTT over Websocket connection
2018-08-11 17:57:19 +08:00
Feng Lee
4005d58166
Move the 'rate_limit' option from zone to listener
2018-08-08 19:31:25 +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
7ee54aac28
Add 'qos' field to message record
2018-07-18 23:41:00 +08:00
Feng Lee
62aa072f2f
Upgrade for MQTT Version 5.0 and Erlang/OTP R21
2018-07-18 13:43:17 +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
2a4ffc6645
Add more service modules for MQTT Version 5.0
2018-04-18 16:34:23 +08:00
Feng Lee
71acf91ace
Replace lager with emqx_log
2018-04-09 12:34:53 +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
282e341433
EMQ X R3.0 - Improve the design of pubsub and router
2018-03-21 16:48:52 +08:00
Feng Lee
22350f9117
Depends on canel-lock library
2018-03-09 13:26:46 +08:00