adamvr/MQTT.js — pull request #138 by mantoni (2013-10-28 20:52:27+00:00)
Title: Fixed message id generation according to spec

Changed id generation from random to increasing by one - as suggested by
the specification. Using random numbers does not guarantee that the same
id isn't used twice. Also made sure that 0 is never used since it's an
invalid message id.

For details see section 2.4 of the spec:
http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html#msg-id