Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Lua client: Changing connect method

Thanks for pointing that out to me Roger.  Definitely relying on you all to keep me straight.  :-)


Dwayne Bradley
Technology Development Manager
Emerging Technology Office
Duke Energy


-----Original Message-----
From: paho-dev-bounces@xxxxxxxxxxx [mailto:paho-dev-bounces@xxxxxxxxxxx] On Behalf Of Roger Light
Sent: Tuesday, October 07, 2014 4:55 AM
To: General development discussions for paho project
Subject: Re: [paho-dev] Lua client: Changing connect method



*** This is an EXTERNAL email. Exercise caution. DO NOT open attachments or click links from unknown senders or unexpected email. ***

On Mon, Oct 6, 2014 at 10:43 PM, Bradley, Dwayne <Dwayne.Bradley@xxxxxxxxxxxxxxx> wrote:

> Why not put the identifier in the create() method as well since it is 
> a required piece of information for the connection?

It isn't strictly true that the client id is required, and certainly I don't think this should be the case at the library level. A client id is only really required if you're creating a durable (clean
session=false) client, or if you are using the id for some form of identification/access control on the broker. For clean session=true clients (again, assuming you're not using the client id for something else), there is no reason why the library shouldn't generate a random client id for you.

n MQTT v3.1.1, it is valid to send a zero length client id if you are using clean session=true. In that case, the broker generates a client id for you - you never know what it is.

Regards,

Roger
_______________________________________________
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