Feng Lee
4974eab20e
Improve the channel design
2019-06-25 14:53:45 +08:00
Feng Lee
c4eb283517
Add spec for validate/1 function
2019-06-25 14:50:51 +08:00
Feng Lee
242a1ae453
Use emqx_mqtt:qos() type
2019-06-25 14:47:42 +08:00
Feng Lee
72331d8ad0
Move emqx_mqtt_types module to emqx_mqtt
2019-06-25 14:46:21 +08:00
Feng Lee
fb54fe0fad
Improve export_type attr
2019-06-25 14:45:23 +08:00
Feng Lee
795fe4e0bc
Add 'PUBLISH_PACKET(QoS, Topic, PacketId)' macro
2019-06-25 14:29:26 +08:00
Gilbert
475cabde4d
Fix issue#2619 ( #2646 )
...
* Fix issue#2619
Prior to this change, websocket connection would not be disconnected
when dataframe type is other frametype. However, in mqtt spec, it
shoud be disconnected.
This change fix this inconsistent behaviour with mqtt 5.0
2019-06-21 21:21:49 +08:00
turtled
481458d8ec
Add plugin type
2019-06-21 19:52:53 +08:00
tigercl
0c7c4ee417
Using fixed topic for system message of alarm ( #2647 )
...
* Using fixed topic for system message of alarm
2019-06-21 19:51:58 +08:00
tigercl
37eef7b72a
Add 'auth.mqtt.anonymous' metric ( #2631 )
...
* Add 'auth.mqtt.anonymous' metric
2019-06-21 19:21:26 +08:00
Gilbert
138d7727fa
Compact windows platform which has no cpu_sup util function. ( #2629 )
...
* Compact windows platform which has no cpu_sup util function.
* Fix wrong os type clause
* Do not start timer when platform is windows
2019-06-20 11:45:44 +08:00
Gilbert
1d23d7de86
Optimize test workflow ( #2642 )
...
* Optimize test suites workflow
* Better format of makefile
* Fix protocol suite
* Add emqx_access_SUITE
2019-06-20 11:44:44 +08:00
GilbertWong
bcae452e42
Fix the flapping bug
...
Prior to this change, the banned until value will not be set
correctly because of wrong spell of config entry name .
This change fix this bug
2019-06-20 10:59:42 +08:00
GilbertWong
ffbb598a73
Increase time precision for emqx_mod_presence
2019-06-20 09:50:05 +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
09dd65b9fa
Add logger header validation
2019-06-18 14:37:32 +08:00
terry-xiaoyu
7092748266
Improve log messages using logger header
2019-06-18 14:37:32 +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
d065847665
Remove session record
2019-06-16 10:28:23 +08:00
terry-xiaoyu
3f1b788fe8
Remove unused PSK TAB macro
2019-06-14 16:58:46 +08:00
GilbertWong
19822c15bd
Add websocket_info to match {stop, Reason} msg
2019-06-14 16:22:57 +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
Gilbert
d3e7d1f0c9
Fix websocket bug ( #2615 )
...
Fix websocket bug.
Prior to this change, websocket connection would be closed directly
without sending connack packet when acl check fails.
This change fix this bug.
2019-06-14 11:33:44 +08:00
turtleDeng
a3103cec7b
Revert "Fix websocket bug. Prior to this change, websocket connection would be closed directly without sending connack packet when acl check fails."
...
This reverts commit e73c4c64d0
.
2019-06-12 15:51:20 +08:00
GilbertWong
e73c4c64d0
Fix websocket bug.
...
Prior to this change, websocket connection would be closed directly
without sending connack packet when acl check fails.
This change fix this bug.
2019-06-12 15:49:48 +08:00
turtleDeng
76525cc703
Fix acl deny action logic ( #2613 )
2019-06-12 15:49:18 +08:00
tigercl
3462bbd619
Fix retain in will message ( #2607 )
...
* Fix retain in will message
* Only handle retain available flag in MQTT v5
2019-06-12 15:43:52 +08:00
Feng Lee
de978d4771
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
2019-06-12 10:31:44 +08:00
Feng Lee
d386b27e8a
Adopt channel architecture and improve the MQTT frame parser
2019-06-11 23:18:38 +08:00
Feng Lee
f801ff1e53
Optimize metrics using counters and persistent_term ( #2597 )
...
* Optimize emqx_metrics module using persistent_term and counters in OTP 22
2019-06-05 23:16:35 +08:00
turtled
f46205daff
Restart mnesia application
2019-06-05 11:50:09 +08:00
Gilbert Wong
f3fcd16dee
Fix wrong default value in protocol module
2019-06-03 16:25:04 +08:00
Gilbert Wong
e7cd32edb7
Update esockd deps and fix compile warning
2019-05-31 15:21:59 +08:00
Gilbert Wong
47f9d0e90f
Adjust format
2019-05-31 11:16:50 +08:00
Gilbert Wong
365832f945
Use new ranch api to elimate warning log for deprecated apis
2019-05-31 11:16:50 +08:00
Feng Lee
9715234626
Optimize the emqx_zone module using persistent_term
...
- Don't reload the zone options for updating persistent_term is
expensive
- Use '{?MODULE, Zone, Key}' as the key to avoid name collision
2019-05-31 08:53:42 +08:00
terry-xiaoyu
be7de756c6
Stop alarm before emqx stops
2019-05-28 17:11:31 +08:00
Gilbert
0857b976ed
Better zone ( #2548 )
2019-05-25 22:29:23 +08:00
HeeeJianBo
87ffa77ade
Fix lookup_session_pids return data type error
2019-05-25 22:28:34 +08:00
turtled
54f2a768a8
Rm start logger:set_primary_config
2019-05-23 10:51:21 +08:00
Gilbert Wong
1c83270184
Add case clause for emqx_sn and emqx_coap plugin
2019-05-21 11:19:52 +08:00
HeeeJianBo
caa582a028
Revert the PR #2355
...
- Add anonymous field for credentials
2019-05-15 15:04:27 +08:00
JianBo He
1a92f3259f
Enable cert_as_username to pass value to username_as_clientid ( #2536 )
2019-05-15 10:20:04 +08:00
JianBo He
79c1b7eb78
Put sockname to credentials ( #2532 )
...
* Add sockname to credentials
* Explicit credentials type define
2019-05-14 10:22:30 +08:00
JianBo He
97cca1a5ba
Set {active, N} for ssl connection ( #2531 )
2019-05-13 10:18:01 +08:00
turtleDeng
311f1e6df1
Merge pull request #2521 from emqx/develop-3.2
2019-05-09 11:16:14 +08:00
Gilbert Wong
fc6f54602d
Fix plugin load bug
2019-05-08 14:23:12 +08:00
tigercl
7e0ac5bd34
Fix bad config type of long_gc ( #2504 )
2019-05-08 10:19:49 +08:00
terry-xiaoyu
a1eb7ca7d2
Adapt max-heap-size to Arch-32 systems
...
The erlang:process_flag(max_heap_size, MaxHeapSize) can only set a MaxHeapSize of `small integer`, which is smaller than 2^59 on 64-bit systems, and 2^27 on 32-bit systems.
2019-05-07 17:27:06 +08:00
tigercl
b4c659fb54
Add suboptions for stats ( #2507 )
2019-05-06 19:17:54 +08:00
Gilbert Wong
3ece73b912
Reuse plugin filter logic to adapt to emqx rebar3 release
2019-05-06 13:34:55 +08:00
turtled
ea83d2087c
Optimize log configuration
2019-05-05 14:35:43 +08:00
turtled
c5524e99c6
Rm emqx_rate_limiter module
2019-04-25 14:29:20 +08:00
Gilbert
eaa1deab20
Refactor flapping code ( #2476 )
...
* Refactor flapping code
2019-04-24 10:42:26 +08:00
Gilbert Wong
bcbb4b68e9
Add flapping detect feature
2019-04-19 16:34:33 +08:00
Gilbert Wong
5680b191ee
Extend status api
2019-04-18 14:12:06 +08:00
Gilbert
94aa173858
Fix bugs of keepalive value init of emqx_client ( #2443 )
...
Fix bugs of keepalive value init of emqx_client
2019-04-17 10:43:20 +08:00
Gilbert Wong
f1616c33d9
Convert value of attribute table to map
2019-04-13 10:35:59 +08:00
Gilbert Wong
81ef5b9b8d
Support cookie based auth
2019-04-12 19:25:22 +08:00
Gilbert Wong
4d2bc48822
Redesign ensure_start and ensure_stop api of bridge
2019-04-11 18:17:30 +08:00
Gilbert
4fc81cef85
Change log level unexpected info in client ( #2422 )
...
Change log level for unexpected info in client and rejust code format in emqx_bridge
2019-04-11 12:20:32 +08:00
周子博
6a4c318acb
Update metrics when session process terminates
2019-04-11 10:08:26 +08:00
Shawn
a53320069b
Fix trace logger level not work ( #2408 )
...
* Fix trace logger level not work #2385
2019-04-10 09:14:53 +08:00
Gilbert Wong
eb7b1797c2
Provide bridge handler to extense emqx_bridge
2019-04-09 19:03:07 +08:00
Gilbert Wong
627ea0afe8
Add `is_bridge_exist` api in emqx_bridge_sup
2019-04-09 11:40:36 +08:00
Gilbert Wong
8cfd080a97
Fix gen_statem:reply/2 bug in emqx_client module
...
Prior to this change, the arguments passed to gen_statem:reply is bad
args, first arg should be a tuple, but it is a pid. So it would
trigger crash.
This change fix this bug.
2019-04-08 11:50:28 +08:00
Gilbert Wong
7e6255d4ee
Set default websocket idle timeout to 2 hour
2019-04-04 17:42:52 +08:00
Gilbert
e917c025d0
Fix LOG on line 231
2019-04-04 17:38:36 +08:00
JianBo He
aad2d7378e
Put peername into messsage headers ( #2390 )
...
* Put peername into the message.heaers
2019-04-04 13:41:03 +08:00
Gilbert Wong
287c5582a9
Fix compilation warning
2019-04-03 20:49:45 +08:00
Gilbert Wong
15f8d3208f
Fix message dropped
...
Prior to this change, when store_qos0 option is set to false, the hook
`message.dropped` would not be triggered. It is wrong design and when
the ignore_loop is enabled or nl is set to 1, the hook
`message.dropped` also would not be triggered.
2019-04-03 20:33:58 +08:00
Shawn
2306789755
Remove bin_key_map/1 ( #2393 )
...
* Remove bin_key_map/1
* Fix Travis-CI failure
2019-04-03 19:41:21 +08:00
spring2maz
55d2d1d278
Allow boolean flag for loaded plugins
...
This is to simplify config templating
2019-04-03 19:35:24 +08:00
Feng Lee
60c2b8bc08
Add more functions to read fields of 'message' record
...
- Add id/1, topic/1, from/1, payload/1 and timestamp/1 functions
- Improve the test cases
2019-04-02 15:15:13 +08:00
HeeeJianBo
2d2520627a
Fix topic 'datatype' to 'datetime'
2019-04-01 11:37:22 +08:00
Gilbert Wong
0c64da6da7
Change default log level from info to critical when shutdown
2019-03-29 10:57:52 +08:00
Gilbert
b6fa4d2a3f
Fix bridge subscribe bugs
2019-03-29 10:19:11 +08:00
周子博
f14a56eb17
Fix acl bug in subscribe
2019-03-28 14:04:04 +08:00
Gilbert Wong
114b28f973
Delete function clause which would reply {error,standing_by}
2019-03-28 11:47:29 +08:00
Gilbert
0d6b937127
Support proxy protocol of websocket ( #2372 )
...
Support proxy protocol of websocket
2019-03-28 10:34:48 +08:00
HeeeJianBo
24f8c3a391
Fix drain the session process mailbox handling err
2019-03-28 10:32:03 +08:00
周子博
6e3c4b0855
Fix conflict
2019-03-27 13:59:26 +08:00
Shawn
a3fd8846a5
Bin key map ( #2362 )
...
Suppport nested bin-key map
2019-03-27 11:12:28 +08:00
turtleDeng
e6d90d5758
Improve mountpoint ( #2363 )
2019-03-27 11:10:51 +08:00
周子博
0fbf771543
Readjust log level into error when got unexpected message
2019-03-27 11:07:58 +08:00
JianBo He
c223f62c5a
Put cn/dn of client cert into credentials ( #2357 )
...
Put cn/dn of client cert into credentials
2019-03-27 10:20:12 +08:00
Gilbert
2534b8dc64
Support to pass ws compressing options ( #2356 )
...
Add new config entries about websocket
2019-03-27 10:19:35 +08:00
tigercl
f5c426a2f2
Add missed case for monitors ( #2353 )
2019-03-27 10:18:51 +08:00
周子博
58e1b4d485
Readjust log level and unify log format
2019-03-26 22:18:31 +08:00
Shawn
f0fa9a9252
Add a function converting message to binary-key map ( #2360 )
2019-03-26 10:35:10 +08:00
JianBo He
8d92d58b6c
Fix allow_anonymous behavoir error ( #2355 )
...
EMQ should allow the anonymous connection if the allow_anonymous option is true, although it has one or more auth plugins started.
2019-03-26 10:25:51 +08:00
Shawn
9e7b3a9209
Update emqx_types.erl
2019-03-22 16:27:23 +08:00
terry-xiaoyu
bd304572c9
Delete acl_mod and auth_mod
2019-03-22 16:18:42 +08:00
terry-xiaoyu
c7a317afaf
Add one more connack reason code
2019-03-22 15:43:21 +08:00
HeeeJianBo
fc2df9aff5
Adapt to new export style
2019-03-22 14:58:24 +08:00
Gilbert
e386778aca
Fix typo
2019-03-22 11:31:26 +08:00
Feng Lee
dba16aeea5
Add 'remove_header/2', 'get_headers/1' functions
...
- Adopt new 'export' style
- Add 'remove_header/2', 'get_headers/1' functions
- Remove 'remove_topic_alias/1' function
2019-03-22 11:31:26 +08:00
Feng Lee
ba719a896d
Call 'tokens/1' instead of 'words/1'
2019-03-22 11:31:26 +08:00
Feng Lee
a4550a8fc4
Add emqx_topic:tokens/1 function
2019-03-22 11:31:26 +08:00
JianBo He
513d2bcaaa
Fix reload ACL failed ( #2344 )
...
The original `reload_acl` function only parse the ACL file, not compile and rehook to 'client.check_acl'
2019-03-22 10:21:16 +08:00
turtled
416bc75d5d
Sort plugin list
2019-03-22 01:02:30 +08:00
turtled
865ef864db
Get the plugins list through -emqx_plugin module attributes
2019-03-22 00:03:53 +08:00
terry-xiaoyu
b79bf13ae7
Rename result -> auth_result
2019-03-22 00:03:34 +08:00
HeeeJianBo
998684fc4e
Fix badmatch error in the batch_process of session
2019-03-21 17:40:02 +08:00
terry-xiaoyu
36927f01e7
Add type definition for auth_result
2019-03-21 16:54:50 +08:00
tigercl
e7320620c0
Fix alarm report bug ( #2332 )
2019-03-21 16:53:46 +08:00
linjun
3a2f6d5a6c
Fix badmatch bug for reload_acl
2019-03-21 16:51:57 +08:00
tigercl
5a401c44fd
Clear dup flag if message published first ( #2337 )
2019-03-21 10:13:41 +08:00
JianBo He
8a73c62f66
Fix followed packet parse failure ( #2333 )
...
To fix issue#2303(https://github.com/emqx/emqx/issues/2303 )
It will report the following error, when a connection sends a TCP frame contained many of MQTT packet and followed a split MQTT packet.
2019-03-20 10:14:52 +08:00
turtleDeng
a95ebcd7d6
Fix typo
2019-03-17 00:23:44 +08:00
YoukiLin
88c32b2c41
Fix emqx_rpc badargs bug
2019-03-16 21:27:41 +08:00
Gilbert Wong
763115e149
Delegate serialize fun into sendfun
2019-03-16 21:15:10 +08:00
spring2maz
a72a914fb8
Fix issue #2312 ( #2313 )
...
* Fix SSL option parser
* Fix bridge disconnect log formatting
* Set no headers if new headers is undefined
2019-03-16 19:28:57 +08:00
YoukiLin
29f4faa7dd
Add badtcp clause to handle gen_rpc ( #2314 )
2019-03-16 18:23:18 +08:00
terry-xiaoyu
901bbdedd6
Add some auth error codes
2019-03-16 16:30:25 +08:00
terry-xiaoyu
749494c277
Change default internal-rules to #{}
2019-03-16 13:08:11 +08:00
terry-xiaoyu
2912d9a41b
Rename is_super -> is_superuser
2019-03-16 12:51:45 +08:00
terry-xiaoyu
a7adb79f17
Allow empty zone in credentials
2019-03-16 12:25:39 +08:00
Shawn
02fe8560e2
Improve emqx_hooks and credentials ( #2309 )
...
* Improve emqx_hooks and credentials
1. Modify the return modes of emqx hooks.
Change the return value of hook functions to:
- ok: stop the hook chain and return ok
- {error, Reason}: stop the hook chain and return error
- continue: continue the hook chain
And the return value of emqx_hooks:run/2 is changed to:
- ok
- {error, Reason}
And the return value of emqx_hooks:run/3:
- {ok, Acc}
- {error, Reason, Acc}
2. Treat password as a member of credentials.
Password should be wrapped in the `credentials` data-structure, as the
username/password pair together consists of an authentication method.
There can be some methods using some other credential data (e.g.
a JWT token), and these credential data should also be wrapped in the
the `credentials` data-structure.
An event `client.authenticate` is triggered when an user logs in:
```erlang
emqx_hooks:run('client.authenticate', [], Credentials)
```
A `default callback` that deny/allow any user (according to the
`allow_anonymous` config) should be appended to the end of the
callback chain.
The `credentails` is passed through all of the callbacks, and
can be changed over in this process.
* Refactor emqx hooks return mode
* Remove password from PState
2019-03-16 10:43:53 +08:00
spring2maz
f2df92fef2
Unload emqx_alarm_handler before unloading plugins when shuting down ( #2316 )
...
emqx_alarm_handler publishes mqtt messages,
having it running while plugins are shutdown triggered some
annoying crashes
2019-03-15 17:11:24 +08:00
Feng Lee
56718e35cb
Add emqx_topic:tokens/1 function ( #2305 )
...
* Add emqx_topic:tokens/1 function
2019-03-13 23:31:44 +08:00
Shawn
111b66121c
Support TLS/DTLS PSK ( #2297 )
...
* Improve filter functions for emqx-hook
* Add PSK hook
* Reset hook args for filter functions
2019-03-13 22:24:19 +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
turtled
b51747f03e
Export find_plugin
2019-03-12 22:45:50 +08:00
linjun
f166b81702
Use broker_sys_interval instead of sys_interval
2019-03-12 10:15:13 +08:00
spring2maz
252b376e48
Use keep_state_and_data in emqx_client to avoid unnecessary var binding
2019-03-05 04:04:20 +01:00
spring2maz
656429fcc1
Move emqx_client should_ping function to internal block
2019-03-05 03:57:20 +01:00
spring2maz
a056a4cbde
Eliminate {error, inflight_full} from publish call to emqx_client
...
Prior to this change, if a emqx_client:publish/? caller sends in
QoS=1/2 messages too fast, emqx_client may return
`{error, inflight_full}` which could put put the caller to an
awkward situation: there seem to be no ohter option except for
putting self to a sleep-n-retry infinite loop.
In this change, a new gen_statm state 'inflight_full' is introduced
as a sub-state of 'connected'. When emqx_client is in 'inflight_full'
state, it postpone all publish calls (for QoS=1/2) until inflight
window size shrinks.
2019-03-05 03:47:33 +01:00
turtled
22aa7d4668
Rm acl_deny_action_ct test case
2019-02-28 22:19:19 +08:00
tigercl
da755b88c7
Add monitors and alarm handler ( #2266 )
...
* Add monitors and alarm handler
2019-02-28 18:25:17 +08:00
turtled
f1d751dd95
Fix compile fail
2019-02-28 17:06:40 +08:00
Gilbert
b1ca0120a2
Move bridge modules out of bridge directory ( #2273 )
2019-02-28 17:04:39 +08:00
turtled
c8e2840126
Merge fix conflicts
2019-02-28 17:02:39 +08:00
turtled
42932d7b5d
Format code
2019-02-28 16:57:40 +08:00
turtled
df97eb0007
Review code
2019-02-28 16:56:44 +08:00
turtled
8792f7e02b
Review code
2019-02-28 16:56:04 +08:00
linjun
814fd3fc9e
Fix test case
2019-02-28 16:36:47 +08:00
Gilbert Wong
055d0ad98e
Fix typo
2019-02-28 15:39:11 +08:00
Gilbert Wong
7efd7b3ec0
Rename portal to bridge
2019-02-28 15:31:54 +08:00
Gilbert
771f8c052a
Merge branch 'develop' into introduce-new-bridge-impl
2019-02-28 15:14:40 +08:00
Feng Lee
3e0fa87209
Remove the io:format
2019-02-28 15:09:13 +08:00
Feng Lee
e3bc8e4f0a
Support batch delivery
...
- Upgrade the emqx_session module to support batch delivery
- Update emqx_protocol:deliver/2 to support batch delivery
- Update some test cases
2019-02-28 15:09:13 +08:00
Feng Lee
08204fc7a8
Improve the emqx_connection module using gen_statem behaviour ( #2235 )
2019-02-28 15:08:29 +08:00
linjun
16165ce935
Use conn_mod instead of socktype
2019-02-28 11:32:05 +08:00
Gilbert Wong
d18f4ba550
Fix wrong config entries
2019-02-28 11:18:12 +08:00
Gilbert Wong
911a813891
Fix copyright and unify log method
2019-02-28 11:18:12 +08:00
spring2maz
9dbc34c376
Ack replayq and allow retry in tests
2019-02-28 11:17:27 +08:00
Gilbert Wong
75163e21f3
Reverse intensity/period in bridge SupFlag
2019-02-28 11:17:27 +08:00
Gilbert Wong
ae92acf30f
Refactor portal supervisor
2019-02-28 11:17:27 +08:00
Gilbert Wong
ec37225333
Add emqx_portal interfaces
2019-02-28 11:17:27 +08:00
Gilbert Wong
921a45a505
Fix emqx_portal_mqtt_tests start function
2019-02-28 11:17:27 +08:00
spring2maz
d4495fd8e7
Add manual start API
2019-02-28 11:17:27 +08:00
spring2maz
1626cade28
Deleted batch publish support in emqx_portal_client
...
eqmx_portal_mqtt has to do single message publish calls for now
Also fix a bug in emqx_portal_mqtt ack collector
2019-02-28 11:17:27 +08:00
spring2maz
086a1d56b9
Drop unused config schema
...
bridge.$name.transport was added before we decided to derive
transport portocol based on the 'address' config.
i.e. when it's a remote erlang node, use gen_rpc
otherwise (must be IP or hostnmae), we should estabilish mqtt connection
2019-02-28 11:17:27 +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
Gilbert Wong
d7e18c95c6
Fix spelling error
2019-02-28 11:17:27 +08:00
spring2maz
786a6eb696
Add APIs for subscription add / delete
2019-02-28 11:17:27 +08:00
spring2maz
599f5c8d4f
Add API emqx_portal:ensure_forward_absent
2019-02-28 11:17:27 +08:00
spring2maz
2903a810ce
Add emqx_portal:ensure_foreard_present API
2019-02-28 11:17:27 +08:00
spring2maz
9e78c18681
Add get_forwards and get_subscriptions protal APIs
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
b9e8bde3b0
Add first CT test for emqx_portal based on rpc
2019-02-28 11:17:27 +08:00
spring2maz
6d51d78dfc
Add portal transport over emqx_client.
2019-02-28 11:17:27 +08:00
spring2maz
141af0d02c
Add message handler callbacks option to emqx_client
...
In this commit, msg_handler option is added to emqx_client.
so the caller can provide callbacks to handle puback, publish,
as well as disconnected events instead of always delivered
as message like Owner ! {publish, Msg} to the owner process.
This is to make it ready to implement emqx_portal_connect on
top of emqx_client.
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
linjun
44529a278d
Adjusting code
2019-02-27 14:39:49 +08:00
linjun
e1a5188d09
Adjusting code
2019-02-27 14:00:11 +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
Feng Lee
c8b243ed22
Change some '-type' attrs to '-opaque' and improve emqx_gc, emqx_inflight modules
...
- Define 'GCS(St)' macro to improve emqx_gc module
- Define 'Inflight(MaxSize, Tree)' macro to improve emqx_inflight module
2019-02-22 18:08:13 +08:00
Feng Lee
565c1a8c85
Optimize unset_flag/2 and add some specs
...
- Optimize unset_flag/2
- Add some function specs
- Add emqx_message_SUITE to Makefile
2019-02-22 17:06:52 +08:00
Feng Lee
82c337a040
Fix 'drpped' typo
...
- Fix 'drpped' typo
- Add specs for exported functions
- Add 'group()' type in emqx_topic module
2019-02-22 10:03:29 +08:00
Feng Lee
7a645dd9cc
Add 'include/types.hrl' and 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
turtleDeng
00863acea3
Merge emqx30 ( #2181 )
...
* Change the reason code in will topic acl check (#2168 )
* Fix bridge bug (#2160 )
* Limit bridge QoS less than 1
* Improve shared sub dispatch implementation. (#2144 )
* Upgrade ekka, esockd libraries
* Improve the 'try_open_session' function
* Reload config (#2180 )
2019-01-25 13:01:48 +08:00
Shawn
b8929a46c1
Fix the EXIT outputs in Travis CI ( #2154 )
...
* Fix the Exit in testcases
* Fix Exit in emqx_mod_sup_SUITE
* Update testcases for log_tracer
* Fix Exit in emqx_protocol_SUITE
* Add will_acl_check
* Fix more Exits
2019-01-17 17:14:51 +08:00
tigercl
bc31faac6b
Fix will msg ( #2156 )
...
* Remove will_msg and will_topic from protocol state
* Modify try_open_session/1
2019-01-17 13:57:42 +08:00
Gilbert Wong
ec03f8e1fa
Fix the deliver packet bug and add test case
2019-01-11 16:41:20 +08:00
turtleDeng
a5f9466040
QoS0 msg support msgid ( #2145 )
...
* QoS0 msg support msgid
* Fix testcase
2019-01-11 11:47:10 +08:00
Feng Lee
5ccaaed34c
Add 'next_events/1' and fix the 'process_incoming/3' function
2019-01-10 09:23:05 +08:00
Feng Lee
3e15ac0bbb
Improve the design of 'emqx_client' module
...
Use '{next_event, cast, Packet}' to replace 'gen_statem:cast/2'
2019-01-10 09:23:05 +08:00
Feng Lee
30f32de13a
Use map to replace 'state' record
2019-01-10 08:53:10 +08:00
Feng Lee
e882af9369
Use the new logger macros
2019-01-10 08:53:10 +08:00
Feng Lee
fe0f5333b3
Improve the pool design
...
- Move 'emqx_pool:start_link/0' to emqx_pool_sup module
- Use the new log macros
- Add more test cases
2019-01-10 08:49:58 +08:00
Feng Lee
4230a3c535
Optimize the trie match
2019-01-09 11:57:22 +08:00
Feng Lee
0c418581b2
Add emqx_trie:empty/0 and optimize match_routes/1
2019-01-09 11:57:22 +08:00
Gilbert
dee88fb018
Fix mem cache bug ( #2129 )
2019-01-07 14:15:27 +08:00
Shawn
0d9929fdaa
Logger level in one command ( #2115 )
...
* Refactor logger-level-in-one-command
* Update API
2019-01-07 11:40:54 +08:00
Shawn
cb93a356a0
Fix crash if peer closed the connection ( #2120 )
...
Prior to this fix, we'll get the following crash if we connected to
another emqx broker but got refused because of wrong username or password.
2019-01-07 11:40:05 +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
69954480bf
Hook args ( #2119 )
2019-01-03 13:54:31 +08:00
YoukiLin
78b3c375d8
Improving 'emqx_ws_connection' coverage ( #2107 )
2019-01-03 12:59:39 +08:00
Gilbert
9a2573d54b
Refactor bridge ( #2117 )
...
* Refactor bridge
2019-01-03 09:10:43 +08:00
Gilbert
72791b569e
Improve app src ( #2114 )
...
* Add replayq in emqx.app.src
* Fix publish_readq_msg badmatch
2018-12-28 20:04:52 +08:00
Gilbert Wong
eed03ee297
Add replayq in emqx.app.src
2018-12-28 19:53:58 +08:00
turtleDeng
6a1ebe299a
Merge emqx32 to emqx30 ( #2112 )
2018-12-28 19:44:41 +08:00
Shawn
d854120023
Show plugin name if cannot start it ( #2111 )
2018-12-28 16:37:01 +08:00
Gilbert
1797aadbe7
Fix unsuback compat ( #2102 )
2018-12-22 18:47:38 +08:00
tigercl
edf0ded9f3
Fix bug that no update message expiry interval ( #2101 )
2018-12-22 11:32:22 +08:00
turtled
f7596b8131
Fix session shutdown bug
2018-12-21 22:44:58 +08:00
Feng Lee
bb45825e77
Inc deliver_stats, enqueue_stats with emqx_pd:update_counter/2 ( #2100 )
2018-12-21 18:31:04 +08:00
turtled
6f4d517350
Fix conflicts
2018-12-21 17:55:25 +08:00
Feng Lee
f31e7f8bde
Replace put/2 with emqx_pd:update_counter/2 ( #2098 )
2018-12-21 17:47:49 +08:00
turtled
7d3357e0f3
Merge emqx32
2018-12-21 16:01:32 +08:00
YoukiLin
e949e8cbd8
Add format output for test print ( #2076 )
...
* Add formatted output for the test print
2018-12-21 15:42:42 +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
tigercl
31bf01fd7a
Fix bug in topic alias maximum ( #2074 )
...
* Fix bug in topic alias maximum
2018-12-21 14:01:21 +08:00
Feng Lee
3fec9cdf0a
Try to simulate a '{ssl_passive, Sock}' message:(
2018-12-21 12:03:40 +08:00
turtleDeng
4f84a31d02
Update copyright ( #2093 )
2018-12-21 11:06:50 +08:00
Gilbert
bf7f10ecd1
Add will topic validation and acl check ( #2075 )
...
* Add will topic validation and acl check
2018-12-21 10:49:03 +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
turtled
b4833d6973
Fixed conflicts
2018-12-20 22:23:20 +08:00
tigercl
938d30268a
Remove extra case...of ( #2082 )
...
* Remove extra case...of
2018-12-20 21:42:14 +08:00
YoukiLin
6b538d2363
Add test cases for 'emqx_cm' and 'emqx_sm' ( #2073 )
...
Add test cases for 'emqx_cm' and 'emqx_cn'
2018-12-20 21:03:40 +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
d827604213
Remove the ensure_stats_timer/1 call from reply/2 and noreply/1
2018-12-20 11:33:18 +08:00
Feng Lee
42fc8f5811
Improve the session module
2018-12-20 10:21:40 +08:00
tigercl
97474171d0
Better report errors in acl.conf ( #2065 )
2018-12-19 23:06:48 +08:00
turtled
7a1ec580b0
Update broker test cases
2018-12-19 17:18:26 +08:00
Feng Lee
892d9439b9
Implement a new session supervisor. ( #2077 )
2018-12-19 16:49:35 +08:00
Gilbert
7d9e350bbe
Add option to disconnect client in case acl deny ( #2059 )
...
* Add option to disconnect client in case acl deny
2018-12-19 10:34:06 +08:00
turtled
666d9706a3
Fixed conflicts
2018-12-18 16:41:10 +08:00
turtled
1e2c5db36c
Modify batch size
2018-12-18 15:42:54 +08:00
Feng Lee
dc06c0beab
Remove 'topic_alias_maximum' from session's state
2018-12-18 15:11:04 +08:00
tigercl
95ad67b47c
Fix a bug that will not send a will message in some cases ( #2068 )
...
* Fix a bug that will not send a will message in some cases
2018-12-18 14:55:37 +08:00
周子博
b7a39f25f2
Revert "Fix a bug that will not send a will message in some cases"
...
This reverts commit 675edf3fab
.
2018-12-18 12:02:18 +08:00
周子博
675edf3fab
Fix a bug that will not send a will message in some cases
2018-12-18 12:01:41 +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
turtled
f54d414825
Fix pick fail
2018-12-15 13:42:07 +08:00
turtled
34370ef622
Merge branch 'issue#1983' into emqx30
2018-12-14 17:55:36 +08:00
Feng Lee
abe9aff062
Add 'enable_session_registry' config
2018-12-13 18:28:32 +08:00
Feng Lee
7fe3d59c28
Update the registered name of pool sup.
2018-12-13 17:54:22 +08:00
Feng Lee
4aaf0a7db4
Remove emqx_session_sup to handle massive concurrent sessions
2018-12-13 17:10:02 +08:00
Feng Lee
4e1d1bd60f
Remove the emqx_session_sup module
2018-12-13 17:10:02 +08:00
Feng Lee
a68e3f265d
Fix 'badarg' crash
2018-12-12 16:34:55 +08:00
Feng Lee
d8cbf72da1
Fix 'badarg' crash
2018-12-12 16:32:58 +08:00
Feng Lee
8f2f4b6b81
Optimize connection and session management
2018-12-12 16:21:30 +08:00
Feng Lee
8d50c62a94
Optimize connection and session management
2018-12-12 16:10:16 +08:00
Feng Lee
99872b253f
Fix 'function not exported' crash
2018-12-12 14:53:22 +08:00
Feng Lee
2a747c9d53
Improve the subscription sharding.
2018-12-12 13:40:01 +08:00
Feng Lee
33830d8120
Improve the design of trie, router and broker modules
...
1. Add do_add_route/1 do_add_route/2, do_delete_route/1,
do_delete_route/2 APIs in emqx_router module
2. Improve the code of emqx_trie module
3. Update the emqx_broker module to call the new APIs of emqx_router
2018-12-12 13:40:01 +08:00
Feng Lee
47e3cd3692
Improve the subscription sharding.
2018-12-12 13:34:13 +08:00
Feng Lee
cca5081e02
Improve the design of trie, router and broker modules
...
1. Add do_add_route/1 do_add_route/2, do_delete_route/1,
do_delete_route/2 APIs in emqx_router module
2. Improve the code of emqx_trie module
3. Update the emqx_broker module to call the new APIs of emqx_router
2018-12-10 18:37:42 +08:00
周子博
ec2e289776
Fix crash in emqx_acl_internal:filter/2
2018-12-10 11:13:25 +08:00
Feng Lee
fb7b63c59b
Merge branch 'emqx32' into subscription-sharding
2018-12-10 10:08:18 +08:00
Gilbert Wong
e0eb76afa6
Fix subscription
2018-12-08 16:09:54 +08:00
Feng Lee
64f62fa0ce
Make some processes hibernate after 1s.
2018-12-08 15:03:34 +08:00
Feng Lee
f008ceb5c8
Optimize the route and trie modules.
...
1. Use mnesia:wread/1 to replace mnesia:read/2
2. Update the router supervisor
2018-12-08 15:03:34 +08:00
Gilbert
0b70896456
Fix the coverage shaky ( #2010 )
2018-12-08 15:03:34 +08:00
spring2maz
b6c123b173
Use git tag for app vsn
2018-12-08 15:03:34 +08:00
turtled
5164d0d6a5
Fix unsubscribe fail and rename shared -> shard
2018-12-08 11:40:08 +08:00
turtled
d1be51d398
Format code
2018-12-08 10:52:15 +08:00
turtled
ba897e51f9
Subscriber down clear emqx_suboption table
2018-12-08 10:26:50 +08:00
turtled
5e53eaeee5
rename shard shared
2018-12-08 09:56:00 +08:00
Feng Lee
36e7d63d66
Implement subscription sharding.
...
1. Improve the design router, broker and shared_sub
2. New ets tables' design for subscription sharding
2018-12-07 18:20:09 +08:00
Feng Lee
bce1ddc5c4
Implement a hash-based subscription sharding
2018-12-06 18:45:07 +08:00
Feng Lee
d11e734dae
Make some processes hibernate after 1s.
2018-12-05 10:31:11 +08:00
周子博
35e699e54e
Make sure test case of emqx_banned passes
2018-12-04 16:11:25 +08:00
Feng Lee
b4d981daf2
Add a sequence module to generate index for subscription sharding
2018-12-04 15:59:24 +08:00
周子博
b2c3d8366d
Add logs for malformed acl configuration file
2018-12-03 13:57:37 +08:00
Feng Lee
95446ca837
Optimize the route and trie modules.
...
1. Use mnesia:wread/1 to replace mnesia:read/2
2. Update the router supervisor
2018-12-03 11:10:47 +08:00
Gilbert
295a9d692e
Fix the coverage shaky ( #2010 )
2018-11-30 19:16:48 +08:00
spring2maz
14dfe03426
Use git tag for app vsn
2018-11-30 11:03:26 +01:00
Feng Lee
d9470f365f
Optimize read/write concurrency of mnesia/ets tables
2018-11-30 17:46:15 +08:00
Feng Lee
e15e5d1f98
Fix the atom leaks in emqx_reason_codes module.
2018-11-30 17:45:28 +08:00
周子博
fde5fbe73a
Align the code
2018-11-30 17:44:29 +08:00
周子博
ad8b547519
Make batch committing of metrics more elegant
2018-11-30 17:44:29 +08:00
周子博
f315994eb9
Remove unnecessary spec
2018-11-30 17:44:29 +08:00
周子博
c87aabbbeb
Some forgotten changes in last commit
2018-11-30 17:44: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
Feng Lee
21ed012a0c
Add an elegant batch module
2018-11-29 10:13:09 +08:00
Feng Lee
309f3560f3
Bump version to 3.0.0
2018-11-28 16:05:17 +08:00
周子博
5c291ff23e
Fix the 'route_batch_delete' config
2018-11-28 16:04:04 +08:00
周子博
78fdb798f8
Update vsn
2018-11-26 13:51:32 +08:00
Shawn
eeb0cab3e3
Update proc meta-data for empty clientid ( #1980 )
2018-11-23 18:11:46 +08:00
Shawn
6fa183f847
Add CLI for log level ( #1977 )
2018-11-23 11:04:33 +08:00
Shawn
2bd0f16884
Add CLI for log tracer ( #1973 )
2018-11-23 11:01:10 +08:00
tigercl
551d5d99d2
Change 'aquire' to 'acquire' ( #1976 )
...
* Change 'aquire' to 'acquire'
2018-11-23 11:00:30 +08:00
tigercl
14b8036576
Use username replace id(issue#1737) ( #1961 )
...
* Use username replace id(issue#1737)
* Add test case for issue#1737
* Make with_connection/2 support batch connect
2018-11-21 22:51:33 +08:00
spring2maz
a2c658ba19
Add acking mechamism for shared dispatch ( #1872 )
...
* Add acking mechamism for shared dispatch
For QoS0 messages, no acking
For QoS1/2 messages, 'ACK' at any of events below:
- ACK when QoS is downgraded to 0
- Message is sent to connection process
'NACK' at any of events below:
- Message queue is full and the receiving session starts to drop old messages
- The receiving session crash
Upon 'NACK', messages are dispatched to the 'next' subscriber in the group,
depending on the shared subscription dispatch strategy.
2018-11-21 22:49:45 +08:00
Gilbert
16821490ce
Fix issue#1874 ( #1964 )
...
* Fix issue#1874
Prior to this change, if user use one client connect emqx with mqtt
v3.1.1, the client subscribe the topic and publish message to this
topic, it would receive this message itself published, this commit
provide a configure option to let user ignore the message itself published.
This change fix issue 1874.
* Small Fix
* Fix bug
* Better design
* Fix compile warning and improve coverage
* Better design to solve the performance issue
* Fix typo
* Fix typo
* Delete spaces in end of lines.
* Do not use anonymous function
* Better performance
2018-11-19 13:34:03 +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
Andrei Nesterov
9d67a64165
Fix type validation for User-Property
2018-11-19 09:53:43 +08:00
terry-xiaoyu
078584172e
Print EMQ X Version in the console
2018-11-10 12:14:26 +08:00
turtled
faeda253e1
Fix conflicts
2018-11-10 11:44:55 +08:00
terry-xiaoyu
6e26f5e9af
Revert logger print to io:format 2
2018-11-10 11:25:52 +08:00
terry-xiaoyu
2611b6fc2a
Revert logger print to io:format
2018-11-10 11:01:11 +08:00
周子博
c76e2d1413
Fix 'badarg' in io_lib:format/2 when 'from' field is tuple
2018-11-09 18:32:26 +08:00
terry-xiaoyu
997958aed1
Change the start_link API for emqx_client
...
Prior to this change, emqx_client:start_link does 2 works in one call:
- init an erlang process for emqx_client
- send MQTT CONNECT to remote broker
But this solution have some drawbacks:
- the return value of `start_link` compiles the return values of the 2
works: {ok, Pid, MqttResult}. It is inconsistent with the return value
of `gen_statem:start_link`, may causes confusions.
- the return mode of the 2 works are different:
`start_link` should always return {ok, Pid} or {error, Reason}, but
connecting to mqtt may throw out exceptions as it handles the
socket. But the caller couldn't have thought of the exception, he would
pattern match on the result of `emqx_client:start_link`, but it crashed!
- If the init work succeed but the connection failed, the caller couldn't
get a Pid from the return value, but indeed it was created inside the
emqx_client. This hides the fact that the Pid was created, and when the
Pid dies, the caller would receive an message from a Pid it doesn' know about.
This change divived these 2 work into 2 APIs:
- `start_link/1` is to build and verify the options, and returns {ok,Pid}
(on success) or {error, Reason} (on failure).
- `connect/1` is to send MQTT CONNECT, and returns {ok, MQTTResult::properties()} or
{error, MQTTReason}. MQTT reason codes will contains in the `MQTTReason`.
2018-11-09 17:43:04 +08:00
terry-xiaoyu
2dc8ec8b11
Bridge via TLS
2018-11-09 17:43:04 +08:00
tigercl
3879dcdf59
Fix 'badarg' bug with duplicate subscriptions ( #1943 )
2018-11-08 23:02:35 +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
turtleDeng
0a337cbcb4
Merge pull request #1905 from emqx/Fix-for-mqtt-sn
...
Fix the init_proc_mng_policy bug
2018-11-05 22:30:51 +08:00
Gilbert Wong
4ea57c2bf9
Delete redundant case clauses in sendfun
...
Prior to this change, there are ok, {binary, _Data}. {datagram, _Peer,
_Dara} case clauses, and the {binary, _Data} and {datagram, _Peer,
_Data} are unnecessary cases
This change delete these two cases and add ok in the end of funtion in
send_fun of emqx_ws_connection.
2018-11-03 22:56:11 +08:00
terry-xiaoyu
92cc171aaf
Support tracing log files for specific topics or clients
2018-11-02 18:38:07 +08:00
terry-xiaoyu
94dbdffd59
New logger formatter with meta-data
2018-11-02 18:38:07 +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
tigercl
64cb920b3b
Merge branch 'emqx30' into improve_connect
2018-10-27 14:27:25 +08:00
周子博
3cea06f88f
Remove resume_session/1,
2018-10-27 14:25:10 +08:00
周子博
7c14ba11d6
Set some attributes when session resumed
2018-10-27 13:59:17 +08:00
turtleDeng
8788cb2158
Merge pull request #1921 from emqx/improve_test_cases
...
Improve test cases
2018-10-26 19:45:18 +08:00
周子博
881e1a9621
Add case for ets:match_object
2018-10-26 19:43:05 +08:00
周子博
92251d4a8a
Make more normalize
2018-10-26 17:45:13 +08:00
Gilbert Wong
f7285d5a58
Delete ackprops in pstate
...
Prior to this change, ackprops is duplicated with ack_props
This change delete ackprops.
2018-10-26 17:30:39 +08:00
tigercl
abb2e5c918
Improve test cases, and fix some bugs ( #1920 )
...
* Improve emqx_banned, emqx_pqueue, emqx_router test cases
* Improve emqx_broker test case, and fix bug in emqx_broker
* Add emqx_hooks to CT_SUITES
2018-10-26 17:27:02 +08:00
Gilbert
7544a21e25
Add test cases for emqx_bridge, emqx_mod_rewrite ( #1914 )
2018-10-26 14:04:33 +08:00
周子博
db2e47470a
Fix bugs
2018-10-25 16:19:57 +08:00
周子博
6675e3d496
Implement will message delay publish in session, add test case for clean start and will message in connect packet
2018-10-25 14:26:31 +08:00
Gilbert Wong
a1092a6784
Add eunit cases and fix typo.
2018-10-24 15:59:22 +08:00
周子博
540484e603
Send and cancel will message by apis rather than hook
2018-10-23 17:27:46 +08:00
Gilbert Wong
3f761cbe6a
Support use certifate as username
...
Prior to this change, you can just use CN or EN field from the client
certificate as username.
This change add a new option to allow user to use Certificate directly as
username.
2018-10-23 14:37:05 +08:00
Gilbert
58f5f3c51b
Merge branch 'emqx30' into Fix-for-mqtt-sn
2018-10-23 13:29:45 +08:00
Gilbert Wong
35460d8227
Refactor send_fun
2018-10-22 09:04:03 +08:00
tigercl
55a12c1ab4
Merge branch 'emqx30' into improve_connect
2018-10-19 16:03:17 +08: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
Gilbert Wong
30d986c318
Add warning log for unauthored subscribe
...
Prior to this change, there is no log for unauthored log, it is
difficult to find the problem when subscription error occured.
2018-10-19 01:19:14 +08:00
spring2maz
7e7d99fbad
Change more stats callbacks to full M:F/A
...
Including emqx_sm emqx_cm emqx_router_helper
2018-10-19 00:22:29 +08:00
spring2maz
4082f3ade2
Improve stats test
...
Before this change, the stats callback provided by emqx_broker_helper
was an anonymous function with module local context.
This commit changes it to a full fun M:F/A style callback for:
1. More robust to hot beam reload
2. Faster/smaller variable to construct
3. Easier test
2018-10-19 00:22:29 +08:00
Gilbert Wong
387f2468c0
Add SendFun case for emqx-sn
2018-10-18 15:01:45 +08:00
Gilbert Wong
df713959ab
Refactor init_proc_mng_policy.
...
If there is no zone, it is unnecessary to add proc_mng_policy.
2018-10-18 13:57:27 +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
Gilbert Wong
c890792613
Fix the init_proc_mng_policy bug
...
Prior to this change, when the plugin like emqx_sn_gateway which has
no zone run the init_proc_mng_policy function, it would trigger error
and application crash.
This change add a case to avoid crash.
2018-10-17 17:24:05 +08:00
周子博
29beb42aa2
Using client id rather then session pid
2018-10-10 14:00:17 +08:00
tigercl
40251a034c
Merge branch 'improve_connect' into emqx30
2018-10-09 18:03:22 +08:00
Gilbert Wong
d36a34fb59
Fix topic_name validation bug
...
Prior to this change, Prior to this change, the validation for the mqtt5.0 publish packet
which both contains zero-length topic name and topic alias is wrong.
2018-10-09 17:45:40 +08:00
周子博
b80ba6e458
Fix bug when ConnProps is undefined
2018-10-09 14:19:22 +08:00
周子博
9bcd4c3e08
improve will message
2018-10-09 13:35:27 +08:00
Gilbert Wong
52eae65983
Fix topic_name validation bug
...
Prior to this change, Prior to this change, the validation for the mqtt5.0 publish packet
which both contains zero-length topic name and topic alias is wrong.
This change fix this bug.
2018-10-08 20:02:32 +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
周子博
1705f25db6
Fix bug in session expiry interval
2018-09-29 21:30:22 +08:00
周子博
1638aff0f9
Remove duplicate match
2018-09-29 14:47:21 +08:00
周子博
59798762a9
Remove will message when received disconnect packet with reason code 0x00
2018-09-29 14:47:21 +08:00
周子博
2d354ca883
Improve topic alias maximum in connect packet
2018-09-29 14:47:21 +08:00
周子博
064db65206
improve receive maximum in connect packet
2018-09-29 14:47:21 +08:00
spring2maz
3bab3cbd2a
Shared subscriber should be keyed by SharedName + Topic
...
Prior to this change, if a producer session produces to two
or more shared subscriber groups, the previously picked subscriber
for sticky strategy may not be a valid member for the next group.
2018-09-28 09:37:51 +08:00
HuangDan
96b5d71a67
Fix args errors on emqx_hook:run('message.acked')
2018-09-27 11:49:23 +08:00
spring2maz
8a8729f9ea
Make rebar3 xref work.
...
Fixed a bad call in emqx_mod_subscription module
also commented out dead code for now in emqx_config.erl
2018-09-25 22:09:13 +08:00
HuangDan
5dfd431040
Fix typo
2018-09-22 19:40:07 +08:00
turtleDeng
925e98a3e5
Merge pull request #1823 from emqx/add-shared-sub-strategy
...
Add new shared subscription dispatch strategy
2018-09-22 19:30:08 +08:00
周子博
4336b7c9a0
Fix bug in issue#1848
2018-09-22 18:23:56 +08:00
turtled
5afaac4641
Add emqx_broker:subscribe/3 defult qos
2018-09-22 18:03:05 +08:00
spring2maz
b35d37c92d
Add new shared subscription dispatch strategy
...
'random' was already there before this change
Added two new strategies: 'sticky' and 'round_robin'
'sticky' is made default as it is the cheapest
2018-09-22 10:50:34 +02:00
turtleDeng
8f35d13e17
Improve bridges design ( #1849 )
...
Improve the design of bridges
2018-09-22 16:19:28 +08:00
turtled
475f2a87c6
Rm emqx_ctl set|show cmds
2018-09-22 16:17:21 +08:00
tigercl
03f607c1b2
Fix issue#1833 and #1834 ( #1845 )
2018-09-22 16:10:24 +08:00
turtleDeng
8653732bae
Revert "Calculate the 1.5 keep alive time exactly"
2018-09-22 14:52:31 +08:00
Feng Lee
02ddcf37cd
Merge branch 'emqx30' into more-gc-enforcement-policies
2018-09-22 06:35:11 +08:00
Feng Lee
ee7a7e2479
Fix typo
2018-09-22 06:05:29 +08:00
Feng Lee
33f9e895ad
Merge branch 'emqx30' into more-gc-enforcement-policies
2018-09-22 05:52:41 +08:00
Feng Lee
fbac9ce43e
Improve the foce_gc_policy config.
2018-09-22 05:42:38 +08:00
spring2maz
b61615323b
Move shutdown policy config to zone configs
2018-09-21 18:58:18 +02:00
spring2maz
f70d16e387
Add a test case to cover timeout message flush in emqx_misc
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
turtleDeng
98758752d4
Merge pull request #1839 from tigercl/emqx30
...
Calculate the 1.5 keep alive time exactly
2018-09-21 20:05:10 +08:00
terry-xiaoyu
389b3c80bc
Fix the message delivery to remote
2018-09-21 20:00:43 +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
spring2maz
e940c1c970
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-19 21:08:16 +02:00
HuangDan
3822ff987b
Fix function args
...
Add test cases for emqx_pool module
2018-09-18 09:15:46 +08:00
Feng Lee
ec061f7a21
Merge branch 'emqx30' of github.com:emqx/emqx into emqx30
2018-09-16 20:50:35 +08:00
Feng Lee
69e5869fa0
Add submit/2, async_submit/2 functions for emqx_pool module.
2018-09-16 20:49:47 +08:00
周子博
5eb92e37cc
Remove check for MQTT path, and normalize code
2018-09-14 11:49:17 +08:00
周子博
5465b015be
Add test case for last change
2018-09-14 11:49:17 +08:00
周子博
6f536eaac4
Add customized mqtt path for websocket
2018-09-14 11:49:17 +08:00
周子博
0c6a268539
Set default value of message expiry interval for not mqtt 5.0 message
2018-09-14 11:49:17 +08:00
周子博
88b3460715
Add feature for issue#1809
2018-09-14 11:49:17 +08:00
Gilbert Wong
45b2686e1c
Delete unnecessary code
...
Prior to this change, there are multiple deprecated functions.
2018-09-14 09:45:34 +08:00
HuangDan
fde6a2a4c3
Fixed issue #1811
...
Add tests case for issue #1811
2018-09-13 22:55:15 +08:00
spring2maz
8db9f3e81d
Update & clarify module doc for emqx_mqueue.erl
2018-09-13 09:08:07 +08:00
spring2maz
0c39a7620e
Rebar3 and erlang.mk dual support. ( #1806 )
...
* Rebar3 and erlang.mk dual support.
There was only erlang.mk support prior to this change.
The main reasons for this dual support are:
* Cover report upload can only be done by rebar3 in travis.ci
* We want to prepare for the future to build emqx releases using rebar3
* We do not want to stop supporting erlang.mk in one single step
* Add depencency version consistency check between erlang.mk and rebar.config
2018-09-09 21:51:42 +08:00
周子博
3caa41f751
Add run hook when duplicated subscription
2018-09-08 19:01:03 +08:00
周子博
23c91c0a40
no message
2018-09-08 18:31:44 +08:00
周子博
40977e529a
Retain flag in retained message must set to 1
2018-09-08 18:31:44 +08:00
Gilbert Wong
78020de302
fix pattern match bu
...
Prior to this change, when packet have topic alias, the check_pub_caps
function could not be matched correctly
This change fix this bug.
2018-09-08 12:50:14 +08:00
Gilbert Wong
2d10d6971d
add pattern match for topic alias
...
Prior to this change, it assume that topic_alias exists defaultly
which may cause the unexpected bug
This change fix this bug above
2018-09-08 12:01:22 +08:00
terry-xiaoyu
2121da3755
Ignore Will-Delay-Interval = 0
2018-09-08 10:10:22 +08:00
turtleDeng
0ec461484e
Merge pull request #1790 from emqx/emqx30-feng
...
Improve the Hooks' design
2018-09-07 21:46:30 +08:00
turtleDeng
66e9f9b02a
Merge pull request #1789 from Gilbert-Wong/emqx30
...
Check topic alias
2018-09-07 21:44:20 +08:00
turtleDeng
5ca61dd45c
Merge pull request #1788 from tigercl/emqx30
...
Support retain as published in subscription options
2018-09-07 21:43:56 +08:00
Gilbert
84e43c587d
Merge branch 'emqx30' into emqx30
2018-09-07 18:49:11 +08:00
周子博
6f6e24592b
Fix the reverse match
2018-09-07 18:32:03 +08:00
turtleDeng
ba176f2073
Merge pull request #1797 from terry-xiaoyu/banned_api_v2
...
Update for banned API
2018-09-07 17:50:30 +08:00
周子博
1326e89593
Fix a bug in emqx_protocol.erl
2018-09-07 15:16:32 +08: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
周子博
f8471afb97
Add handling of retain handling subscription option
2018-09-07 13:50:12 +08:00
Feng Lee
304a24ca6a
Code Review: Update the zone module
...
1. Add force_reload/0 management API
2. Change the reload interval to 5 minutes
2018-09-07 10:26:14 +08:00
Feng Lee
d9ad29476a
Code Review: Update the zone module
...
1. Add force_reload/1 API
2. Change the default reload interval to 5 minutes
2018-09-07 10:23:43 +08:00
周子博
d819ec0b58
Comment unused function in emqx_frame.erl
2018-09-07 10:18:21 +08:00
Gilbert Wong
765ab5ad7b
Add condition to handle when mqx_topic_alias do not exist
2018-09-06 19:09:29 +08:00
Feng Lee
328d035dab
Replace 'state' record with map
2018-09-06 18:43:47 +08:00
周子博
f95c82e37a
Add metric for DISCONNECT packet
2018-09-06 18:14:14 +08:00
Feng Lee
edf654727c
Rename emqx_mqtt_properties module to emqx_mqtt_props
2018-09-06 18:09:22 +08:00
Feng Lee
d99d0a22d0
Rename 'ignore' to 'ignored'
2018-09-06 17:54:32 +08:00
周子博
917eb8e29f
Make DISCONNECT packet with reason code 0x00 when this packet doesn't have payload
2018-09-06 17:17:09 +08:00
Feng Lee
2a75105580
Improve the Hooks's design
2018-09-06 16:27:16 +08:00
Gilbert Wong
c145cb89f4
add validate_properties for PUBLISH and fix error for SUB
2018-09-06 15:45:18 +08:00
周子博
42b3c9b4d6
Send DISCONNECT packet with reason code PROTOCOL_ERROR when topic is empty, add checks for topics
2018-09-06 14:47:34 +08:00
Gilbert Wong
9189d4ff41
catch topic_alias_invalid reasoncode
2018-09-06 14:24:07 +08:00
Gilbert Wong
876a983e93
Pub Packet delivered from client to server cannot contain sub id
2018-09-06 13:37:26 +08:00
Feng Lee
5e3aed0b73
Add ok_or_error/1 type
2018-09-06 09:10:47 +08:00
Feng Lee
4635921458
Rewrite the hooks module
2018-09-05 23:21:06 +08:00
Gilbert Wong
c8b92a59b1
check topic alias
2018-09-05 19:06:34 +08:00
周子博
9029ee29d3
Drop will msg when receive the DISCONNECT packet whose reason code is equal to 0x00
2018-09-05 18:03:28 +08:00
周子博
47955f4309
fix bug in retain as published flag
2018-09-05 15:18:26 +08:00
周子博
aa34258f1e
Support Retain As Published in Subscription Options
2018-09-05 14:25:33 +08:00
周子博
f0f818ab1a
Fix bug in emqx_frame
2018-09-05 10:28:49 +08:00
Feng Lee
96122cf966
Rename 'already_existed' to 'already_exists'
2018-09-04 19:14:25 +08:00
周子博
842f4fbf13
Crash when reserved flag in CONNECT packet doesn't equal to 0, and remove repeated check for protocol version
2018-09-04 11:16:15 +08:00
chenyy
abc6081282
fix error spelling word
2018-09-01 11:54:28 +08:00
terry-xiaoyu
ec456dcc73
Fix dialyze issue
2018-08-31 20:48:57 +08:00
terry-xiaoyu
3f42f1271b
bug fix
2018-08-31 18:14:10 +08:00
Feng Lee
880c6ab5fe
Fix typo
2018-08-31 17:27:36 +08:00
Feng Lee
ec7b39f3fd
Merge pull request #1777 from emqtt/emqx30-dialyzer
...
Add banned support, and fix dialyzer errors
2018-08-31 16:58:57 +08:00
Feng Lee
7c45d988f2
Update the spec of deliver/2 function
2018-08-31 16:57:43 +08:00
Feng Lee
ea1ae70833
Fix errors found by dialyzer
2018-08-31 16:46:51 +08:00
Gilbert Wong
e6fd7faa4b
add format_variable for disconnect packet
2018-08-31 16:24:10 +08:00
Feng Lee
3045ec10ab
Add banned feature
2018-08-31 14:04:26 +08:00
Feng Lee
237e65a4e0
Use emqx_mqueue:init/1 to create a mqueue
2018-08-31 10:22:16 +08:00
terry-xiaoyu
23e72feab7
fix reason codes
2018-08-31 01:54:25 +08:00
terry-xiaoyu
9406bc1fd1
fix typo
2018-08-31 01:39:56 +08:00
Feng Lee
aa1334313c
Merge branch 'emqx30' of github.com:emqtt/emqttd into emqx30
2018-08-31 01:22:55 +08:00
Feng Lee
25391e8c71
Rename 'Subscription-Identifiers-Available' to 'Subscription-Identifier-Available'
2018-08-31 01:22:03 +08:00
Gilbert Wong
748826bdee
update access sutie and access control
2018-08-31 01:16:54 +08:00
Feng Lee
dc9a1cd80f
Format emqx_protocol module
2018-08-31 00:48:23 +08:00
Feng Lee
1574d85570
Merge pull request #1775 from emqtt/emqx30-feng
...
Support server_keepalive and CONNACK properties
2018-08-31 00:45:51 +08:00
Feng Lee
07f13db453
Fix conflict
2018-08-31 00:41:48 +08:00
Feng Lee
b6006b5947
Support CONNACK properties
2018-08-31 00:40:10 +08:00
Gilbert Wong
1c94566141
add topic alias validate
2018-08-30 23:49:08 +08:00
Feng Lee
3131acd3bc
Merge branch 'emqx30' into emqx30-feng
2018-08-30 23:41:26 +08:00
Feng Lee
674b55e6e7
Merge pull request #1773 from tigercl/emqx30
...
Add emqx_banned test suite, and fix bugs in emqx_banned
2018-08-30 23:35:15 +08:00
Feng Lee
0379219a04
Improve the design of session discard
2018-08-30 23:14:09 +08:00
周子博
83e11b6e39
Add emqx_banned test suite, and fix bugs in emqx_banned
2018-08-30 22:45:08 +08:00
terry-xiaoyu
fb8a86c5e0
delayed will message
2018-08-30 21:58:02 +08:00
terry-xiaoyu
cf0f55d057
delayed will message
2018-08-30 21:44:00 +08:00
Feng Lee
4a1fdddc31
Merge pull request #1771 from emqtt/emqx30-feng
...
Only store packet_id and timestamp for qos2 message
2018-08-30 21:26:01 +08:00
Feng Lee
78a8ccd0f2
Only store packet_id and timestamp for qos2 message
2018-08-30 21:17:20 +08:00
Feng Lee
dd7f0dec3c
Add 'messages/qos2/expired' counter
2018-08-30 21:01:09 +08:00
Gilbert Wong
2fc41b6935
fix reason code name for mqtt 4
2018-08-30 19:09:22 +08:00
Feng Lee
cae673cf5e
Fix update_expiry/1 function_clause
2018-08-30 18:59:47 +08:00
Feng Lee
826daace61
Align the state record
2018-08-30 18:44:58 +08:00
Feng Lee
c49e5dfddc
Merge branch 'emqx30' into emqx30-feng
2018-08-30 18:42:29 +08:00
Feng Lee
553a60cdec
Update 'Message Expiry Interval' property before delivering a PUBLISH
2018-08-30 18:31:37 +08:00
Feng Lee
7b5f2577d3
Support message ttl and expiration
2018-08-30 18:30:33 +08:00
Feng Lee
1f2bbe3eb8
Support priority queue
2018-08-30 18:29:20 +08:00
Feng Lee
a67958adb4
Add 'messages/expired' counter
2018-08-30 18:28:40 +08:00
Feng Lee
021d43755f
Add update_expiry/1 function
2018-08-30 18:28:02 +08:00
terry-xiaoyu
8a5519cafa
attrs for ws_connection
2018-08-30 14:32:31 +08:00
Gilbert Wong
b0ed953708
fix emqx_session:unsubscribe bug
2018-08-30 13:56:55 +08:00
Feng Lee
2ccec1f719
Merge branch 'emqx30' into emqx30-feng
2018-08-30 11:54:49 +08:00
Feng Lee
2342a7db6d
Rename 'Pid' to 'ConnPid'
2018-08-30 11:48:49 +08:00
Feng Lee
2db64cf53c
Support 'Message-Expiry-Interval property
2018-08-30 11:42:24 +08:00
Feng Lee
2351b41f11
Add is_expired/1, check_expiry/1, check_expiry/2
2018-08-30 11:40:53 +08:00
turtled
d3ed0853ef
Rename bridge module
2018-08-30 10:41:04 +08:00
Feng Lee
da1285ad3c
Merge branch 'emqx30' into emqx30-feng
2018-08-30 09:45:29 +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
98824a56c2
Remove emqx_flow_control module
2018-08-30 00:28:11 +08:00
Feng Lee
22f8302f98
Merge branch 'emqx30-feng' of github.com:emqtt/emqttd into emqx30-feng
2018-08-30 00:03:59 +08:00
Feng Lee
a282c7625e
Add properties for delivered messages
2018-08-30 00:03:38 +08:00
Feng Lee
8492513094
Merge branch 'emqx30' into emqx30-feng
2018-08-29 23:11:24 +08:00
Feng Lee
567aeb274f
Define types in emqx_types, emqx_mqtt_types modules
2018-08-29 23:08:55 +08:00
turtled
98698d318f
ws disconnect call emqx_protocol:shutdown
2018-08-29 21:39:09 +08:00
turtled
d6f3ae640d
Merge branch 'emqx30' of https://github.com/emqtt/emqttd into emqx30
2018-08-29 20:29:12 +08:00
turtled
1629215b18
Fix hook args bug
2018-08-29 20:29:03 +08:00
周子博
f4330b8af3
Add some test suites and fix bugs
2018-08-29 19:19:22 +08:00
Feng Lee
2dc8f9c4c5
Merge branch 'emqx30-feng' of github.com:emqtt/emqttd into emqx30-feng
2018-08-29 17:55:13 +08:00
Feng Lee
e62d215792
Shutdown and reboot ranch application
2018-08-29 17:52:55 +08:00
Feng Lee
465963fec3
Merge branch 'emqx30' into emqx30-feng
2018-08-29 17:36:38 +08:00
Feng Lee
1a7d60a7e3
Improve the hooks design for emqx 3.0
2018-08-29 17:27:56 +08:00
terry-xiaoyu
c967db409f
EMQX 3.0 UT
2018-08-29 15:50:56 +08:00
turtled
dae81037bf
Update share_sub dispatch
2018-08-29 12:58:55 +08:00
turtled
9711892f73
Fix share_sub disconnect not clear route bug
2018-08-29 10:58:34 +08:00
turtled
af21cdfd1b
Rm tmp var
2018-08-29 10:08:15 +08:00
turtled
00cb26c4e0
Support ws mqtt any version
2018-08-29 10:00:41 +08:00
turtled
013a5a9c7c
Fix emqx_protocol:clientid undefined
2018-08-29 09:30:18 +08:00
Feng Lee
594819b752
Upgrade the publish sequence of QoS1/2 messages
2018-08-29 02:53:22 +08:00
Feng Lee
1cf4532947
Add emqx_mountpoint module
2018-08-28 20:40:31 +08:00
周子博
545e80cd6b
Add some test suites
2018-08-28 17:53:03 +08:00
Feng Lee
8e11845f87
Remove ignore_loop_deliver option
2018-08-28 07:36:22 +08:00
terry-xiaoyu
c92eba4a5e
bug fixes during UT
2018-08-28 00:27:45 +08:00
Gilbert
88d867b256
Merge pull request #1750 from Gilbert-Wong/emqx30
...
update emqx_broker_suite to adapt emqx 3.0 broker
2018-08-27 21:56:00 +08:00
Feng Lee
475319b907
Merge emqx30-feng branch
2018-08-27 21:36:43 +08:00
Feng Lee
1607e576de
Update connection, session, stats modules
2018-08-27 21:34:11 +08:00
Gilbert Wong
ce3f2e4d9e
fix emqx_broker test suite
2018-08-27 21:18:00 +08:00
Gilbert Wong
015901050f
change return tuple of close_session
2018-08-27 18:19:28 +08:00
Gilbert Wong
224aaaf8a7
unsubscribe function should have two params
2018-08-27 17:11:54 +08:00
Gilbert Wong
c5da439313
wrong unsubscribe call
2018-08-27 16:41:58 +08:00
Feng Lee
d167a5c99a
Merge pull request #1748 from emqtt/emqx30-feng
...
Improve the emqx_listeners module
2018-08-27 16:24:59 +08:00
Feng Lee
a19daee353
Improve the print of listener startup
2018-08-27 16:19:58 +08:00
turtled
35d821a62e
Add WS stats
2018-08-27 16:15:23 +08:00
Feng Lee
42288ac412
The ACL file should not be undefined
2018-08-27 15:57:13 +08:00
Feng Lee
dca292f538
Replace 'Client' with 'Credentials' map
2018-08-27 15:54:41 +08:00
Gilbert
a183693ac8
Merge pull request #1747 from Gilbert-Wong/emqx30
...
fix subscribe bugs and update emqx_mock_client
2018-08-27 15:36:13 +08:00
Gilbert Wong
087bfe80c8
fix unsubscribe emqx_mock_client error
2018-08-27 15:24:40 +08:00
turtled
91eb79967c
Add syslog
2018-08-27 13:50:38 +08:00
Gilbert Wong
28e22825ba
fix emqx subscriptions error
2018-08-27 12:35:36 +08:00
Gilbert Wong
f0f1456168
fix duplicated subscribers with same topic
2018-08-27 11:21:16 +08:00
Feng Lee
6d2b31911a
Merge pull request #1746 from emqtt/emqx30-feng
...
Use map to replace #state{} record
2018-08-27 10:35:43 +08:00
turtled
6478f811bf
Fix conflicts
2018-08-27 10:29:22 +08:00
Feng Lee
6e8635394e
Use map to replace #state{} record
2018-08-27 10:25:15 +08:00
turtled
95d36d0204
Fix share sub bug
2018-08-27 10:15:41 +08:00
turtled
1448515e64
Fix websocket bug
2018-08-27 10:14:58 +08:00
Feng Lee
5f65335835
Merge branch 'emqx30' into emqx_30_acl_cache_v2
2018-08-27 09:42:42 +08:00
Feng Lee
3f811aa9ca
Add credentials/1 function
2018-08-27 09:28:49 +08:00
Gilbert Wong
a369fb6960
fix subscribe bug
2018-08-26 22:02:39 +08:00
terry-xiaoyu
9d29dd0e10
use config enable_acl_cache
2018-08-26 18:25:17 +08:00
Feng Lee
397179bbda
Merge branch 'emqx30' of github.com:emqtt/emqttd into emqx30
2018-08-26 16:25:02 +08:00
Feng Lee
0e3728c940
Add emqx_types module and 'credentials' type
2018-08-26 16:24:51 +08:00
terry-xiaoyu
9717f9b83e
add module emqx_acl_cache
2018-08-26 15:46:22 +08:00
terry-xiaoyu
8cd20744be
improve cache datastruct using keys-queue
2018-08-26 13:33:00 +08:00
terry-xiaoyu
a904031979
acl cache using proc_dict
2018-08-26 13:30:18 +08:00
terry-xiaoyu
737fe19331
update acl test cases
2018-08-26 12:48:32 +08:00
Gilbert Wong
ee11627828
delete duplicated subscribe function
2018-08-25 18:36:17 +08:00
Gilbert Wong
8b4be236e5
fix list_to_subid error
2018-08-25 17:10:51 +08:00
Feng Lee
36129073e8
Merge branch 'emqx30-dev' of github.com:emqtt/emqttd into emqx30-dev
2018-08-25 16:08:27 +08:00
Feng Lee
b7c2821326
Make reason codes of SUBACK be compatible with MQTT V3.1.1
2018-08-25 16:07:57 +08:00
Feng Lee
c2c1320083
Update compat/2 for suback reason codes
2018-08-25 16:05:58 +08:00
Feng Lee
612c88e71e
Add 'rc' and 'subid' fields
2018-08-25 16:04:21 +08:00
Feng Lee
1aee05ce16
Fix unsubscribe bug
2018-08-25 16:03:28 +08:00
turtled
892483891a
Merge branch 'emqx30-dev' of https://github.com/emqtt/emqttd into emqx30-dev
2018-08-25 14:32:48 +08:00
turtled
fc0f57073d
Fix share sub dispatch fail
2018-08-25 14:32:32 +08:00
Feng Lee
5f42f88401
Pass paho zero_length_clientid test case
2018-08-25 11:51:36 +08:00
Feng Lee
68cfcf6e0e
Pass paho mqtt interoperability tests
2018-08-24 23:19:11 +08:00
Feng Lee
694485252a
Merge branch 'emqx30-dev' of github.com:emqtt/emqttd into emqx30-dev
2018-08-24 18:43:36 +08:00
Feng Lee
0f052ce352
Upgrade connection, protocol and session modules for MQTT 5.0
2018-08-24 18:39:59 +08:00
turtled
36647b641f
Fix select emqx_shared_subscription fail
2018-08-24 11:38:54 +08:00
Petr Gotthard
d4176461ff
Send client_pid to distinguish multiple clients
...
When a controlling process starts multiple clients that make multiple
subscriptions it may be desirable to identify from which client a
message is comming from. The topic id may not be sufficient.
2018-08-20 11:58:19 +02:00
turtled
22e8b07a3d
Receive/send messages by bridge
2018-08-19 20:31:44 +08:00
Feng Lee
c9d604ed02
Fix the badmatch error of packet_to_msg/1
2018-08-13 16:49:53 +08:00
Feng Lee
9145fb9ec8
Use os:timestamp/1 to get now millseconds
2018-08-12 19:14:14 +08:00
Feng Lee
f80cd2d986
Improve the MQTT over Websocket connection
2018-08-11 17:57:19 +08:00
Gilbert Wong
3d05954d5b
Optimize emqx_time module
2018-08-11 16:17:39 +08:00
turtled
d516b8c241
mochiweb -> cowboy
2018-08-09 15:19:45 +08:00
Feng Lee
919eb9fa1e
Use cowboy to replace minirest
2018-08-09 14:27:49 +08:00
Feng Lee
e23a6e87d8
Merge listeners, zones, bridges config
2018-08-08 19:37:57 +08:00
Feng Lee
4005d58166
Move the 'rate_limit' option from zone to listener
2018-08-08 19:31:25 +08:00
turtled
b5a1960b63
Stop emqx_ws
2018-08-08 18:42:11 +08:00
turtled
4d9e03a803
Refactor websocket conn using cowboy
2018-08-08 18:36:14 +08:00
Feng Lee
8418be0a5b
Use the new emqx_session:unsubscribe/2 API
2018-08-07 11:00:04 +08:00
Gilbert Wong
96d251ec3c
Add encode and decode options and test suites
2018-08-07 10:27:04 +08:00
Gilbert Wong
79481db659
Enhance base62 encode/decode Funs
2018-08-06 23:45:27 +08:00
Feng Lee
645c971a07
Fix QoS tuning
2018-08-06 17:09: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
83dee0e340
Rename emqx_alarm to emqx_alarm_mgr
2018-07-19 10:53:41 +08:00
Feng Lee
eeeed35e2a
Remove the alarm_fun arg from emqx_mqueue:new/3
2018-07-19 10:46:05 +08:00
Feng Lee
4297033415
Fix undefined emqx_vm:schedulers/1
2018-07-19 10:19:25 +08:00
Feng Lee
7ee54aac28
Add 'qos' field to message record
2018-07-18 23:41:00 +08:00
Feng Lee
6c58bbab2b
Remove emqx_lager_backend module
2018-07-18 23:29:38 +08:00
Feng Lee
ca4cdfe4ee
Move the passwd_hash/2 function to emqx-passwd project
2018-07-18 23:29:20 +08:00
Feng Lee
62aa072f2f
Upgrade for MQTT Version 5.0 and Erlang/OTP R21
2018-07-18 13:43:17 +08:00
chenyy
6f405dc128
remove ?MODULE because we don’t need it
2018-06-29 15:10:12 +08:00
Feng Lee
385c7cd3e6
Remove 'tuple call' and be compatible with Erlang/OTP R21
2018-06-29 12:26:30 +08:00
Feng Lee
1de94b6858
Register the default ACL module in emqx_access_control
2018-06-21 22:40:30 +08:00
Feng Lee
b733a3bcfb
Throw mqtt_frame_too_large exception if the sent frame is too large
2018-06-12 12:10:53 +08:00
Feng Lee
5d45d40db5
Rename emqx_mqtt module to emqx_listeners
2018-06-12 10:04:01 +08:00
Feng Lee
055de617fc
Add emqx_message:make/4 and fix whitespace
2018-05-31 21:57:17 +08:00
Feng Lee
bffdd2ba74
Upgrade esockd and add more test cases
2018-05-22 13:01:19 +08:00
Feng Lee
bf253ab9b3
Support batch delete
2018-05-10 22:03:59 +08:00
Feng Lee
c11e8f453b
Add test cases for MQTT 5.0 frame
2018-05-09 00:42:41 +08:00
Feng Lee
31bc091873
Implement MQTT Version 5.0 client
2018-05-06 17:45:18 +08:00
Feng Lee
1fe28a7aef
Update merge_opts/2 function
2018-04-30 12:36:17 +08:00
Feng Lee
1630f7c9b8
Add validate/1 function
2018-04-30 12:33:29 +08:00
Feng Lee
dc7804a2dc
Support MQTT Version 5.0 Client
2018-04-30 12:27:39 +08:00
Feng Lee
16426346bb
Fix whitespace
2018-04-24 17:31:31 +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
bcdcb30af5
Merge branch 'emqx30' of github.com:emqtt/emqttd into emqx30
2018-04-09 14:32:58 +08:00
Feng Lee
a902f508b5
Use emqx_config:get_env/1 to read env
2018-04-09 14:32:49 +08:00
Feng Lee
c194e82807
Export dispatch/2, dispatch/3 for RPC
2018-04-09 14:31:34 +08:00
Feng Lee
71acf91ace
Replace lager with emqx_log
2018-04-09 12:34:53 +08:00
Feng Lee
5f32f3c560
Pass the paho interoperability tests
2018-04-08 16:37:30 +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
6459481024
Add multicall/4 function
2018-04-03 20:22: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
f007f69abe
Update emqx.app.src
2018-03-23 16:45:50 +08:00
Feng Lee
56b88dd7f7
Improve the design of session management
2018-03-23 16:39:23 +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
f218c6a35d
Add a locker module
2018-03-10 13:28:14 +08:00
Feng Lee
22350f9117
Depends on canel-lock library
2018-03-09 13:26:46 +08:00
Feng Lee
6a957e1b33
Support MQTT Version 5.0
2018-03-02 20:18:27 +08:00
Feng Lee
d7eae533ac
Merge the emqx-mqtt5 library
2018-02-28 21:22:39 +08:00
Feng Lee
f7f0f27e4d
Parse and serialize MQTT 5.0 protocol packets
2018-02-27 23:45:55 +08:00
Feng Lee
a8aeb5ac17
Rename the 'mqtt_route' record to 'route'
2018-02-27 09:13:14 +08:00
Feng Lee
f4fd6efe16
Merge the emqx-common, emqx-router libraries
2018-02-26 23:29:53 +08:00
Feng Lee
d5893ba2be
Replace gen_server2 with gen_server for we cannot trace the size of drain queue
2018-02-26 13:24:29 +08:00
Feng Lee
fcb2ec8427
Merge the latest enterprise branch
2018-02-24 15:56:32 +08:00
Feng Lee
b63c34ab14
Merge the latest master branch
2018-02-24 11:27:09 +08:00
Feng Lee
a22e225e67
Merge pull request #1475 from HJianBo/develop
...
Fix #1473 for supporting special chars in URL path
2018-01-28 15:32:56 +08:00
Feng Lee
707d338b0e
Merge branch 'develop' into ws-proxy
2018-01-28 15:11:08 +08:00
HeeeJianBo
3146cdda92
Fix #1473 for supporting special chars in URL path
2018-01-28 14:25:41 +08:00
Feng Lee
0f717e5b3b
Merge branch 'develop' of github.com:emqtt/emqttd into develop
2018-01-23 11:10:27 +08:00
Feng Lee
701c632e07
Fix issue #1461 - keep the retain flag for new subscription
2018-01-23 11:09:42 +08:00
Feng Lee
a3e97f798b
Update Copyright to 2018
2018-01-16 08:57:46 +08:00
Feng Lee
56195670c6
Misc fix
2018-01-12 10:45:36 +08:00
Feng Lee
bfa9fc675c
Merge pull request #1420 from HJianBo/issue_1216
...
Fix issue #1216
2018-01-07 14:02:54 +08:00
Feng Lee
fdc55de509
Change the type of 'mqtt.bridge.ping_down_interval' to ms duration
2018-01-04 16:09:45 +08:00
Feng Lee
86fc80b983
Change the type of 'mqtt.broker.sys_interval' to ms duration
2018-01-04 16:09:10 +08:00
turtled
0a7e93ea90
Export funtion fix #1428
2018-01-03 10:29:51 +08:00
turtled
ad26eff421
Format print log
2018-01-03 10:27:51 +08:00
HeeeJianBo
5fbbff46b1
Fix issue #1216 , redeliver pubrel packet now
2017-12-28 17:57:32 +08:00
Feng Lee
953a7628a3
Version 2.3.3
2017-12-28 11:34:29 +08:00
HeeeJianBo
4c8b43e05d
Improve impletament of emqttd_topic:match/2
2017-12-27 15:11:55 +08:00
HeeeJianBo
d5c54276e2
Fix issue #1398
2017-12-27 14:55:36 +08:00
Feng Lee
bcec25092b
Merge version 2.3.2 to X edition
2017-12-26 21:09:24 +08:00
Feng Lee
db954aeb6d
Support X.509 certificate based authentication with HAProxy
2017-12-15 19:23:50 +08:00
Feng Lee
6f64eb469c
Remove emqttd_ssl.erl
2017-12-07 17:58:24 +08:00
Feng Lee
b98007659e
Merge the master branch
2017-12-07 17:57:18 +08:00
Feng Lee
73836939c8
Support for TLS with client certificate based authentication
2017-12-07 17:42:32 +08:00
Feng Lee
6e5134a8b2
Merge with the enterprise edition
2017-12-07 16:24:48 +08:00
Feng Lee
f1640f5b85
Merge emq24 to X branch
2017-12-07 11:02:44 +08:00
Feng Lee
9f1c3a5899
Compatible with esockd 4.x
2017-12-06 14:42:26 +08:00
turtled
bcf345efbe
Fix compile fail
2017-12-06 10:27:55 +08:00
turtled
ddf2965651
Rm emqttd.app.src
2017-12-06 10:26:19 +08:00
turtled
24f05adb1a
Fix compile fail
2017-12-06 10:19:46 +08:00
Feng Lee
c3c5589452
Version 2.3.2
2017-12-06 10:01:42 +08:00
Feng Lee
51533dbe9e
Shutdown the connection if an error occurred when sending data
2017-12-05 23:41:40 +08:00
turtled
a42fcb2c39
Fix conflicts
2017-12-05 16:34:18 +08:00
HuangDan
b8e0a4d5c4
Bump version to 2.3.1
2017-12-03 00:43:42 +08:00
Feng Lee
0fe530a502
Depends on the develop branch of mochiweb
2017-12-02 18:00:56 +08:00
Feng Lee
4915195b1e
Fix issue #1335 - Forward real client IP using a reverse proxy for websocket
2017-12-02 17:59:16 +08:00
HeeeJianBo
70570dd943
Merge branch 'develop' into ws_proxy
2017-12-01 22:22:20 +08:00
HeeeJianBo
5006dbba6e
Add ws/wss proxy cofingurations for getting client original ip address
2017-12-01 22:12:27 +08:00
Feng Lee
c308037b1a
Remove the unnecessary transactions to optimize session management
2017-12-01 17:16:59 +08:00
Feng Lee
d2a4e2c615
Should not exit arbitrarily if clientid conflicts in mnesia
2017-12-01 15:46:42 +08:00
Feng Lee
d9500412bf
Update the topic's statistics
2017-12-01 09:10:46 +08:00
Feng Lee
ee5c33d0bd
Fix the 'no function clause' exception for issue #1293
2017-11-29 22:23:59 +08:00
Feng Lee
26fb809dbe
Fix issue#1293 - the retained flags should be propagated for bridge.
2017-11-29 14:09:46 +08:00
Feng Lee
223f3d4da5
Remove RPC configurations
2017-11-22 16:44:00 +08:00
Feng Lee
38c33e9c8b
Merge with emqx
2017-11-21 22:41:05 +08:00
Feng Lee
845c5eddc1
Merge with emqx
2017-11-21 22:41:02 +08:00
Feng Lee
e52c303014
Merge develop to X
2017-11-21 14:25:35 +08:00
Feng Lee
2cec86eba7
Merge with version 2.3.0
2017-11-21 14:14:12 +08:00
Feng Lee
db3a54e31a
Fast close the invalid websocket in init/1 function
2017-11-20 14:15:51 +08:00
Feng Lee
14771cdaee
Fix issue #1340 - erlang:demonitor/1 the reference when erasing the monitor
2017-11-20 10:10:32 +08:00
Feng Lee
6028d6e83e
Show local route
2017-11-19 14:25:54 +08:00
Feng Lee
945f925136
Refactor the subscription_list function
2017-11-19 01:15:22 +08:00
turtled
8462fa8e89
Display local route
2017-11-18 17:21:13 +08:00
Feng Lee
f01deec950
Update the 'api/v2/subscriptions' API
2017-11-18 13:23:51 +08:00
Feng Lee
1d0e17b89c
Improve the print of 'subscriptions' CLI
2017-11-18 12:25:00 +08:00
Feng Lee
d58b8bed3c
Fix the 'subscriptions add <ClientId> <Topic> <Qos>' CLI
2017-11-18 11:48:44 +08:00
Feng Lee
405d5d9d29
Fix the 'subscriptions' CLI
2017-11-18 11:17:19 +08:00
Feng Lee
11a41166d2
Fix the function spec: '{error, any()}' -> '{error, term()}'
2017-11-17 21:13:20 +08:00
Feng Lee
62d4f9f031
Bump version to 2.3.0
2017-11-17 20:53:07 +08:00
Feng Lee
8f00e28576
Improve the pubsub design and fix the race-condition issue
2017-11-17 20:51:51 +08:00
HeeeJianBo
cae743803b
Improve the process logic of DUP flag ( #1319 ).
2017-11-03 17:49:52 +08:00
HeeeJianBo
279b96f146
Fix issue #1319 , reset DUP=0 when recv DUP=1 PUBLISH Message
2017-11-02 09:48:37 +08:00
Feng Lee
49d91cf694
Rename 'message.offline' hook to 'message.dropped'
2017-10-31 15:19:53 +08:00
HeeeJianBo
84d8eae37e
Fixed issue #1314 . re-sent retained messages when create/replace Subscription
...
- re-sent message when create a new Subscription relationship
- re-sent message when replace an existed Subscription with different Qos
2017-10-31 13:23:54 +08:00
turtled
586c3a243a
Fix retained message is not sent for Subscribe to existing topic
2017-10-28 22:07:06 +08:00
HuangDan
c87c49ede0
Updated trace logging level
2017-10-21 14:49:56 +08:00
HuangDan
c43cae4348
Bug fixed for users api
2017-10-11 20:08:01 +08:00
Feng Lee
2354a3dd5d
Fix the building errors
2017-10-10 15:50:40 +08:00
turtled
5d30ceccd1
Fix passwd_hash return type error
2017-10-10 14:15:53 +08:00
Feng Lee
735211fd02
Merge with EMQ X project
2017-10-09 23:29:05 +08:00
Feng Lee
4b8cd18f5d
Merge with EMQ X project
2017-10-09 19:43:06 +08:00
turtled
54534967bd
Fix Dashboard not showing data
2017-10-09 18:08:46 +08:00
turtled
88c77cf4c2
Auth failure not publish the will message
2017-10-09 18:07:09 +08:00
turtled
d9f14dacaf
Fix dashboard not showing data bug
2017-09-25 14:59:58 +08:00
turtled
e57121a660
Fix string:split undefined issue
2017-09-12 21:34:43 +08:00
turtled
f6025404e3
Update clean_acl_cache API
2017-09-12 10:57:04 +08:00
turtled
ee9fc5cb0e
Review code
2017-09-09 21:21:30 +08:00
turtled
424aea2878
Review code
2017-09-09 21:00:17 +08:00
turtled
8091c07d3c
Review code
2017-09-09 20:55:57 +08:00
turtled
85f9a8cb70
Fix read plugin configuration not find schema file
2017-09-08 23:23:48 +08:00
turtled
7260b17cb5
Plugins configuration insert to ets table
2017-09-06 17:17:29 +08:00
turtled
d3f52898ee
Add Hot configuration plugin
2017-09-05 16:52:07 +08:00
turtled
ed29c3273d
Review code
2017-08-21 16:16:28 +08:00
turtled
9a4a6885d9
Update api list
2017-08-21 15:09:45 +08:00
turtled
5bec24d19b
Update modify_config url
2017-08-18 23:28:33 +08:00
turtled
f6b9ce84e5
Update kick_client API
2017-08-18 11:44:11 +08:00
turtled
9e6c63b91b
REST API add modify_config/config_list
2017-08-17 15:51:20 +08:00
turtled
d50ce9f6c0
Fix compile warning
2017-08-16 12:10:46 +08:00
turtled
4ff7d4eead
Fix ctl set env fail
2017-08-16 11:25:11 +08:00
turtled
34e5d746d1
Fix compile fail
2017-08-15 12:33:09 +08:00
turtled
303db5ccbd
Add clean_acl_cache API
2017-08-15 12:18:31 +08:00
Feng Lee
f978bae86a
TODO: How to persist the configuration
2017-08-14 09:32:39 +08:00
turtled
64af3271c2
Fix rest_api get monitoring/nodes error
2017-08-12 22:00:33 +08:00
Feng Lee
f28db8b4c7
Format code
2017-08-12 12:51:02 +08:00
HuangDan
9b61fea1d1
Update auth spec
2017-08-11 15:40:33 +08:00
turtled
f11967288e
Add emqttd_broker info API
2017-08-11 14:56:56 +08:00
turtled
f4381155f8
Format code
2017-08-11 09:53:06 +08:00
turtled
701ee3e8dc
Add CLI set/get env
2017-08-10 18:19:20 +08:00
turtled
7c1ee6610d
Add http management APIs
2017-08-09 10:14:29 +08:00
Feng Lee
1c63bdd90d
APIs for hot reload of configuration
2017-08-07 18:28:32 +08:00
Feng Lee
88f84a4a0c
Support to configure keepalive backoff
2017-08-07 18:27:16 +08:00
Feng Lee
925e35dcbd
Remove the fullsweep_after option
2017-08-07 12:15:52 +08:00
Feng Lee
8325056061
Authorize HTTP Publish API with clientId
2017-07-26 13:16:46 +08:00
Feng Lee
f25661d3cd
Merge pull request #887 from chimit/master
...
Add ClientId parameter into the auth on HTTP Publish
2017-07-26 13:02:02 +08:00
Feng Lee
c4464954b0
Fix the 'case clause matching' exception
2017-07-24 09:34:22 +08:00
Feng Lee
6b0571d76c
Fix the undefined error
2017-07-23 20:49:58 +08:00
Feng Lee
15a081c9bb
Improve the Autocluster design
2017-07-23 18:07:53 +08:00
Feng Lee
081717be92
Add autocluster lock
2017-07-21 15:44:38 +08:00
Feng Lee
c1bce429d9
Load plugins after autocluster
2017-07-21 13:07:04 +08:00
Feng Lee
96777a4da8
Start listeners after autocluster
2017-07-21 12:43:28 +08:00
Feng Lee
7f22265e31
Use global:trans/2 to clean routes and sessions
2017-07-20 14:22:18 +08:00
Feng Lee
d6d08d6d5e
Ensure to start ekka
2017-07-18 18:49:38 +08:00
Feng Lee
437b26718b
Call ekka_autocluster:bootstrap/0 to build the cluster
2017-07-18 18:40:03 +08:00
turtled
2b54745f69
v2.3
2017-07-10 15:28:13 +08:00
turtleDeng
523dd9c8b0
Merge pull request #1145 from emqtt/master
...
Merge emq22
2017-07-10 13:07:32 +08:00
turtled
081f5dbe6e
Format code
2017-07-08 08:51:44 +08:00
Feng Lee
e3d414089f
Fix the usage of listeners restart/stop CLI
2017-07-07 09:19:30 +08:00
turtled
e42e71dcf7
Format code
2017-07-07 08:56:07 +08:00
HuangDan
4b63b2c098
Format code
2017-07-06 22:15:34 +08:00
HuangDan
3488d14776
Add 'undefined' from a record field's type
2017-07-06 18:59:54 +08:00
HuangDan
55b77af044
Merge branch 'develop' of https://github.com/emqtt/emqttd into develop
2017-07-06 17:53:31 +08:00
HuangDan
e675959d57
Fix received/1 and sent/1 function spec
2017-07-06 17:28:49 +08:00
HuangDan
53145bbbba
Update subscriptions/1 function spec
2017-07-06 17:01:27 +08:00
turtled
87d2a7ca85
Review code
2017-07-06 16:17:36 +08:00
turtled
7054d2c575
Rename reopen -> restart
2017-07-06 16:05:02 +08:00
turtled
5433af4c92
Add reopen/close ctl command
2017-07-06 14:49:17 +08:00
turtled
a427a53a30
Fix error exit code from emqttd_ctl
2017-07-06 11:25:05 +08:00
turtled
934287b926
Fix error exit code from emqttd_ctl
2017-07-06 10:52:27 +08:00
turtled
88797062a4
Add function restart_listener
2017-07-01 17:51:55 +08:00
Feng Lee
8a804c56f3
Monitor/Unmonitor membership events
2017-06-28 15:51:24 +08:00
Feng Lee
cc6696f8cb
Tune the log level
2017-06-25 07:11:36 +08:00
Feng Lee
50c312e736
Merge master branch
2017-06-22 12:53:33 +08:00
Feng Lee
0b58719342
Monitor changes of membership
2017-06-22 12:50:55 +08:00
turtled
ae36a8c8c2
Update spec #1106
2017-06-21 10:11:34 +08:00
Feng Lee
1f3bab2bcb
Integrate with ekka library, use ekka:subscribe/1 to replace mnesia:subscribe/1
2017-06-16 16:02:36 +08:00
Feng Lee
1e205720cc
Refactor: rename 'tick_tref' field to 'ticker'
2017-06-16 16:01:27 +08:00
Feng Lee
adfd34852b
Register 'fun emqttd:reboot/0'
2017-06-16 14:52:40 +08:00
Feng Lee
9b646d8cbc
Integrage with 'ekka' library
2017-06-16 12:30:09 +08:00
turtled
37b625aa57
Format code
2017-06-13 21:13:57 +08:00
turtled
88d466eb1a
remove from cluster, delete the node in extra_db_nodes
2017-06-13 21:02:38 +08:00
turtled
bbcc082a0d
Add stop api listener function
2017-06-13 11:15:26 +08:00
turtled
f18051c340
Add stop api listener function
2017-06-13 11:06:35 +08:00
Feng Lee
fa138882a3
Merge the updates of test case
2017-06-13 10:51:56 +08:00
Feng Lee
79c2fa631e
Fix the issue that we cannot remove a down node from the cluster
2017-06-13 10:35:22 +08:00
Feng Lee
a5cac277c1
Add cluster_nodes/1 function
2017-06-13 10:33:56 +08:00
HuangDan
c0bb20c2d9
Remove bridge command qos option
2017-06-12 22:52:23 +08:00
Feng Lee
53f5188cbb
Fix the race condition issue caused by unregister_session/1
2017-06-12 19:13:58 +08:00
turtled
4888702712
Remove bridge command qos option
2017-06-12 15:13:54 +08:00
turtled
1a8cc2e146
Add http to listen on port 8080 for the http REST API
2017-06-09 14:54:03 +08:00
turtled
0f7a66f810
Force gc call emit_stats
2017-05-26 16:44:44 +08:00
turtled
dc2e6ab53c
Hash type add bcrypt
2017-05-26 12:31:07 +08:00
turtled
c64f172174
Emq-WebSocket-Protocol -> EMQ-WebSocket-Protocol
2017-05-19 16:55:14 +08:00