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

Any implementation of Will topics #18

Open
ameykshirsagar opened this issue Jul 23, 2017 · 13 comments
Open

Any implementation of Will topics #18

ameykshirsagar opened this issue Jul 23, 2017 · 13 comments

Comments

@ameykshirsagar
Copy link

Hi,
I am interested in using will topics. How can I do that??

Thanks

@PasiSalenius
Copy link
Owner

This is not supported at the moment. The client library is best at simple use case of subscribing to topics and receiving messages, this is what I use it for.

You're welcome to send PRs for changes that you think are needed.

@ameykshirsagar
Copy link
Author

@PasiSalenius I have sent a PR #22 . Kindly check it out.
Cheers!!

@df1gr
Copy link

df1gr commented Apr 26, 2019

Hi,
using LightMQTT to connect and subscribe successfully to owntracks-MQTT.
I can get some messages from Owntrack. However, after few messages it seems to stop receiving from Owntracks. Seems for me, LightMQTT sleeps. When I restart my program messages transfer continues. Using LightMQTT in Swift main program on MacOS 10.4.4. Is there any idea why this hangup is happen? Thank you in advance for any hint.

@PasiSalenius
Copy link
Owner

@df1gr The default ping interval is 10 seconds, you can try reducing that and see if it helps.

I've also seen similar behaviour with one MQTT server, and could not really figure out what was causing it. Receiving payloads for some seconds but then stopping, until I force quit the app and started it again.

With the main MQTT server I'm using, I never see this issue.

@df1gr
Copy link

df1gr commented Apr 26, 2019 via email

@df1gr
Copy link

df1gr commented Apr 26, 2019 via email

@PasiSalenius
Copy link
Owner

The pingInterval parameter of the LightMQTT.Options struct defines the interval at which the server expects to receive ping MQTT messages, and LightMQTT will send pings at half of that interval. So that should keep the connection alive to the server.

I would very much appreciate if you can debug and find the cause of the issue using your setup, as different MQTT servers seem to behave differently here.

@df1gr
Copy link

df1gr commented Apr 27, 2019 via email

@PasiSalenius
Copy link
Owner

I don't think this is what causes your disconnection issues, but thanks for pointing that out. I already commited a fix for it in 6074529.

@df1gr
Copy link

df1gr commented Apr 27, 2019 via email

@df1gr
Copy link

df1gr commented Apr 27, 2019 via email

@df1gr
Copy link

df1gr commented Apr 28, 2019 via email

@PasiSalenius
Copy link
Owner

I'm very glad to hear that. That got me thinking I also need to make sure I wasn't accidentally using the same clientId repeatedly during one development phase.

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

3 participants