Skip to content

5: ACK

Used to acknowledge a previously sent message. Empty ACKs are useless and should not be sent. Either the Response Message ID field, or the ACK Type field should be populated. Multiple fields can be populated if desired. The Header status field can be used to indicate OK, or an error condition. In the case that a response is being sent immediately, an ACK is not required. But the response should contain the Response Message ID header field. If a sender does not receive an ACK or response, it may resend the message. ACKs should not themselves be ACKed.

Lightbug comms

This applies to Lightbug devices, SDKs, apps and services.

  • ACKs will be sent when a message has an ID in the header field.
  • If an ID is not present, then no ACK will be sent because it is assumed the sender is not tracking successes/failures.
  • ACKs may always be sent for open and close messages (with type only)
FieldNameDescriptionType
3Response toID of the message that is being responded to
(Message ID of the request or subscription)
uint32
This is an extract of header fields that are relevant to this message type, you can find them all documented in the Headers section.

Payload

FieldNameDescriptionTypeUnit
1ACK TypeType of previous message being ACKeduint16

Examples

ACKing a heartbeat message type 13, ID 567, with an OK status
Message ID
Message ID and type
Message type only

Sequence

Simple ACK

The simple case is that a sender sends a message, and the receiver responds with an ACK message.

Response

The Response Message ID field in the header can be used in place of an ACK if an immediate response is being sent, with a specific message type.

In such cases the response will not have an ACK message type, instead it will have the message type of the response (often the same as the request).

Retries

If a sender does not receive an ACK or response, it may resend the message.

Code

For convenience, the following constants can be used to reference this message type.