Skip to main content

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

Hi Chamila,

I think Roger's quite busy with Mosquitto amongst other things.

Is your program getting an on_connect callback with the result of the connect?  Is the connect supposed to succeed or fail?

If the connection is broken as a result of the subscribe call, then I would expect the on_disconnect callback to be called to indicate that.

Ian


On 11/10/2015 06:37 AM, Chamila De Alwis wrote:
[Resending as I didn't get a response before]

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. 


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




_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto


Back to the top