Shawn
5fbf83e7f0
fix(shared_sub): discard all unexpected msgs
2021-06-28 09:37:34 +08:00
Shawn
868cd6e57c
fix(shared_sub): failed to clean the emqx_shared_subscription tab
...
A trick that fixes the issue that we demonitored the shared subscriber
too early if it not unsubscribed all of the topics.
2021-06-25 20:38:43 +08:00
Zaiming Shi
6354e75626
chore: update copyrights
2021-04-23 20:43:00 +02:00
Zaiming Shi
db461179c5
improve(shared-sub): Randomise the startpoint for round-robin
2021-02-17 19:10:37 +01:00
Zaiming Shi
0087303b25
feat(shared_sub): Support hashing from source topic.
2021-01-21 21:05:56 +01:00
Zaiming Shi
5aa63ed203
fix(shared_sub): align default value and default config
...
Shared subscription default dispatch strategy is 'random' in config
but 'round_robin' in code. This commit is to make sure they are the
same: both are 'random'.
2021-01-21 21:05:56 +01:00
JianBo He
d437f9f228
chore(elvis): fix elvis warnings
2021-01-14 15:46:16 +08:00
JianBo He
f2190dd5b5
chore(mnesia): explicitly specify the copy type for table
2021-01-14 15:46:16 +08:00
zhouzb
fbf8d3e111
fix(share sub): fix the issue that the number of subscriptions dropped to 0 during the picking subscriber and caused a crash
2020-12-31 14:03:55 +08:00
JianBo He
98faa698f3
feature(quota): add quota confs to limit the number of message forwards
2020-08-14 16:58:08 +08:00
zhouzb
7ea75f4289
Update copyright
2020-01-03 18:31:08 +08:00
Feng Lee
88321fe6fe
Remove the emqx_config module
...
- Remove the emqx_config module
- Move get_env/1, get_env/2 to emqx module
2019-09-09 10:18:10 +08:00
turtled
91a8dbda56
Fix conflicts
2019-08-09 16:41:11 +08:00
Feng Lee
0a6468cf48
Introduce the 'pipeline' design pattern
...
- Introduce the 'pipeline' design pattern in emqx_protocol module
- Reame the '{dispatch, ...' to '{deliver, ...' in emqx_broker module
- Rename type 'credentials' to 'client'
2019-07-31 08:09:47 +08:00
terry-xiaoyu
20a7ed6f53
RPC batch
2019-07-29 09:35:06 +08:00
terry-xiaoyu
b0e2b7db0c
Support inter-node messages via RPC cast
2019-07-27 12:59:07 +08:00
Feng Lee
4974eab20e
Improve the channel design
2019-06-25 14:53:45 +08:00
Feng Lee
3877c4db1a
Merge branch 'channel2' into channel3
2019-06-18 16:49:26 +08:00
terry-xiaoyu
7092748266
Improve log messages using 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
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
周子博
0fbf771543
Readjust log level into error when got unexpected message
2019-03-27 11:07:58 +08:00
周子博
58e1b4d485
Readjust log level and unify log format
2019-03-26 22:18:31 +08:00
HeeeJianBo
fc2df9aff5
Adapt to new export style
2019-03-22 14:58:24 +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
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
Feng Lee
e882af9369
Use the new logger macros
2019-01-10 08:53:10 +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
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
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
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
5dfd431040
Fix typo
2018-09-22 19:40:07 +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
Feng Lee
567aeb274f
Define types in emqx_types, emqx_mqtt_types modules
2018-08-29 23:08:55 +08:00
turtled
dae81037bf
Update share_sub dispatch
2018-08-29 12:58:55 +08:00
turtled
95d36d0204
Fix share sub bug
2018-08-27 10:15:41 +08:00
turtled
fc0f57073d
Fix share sub dispatch fail
2018-08-25 14:32:32 +08:00
turtled
36647b641f
Fix select emqx_shared_subscription fail
2018-08-24 11:38:54 +08:00
turtled
4d9e03a803
Refactor websocket conn using cowboy
2018-08-08 18:36:14 +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
385c7cd3e6
Remove 'tuple call' and be compatible with Erlang/OTP R21
2018-06-29 12:26:30 +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
71acf91ace
Replace lager with emqx_log
2018-04-09 12:34:53 +08:00
Feng Lee
bfb23ff0b2
Improve the design of MQTT session management
2018-04-08 15:16:05 +08:00