CONNACK error code for invalid will topic

100 views
Skip to first unread message

Ori Bar

unread,
May 22, 2012, 8:01:43 AM5/22/12
to mq...@googlegroups.com, Zvi Avraham
Some topic names are illegal in MQTT. What happens if a client sends a
CONNECT message to the MQTT server which contains an invalid will
topic (for example, the empty topic). There is no CONNACK return code
for this in the spec. How would you approach this?

--
Best Regards,

Ori Bar, Software Engineer
Nivertech Ltd

email:    ori...@nivertech.com
phone:   +972-52-2838429
www:     http://www.nivertech.com

The content of this message is Nivertech Ltd Confidential.  If you are
not the intended recipient and have received this message in error,
any use or distribution is prohibited. Please notify me immediately by
reply e-mail and delete this message from your computer system. Thank
you.

Nicholas O'Leary

unread,
May 22, 2012, 8:18:17 AM5/22/12
to mq...@googlegroups.com
Hi Ori,

> Some topic names are illegal in MQTT. What happens if a client sends a
> CONNECT message to the MQTT server which contains an invalid will
> topic (for example, the empty topic). There is no CONNACK return code
> for this in the spec. How would you approach this?

The best fit would be a return code of 0x03 - Broker Unavailable.

The alternative is to just drop the connection - which is what you
might considering doing for an invalid topic in a Publish, for
example.

Either way, it is not ideal as it won't help the client know what it
did wrong. Perhaps a job for the wiki will be to collate any other
reasons a connect could be rejected. They could then be considered in
the future for new CONNACK return code values.

Cheers,
Nick
> --
> To learn more about MQTT please visit http://mqtt.org
>
> To post to this group, send email to mq...@googlegroups.com
> To unsubscribe from this group, send email to
> mqtt+uns...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/mqtt

Roger Light

unread,
May 24, 2012, 5:53:59 AM5/24/12
to mq...@googlegroups.com
Hi,

I've created a page for suggested connack codes:
http://mqtt.org/wiki/doku.php/extended_connack_codes linked to from
http://mqtt.org/wiki/doku.php/mqtt_protocol

Cheers,

Roger

Hiram Chirino

unread,
May 24, 2012, 7:52:46 AM5/24/12
to mq...@googlegroups.com
That's awesome, but you know that Wiki registration is still broken right?  Is that on purpose?

--
To learn more about MQTT please visit http://mqtt.org

To post to this group, send email to mq...@googlegroups.com
To unsubscribe from this group, send email to
mqtt+uns...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/mqtt



--

Hiram Chirino

Software Fellow | FuseSource Corp.

chi...@fusesource.com | fusesource.com

skype: hiramchirino | twitter: @hiramchirino

blog: Hiram Chirino's Bit Mojo




Nicholas O'Leary

unread,
May 24, 2012, 8:08:15 AM5/24/12
to mq...@googlegroups.com
Hi Hiram,

>> That's awesome, but you know that Wiki registration is still broken right?  Is that on purpose?

Sorry about that - nothing intentional with the breakage, just a lack of time to investigate between Andy and myself.

I will try to take a look tonight.

Regards,
Nick

andyp...@gmail.com

unread,
May 24, 2012, 8:24:26 AM5/24/12
to mq...@googlegroups.com
Absolutely not intentional, I've been starting a new role and had very little time to tweak mqtt.org lately - we will sort it asap. Apologies Hiram (and everyone!)
Andy Piper | Farnborough, Hampshire (UK)
blog: http://andypiper.co.uk   |   skype: andypiperuk
twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper
Reply all
Reply to author
Forward
0 new messages