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

last will and testament #225

Closed
manolodd opened this issue Oct 19, 2014 · 3 comments
Closed

last will and testament #225

manolodd opened this issue Oct 19, 2014 · 3 comments

Comments

@manolodd
Copy link

Hi,

Is there any way of establishing last will and testament topic, message and qos when creating a secure client. I have been looking for weeks without success.

Than you in advance. Good product!!

@mcollina
Copy link
Member

I think:

var mqtt = require('mqtt')

mqtt.connect('mqtts://yourbroker', { will: { topic: 'death', payload: 'me' } })

@manolodd
Copy link
Author

Hi Matteo,

I'm so sorry. I was been reading options for secure client creation (https://github.com/adamvr/MQTT.js/wiki/mqtt) instead of mqtt connection (https://github.com/adamvr/MQTT.js/wiki/connection) you pointed out.

Options for secure client creation does not show up parameters for will, but I suppose createSecureClient will recognize them as in a MqttConnection, isn't it?

Ok, let me try!!

Thank you so much and sorry.

@manolodd
Copy link
Author

Ok, it works fine!! Than you again.

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

No branches or pull requests

2 participants