Skip to content

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.

3 participants