Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

MQTT last will and testament #5231

Merged
merged 3 commits into from
Mar 14, 2018
Merged

MQTT last will and testament #5231

merged 3 commits into from
Mar 14, 2018

Conversation

maggu2810
Copy link
Contributor

Add support to configure LWT topic, message, qos and retain flag explicit.

Fixes: #5197

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
Fixes: #5197
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
@maggu2810
Copy link
Contributor Author

@doandzhi What do you think about?

Copy link
Contributor

@doandzhi doandzhi left a comment

Choose a reason for hiding this comment

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

Very important changes that surely extend the use cases of MQTT lwt implementation of ESH. I assume that it is working fine. Good effort @maggu2810 , thanks for the contribution.

* Add a broker by a configuration.
*
* <p>
* You need to provide at least a "name" and an "url".
* Additional properties are "user","pwd","qos","retain","lwt","keepAlive","clientId", please read the
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be useful to mention the new properties here ( lwtTopic, lwtMessage lwtQos lwtRetain)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The implementation has been changed to use a config object that properties are "fixed". As all fields are nullable and so optional the documentation needs to state which ones are required.
I don't know if it make sense to sync the additional properties all the time.
Perhaps we could remove the "Additional properties ..." part at all if this PR will be accepted (and before it is merged).

@maggu2810
Copy link
Contributor Author

I assume that it is working fine.

Would you like to give it a try.
I don't use MQTT at the moment myself.

* Additional properties are "user","pwd","qos","retain","lwt","keepAlive","clientId", please read the
* service configuration documentation for a detailed description.
*
* @param brokerConnectionConfig The configuration key-value map.
* @param cfg The configuration key-value map.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is not a key-value map anymore

@doandzhi
Copy link
Contributor

Would you like to give it a try.
I don't use MQTT at the moment myself.

Sure, I can do that! I will give feedback in a while.

@doandzhi
Copy link
Contributor

I can confirm that the proposed changes resolve issue #5197 . It is able to use JSON payload and no problems were faced. Thanks for the contribution @maggu2810 !

@kaikreuzer kaikreuzer merged commit 421c1c0 into eclipse-archived:master Mar 14, 2018
@maggu2810 maggu2810 deleted the mqtt-lwt branch March 14, 2018 12:11
@htreu htreu added this to the 0.10.0 milestone Oct 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants