Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve shared sub dispatch implementation. #2144

Merged
merged 1 commit into from Jan 22, 2019

Conversation

@spring2maz
Copy link
Contributor

spring2maz commented Jan 10, 2019

Fixes #2143
Before this change, when shared dispatch ack is enabled (in config)
in case all subscribers are offline (all sessions gave negative ack)
the message is simply discarded.
In this change, it is ensured to have one session picked according to
configured dispatch strategy when no subscriber is online.
The messages dispatched in such scenario are then queued in session state.

Before this change, when shared dispatch ack is enabled (in config)
in case all subscribers are offline (all sessions gave negative ack)
the message is simply discarded.
In this change, it is ensured to have one session picked according to
configured dispatch strategy when no subscriber is online.
The messages dispatched in such scenario are then queued in session state.
@coveralls

This comment has been minimized.

Copy link

coveralls commented Jan 10, 2019

Pull Request Test Coverage Report for Build 4474

  • 12 of 13 (92.31%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.03%) to 66.486%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/emqx_shared_sub.erl 12 13 92.31%
Files with Coverage Reduction New Missed Lines %
src/emqx_router.erl 1 91.8%
src/emqx_keepalive.erl 1 62.5%
src/emqx_connection.erl 2 64.74%
Totals Coverage Status
Change from base Build 4466: -0.03%
Covered Lines: 3184
Relevant Lines: 4789

💛 - Coveralls
@emqplus emqplus requested review from emqplus and turtleDeng Jan 11, 2019
@terry-xiaoyu terry-xiaoyu merged commit a6f138b into emqx30 Jan 22, 2019
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 66.486%
Details
@terry-xiaoyu terry-xiaoyu deleted the shared-sub-continue-dispatch-if-all-nack branch Jan 22, 2019
turtleDeng added a commit that referenced this pull request Jan 25, 2019
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.