njh / ruby-mqtt

Pure Ruby gem that implements the MQTT protocol, a lightweight protocol for publish/subscribe messaging.
http://www.rubydoc.info/gems/mqtt
MIT License
538 stars 135 forks source link

[Discuss] Publishing method return nil. #114

Closed NSLog0 closed 1 year ago

NSLog0 commented 6 years ago

I'm wondering about the publish () should return response status like a success, error or there are the other way to get response if it have sorry for that I can't find in the document

njh commented 6 years ago

publish() doesn't return anything meaningful but will throw an exception if it fails.

It also doesn't currently wait for PUBACK.

NSLog0 commented 6 years ago

Thank you @njh, Are you still maintain the library?

Anyway, Do you have an example about best practice of implementation and thread implementation. I've planed to use this on ruby on rail but I need to find some example to determine get() or get_packet won't blocks other of application process

njh commented 4 years ago

Sorry, I am not sure what you mean in your last comment.

Did you manage to resolve your problem?