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

Python code stops forwarding messages #1

Open
PrashantPathakDB opened this issue Nov 21, 2017 · 1 comment
Open

Python code stops forwarding messages #1

PrashantPathakDB opened this issue Nov 21, 2017 · 1 comment

Comments

@PrashantPathakDB
Copy link

I am using the Python code to forward the MQTT messages to ES server. Some time the code stop forwarding and stays in while: True loop inside class App. When I checked for MQTT messages by subscribing from other terminal, it shows the incoming messages. It recovers only when I restart the code.

@PrashantPathakDB PrashantPathakDB changed the title Python code stop forwarding Python code stops forwarding messages Nov 21, 2017
@clive-jevons
Copy link
Owner

Hi @pathakhcst ,

The Paho Python client claims to provide automatic reconnect functionality, but I haven't actually tested this.

You could try adding an on_disconnect callback to the MqttClient to see if this is the reason for the client to stop receiving updates. See https://www.eclipse.org/paho/clients/python/docs/ under 'on_disconnect()'.

If you see that the client is disconnecting due to some error but not reconnecting, I suggest raising an issue with the Paho Python client project.

Cheers,
C

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