MQTT General Specification

Describes general specifications about MQTT in CloudPRNT Version MQTT .

MQTT version

A printer uses V3.1.1.
It is recommended that V3.1.1 be used for a CloudPRNT server as well.

QoS

A message issued by a printer specifies QoS1.
It is recommended that messages issued by a CloudPRNT server also specify QoS1.

Authentication of MQTT broker connections

A Printer can connect to MQTT broker using User Name and Password.
The User Name and Password used by a printer can be specified by a server response of Server setting information request (GET) .
Client certificates are not supported.

Duplicate reception of MQTT messages

Since MQTT is used, a printer may receive duplicate messages from a CloudPRNT server.
Duplication of request-client-status messages, etc. is not a problem, but in the case of print-job messages, there is a concern that unintended duplication of printing may occur.
A jobToken key is defined in the payload JSON of the print-job message to prevent unintentional duplicate printing.
A printer remembers the past 10 jobTokens.
If a print-job message with the same jobToken is received, a printer will publish a print-result message containing Printer Status Codes indicating that “a message with a duplicate jobToken was received and will not be printed”.

Last Will and Testament

A printer registers Will when connecting to a MQTT broker.
In addition, for compatible printers, when the power is turned off, a message in the same format as the registered Will is issued before disconnecting from the broker.
So a CloudPRNT server can confirm that a printer has been disconnected from the network by processing the Will message.
See the client-will message specification for details.

Important

In CloudPRNT Version MQTT (Trigger POST), a printer does not publish MQTT messages, it also does not register Will.

Retain

Messages published by a printer do not use Retain.