Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Return codes for subscribe and publish methods in Python

Hi,

I'm working with ActiveMQ as the message broker and I've enabled SimpleAuthenticationPlugin [1] to authorize users based on username and password. When connecting with Paho-MQTT Python library with wrong credentials, the subscribe() method still returns result code 0 - SUCCESS, instead of a NO_CONN. This makes it impossible to determine if the authentication went bad at the message broker.

The publish.single() method doesn't return anything at all. Is this the intended way and is there a another way to determine success of these functions or is it a possible improvement?

I'm using paho-mqtt 1.1 version. 

[1] - http://activemq.apache.org/security.html 

Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



Back to the top