OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

mqtt message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (MQTT-260) Add a CONNACK code of 'Try Another Server'


    [ https://issues.oasis-open.org/browse/MQTT-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62846#comment-62846 ] 

Ken Borgendale commented on MQTT-260:
-------------------------------------

I do not see that adding a string indicating a possible alternate server to try complicates the client.  The client is not required to take any particular action based on this and might well just return this string to the application along with the reason for the failure to connect. Whatever reason the server had for sending this return value on CONNACK makes no statement about the internal organization of the server.  Nor are servers required to use this alternate server string.

So really, the question here is whether we want no such return, such a return with just an integer return value, or such a return with an integer value and a string.  The lack of error reporting in MQTT is a major flaw which we are trying to fix in MQTTv5.  Instead of making the client or application simpler, the lack of error reporting makes the client library and application more complex.  If you return: Try another server without any indication of which one, it is likely that the logic in the client requires more knowledge of the server configuration that if you return a string indicating which other server to try.

So I think we should add this return value to CONNACK, and allow an optional string to indicate which alternate server this server recommends.  The biggest complication I see is what we specify about the allowed contents of this string.  I suggest that it should be the authority section of a URI without a username or password.  I would accept saying that it is an arbitrary sting and up the the client application to parse it.

> Add a CONNACK code of 'Try Another Server'
> ------------------------------------------
>
>                 Key: MQTT-260
>                 URL: https://issues.oasis-open.org/browse/MQTT-260
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Improvement
>          Components: futures
>    Affects Versions: 5
>            Reporter: Raphael Cohn
>            Assignee: Raphael Cohn
>            Priority: Critical
>
> If we add a CONNACK return code of 'Try Another Server', this makes it easier for over-loaded servers to tell clients to redirect. This works in conjunction with MQTT-259, which advocates the use of DNS SRV records.
> Indeed, if we also added server-originated DISCONNECT packets with this return code, we could get clients to cleanly migrate to another server when a server is shutdown for maintenance.
> Please note, I do not favour the server also reporting which new server to connect to. There in lies the route to madness, as it means the current server has to know the state of all the others. That's intimate knowledge.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]