Nice article, one question (I know I could probably just run the code and see but it’s probably worth asking). Will the worker class retain any state between messages?
In worker have self.msg_counter= 0 in the init and then
self.msg_counter += 1
print(‘Msgs’s read: ’ + str(self.msg_counter))
in the on_message function. Would that print increasing numbers or is the worker destroyed and re-constructed each time a message is received.
It looks to me that it should be robust (unless there is an exception in worker.run() )