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

Added last will & refactored service #321

Merged
merged 11 commits into from
Jun 25, 2020
Merged

Added last will & refactored service #321

merged 11 commits into from
Jun 25, 2020

Conversation

kelindar
Copy link
Contributor

@kelindar kelindar commented Jun 4, 2020

This PR adds an implementation of "Last Will & Testament" of MQTT to emitter. This handles 2 scenarios:

  1. When client is terminated but the broker is alive.
  2. When the broker is terminated.

In both cases, last will will be sent to the cluster and optionally message will be retained. This uses consistent hashing to determine which peer will send out the last will in case of the broker termination.

Moreover, I have done a massive refactoring of the service (long overdue). In this refactoring, all of the handlers and services have been made simpler with clear dependencies (see service/ folder). In addition, all tests for the handlers have been rewritten and they have 100% code coverage.

@kelindar kelindar requested a review from Florimond June 4, 2020 05:01
Copy link
Member

@Florimond Florimond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kelindar kelindar merged commit ad96b72 into master Jun 25, 2020
@kelindar kelindar deleted the will branch June 25, 2020 13:33
Florimond pushed a commit that referenced this pull request Sep 7, 2023
This PR adds an implementation of "Last Will & Testament" of MQTT to emitter. This handles 2 scenarios:

 1. When client is terminated but the broker is alive.
 2. When the broker is terminated.

In both cases, last will will be sent to the cluster and optionally message will be retained. This uses consistent hashing to determine which peer will send out the last will in case of the broker termination.

Moreover, I have done a massive refactoring of the service (long overdue). In this refactoring, all of the handlers and services have been made simpler with clear dependencies (see service/ folder). In addition, all tests for the handlers have been rewritten and they have 100% code coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants