Changing LWT via Plugin

11 views
Skip to first unread message

Richard Earl

unread,
Jul 1, 2022, 10:29:57 AMJul 1
to vernemq-users
Hi,
I have a requirement to be able to change the user properties on a Last Will and Testament message, is this something that is possible to do via plugin?

Essentially I need to be able to send what time a client has gone offline and online. When the client connects, we send a timestamp along in the user property, which works fine.

For going offline, if we set a timestamp in the LWT this would be at the time the client connected (as this is when it would be resolved), not when it disconnected. The only solution I can think of is to use plugins in vernemq to set the timestamp in the properties of the LWT before it sends it out. Is this possible? if so which hook would we need to use?

Thank you
Richard
Reply all
Reply to author
Forward
0 new messages