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,

Sorry, google has got pretty strict on email recently so I'm getting a
lot of valid email ending up in spam.

You should use the on_connect callback to find the result of the
connect/authentication attempt.

Cheers,

Roger

On Tue, Nov 10, 2015 at 6:37 AM, Chamila De Alwis <chamilad@xxxxxxxx> 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.
>
> [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
>
>
>
> _______________________________________________
> 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


Back to the top