-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi, thank you for the nats-python.
It would be great if there will be an option to set auto reconnect to server.
I have found solution to detect disconnects when publish:
`
def publish(self, subject, data):
try:
self._nats.publish(subject, payload=bytes(json.dumps(data), encoding='utf-8'))
except BrokenPipeError:
while True:
try:
self._nats.reconnect()
self.publish(subject, data)
break
except:
pass
`
But I don't know how to detect disconnects when subscribe, program just freezes
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working