A message is the privileged way to communicate in a bi-directional way between the asset and the CloudConnect platform.
The messaging system provided use channel identifiers to multiplex communication according to specific services on the device.
id
~ Required integer - 64 bits unique track identifier.
id_str
~ Required string - String version of the identifier (for languages not supporting 64 bits integers).
connection_id
~ Required integer - 64 bits unique connection identifier (see Notification for more details).
connection_id_str
~ Required string - String version of the connection identifier (for languages not supporting 64 bits integers).
parent_id
~ Optional integer - Id of the parent message (when replying to an other message).
parent_id_str
~ Optional string - String version of the parent identifier (for languages not supporting 64 bits integers).
channel
~ Required string
type
~ Required string - Type of message: message or ack (see below).
sender
~ Required string - From: asset, user_id or @@server_component@@ (see below).
recipient
~ Required string - To: asset, user_id, or @@server_component@@ (see below).
asset
~ Required string - IMEI of the device.
b64_payload
~ Required string - The message payload encoded in the Base64 format.
received_at
~ Required string - When the message was received by the server (timestamp in RFC 3339 format: YYYY-MM-DDTHH:MM:SSZ).
recorded_at
~ Optional string - When the message was recorded on the Asset (timestamp in RFC 3339 format: YYYY-MM-DDTHH:MM:SSZ).
warning Every ack has a null recorded_at, so you can be sure you'll receive empty recorded_at at some point.
message: A message event.
ack: Acknowledgment of a previous message event.
A message sender can be:
@@something@@ when the message is from a CloudConnect service or a third party provider.A message recipient can be:
@@something@@ when the message is to a CloudConnect service or to a third party provider.{
"id": 355992513577746455,
"id_str": "355992513577746455",
"parent_id": null,
"parent_id_str": null,
"channel": "com.mdi.dynamic_channel_configuration",
"type": "message",
"sender": "359551032079468",
"recipient": "@@server@@",
"connection_id": 1103003563199562099,
"connection_id_str": "1103003563199562099",
"asset": "359551032079468",
"b64_payload": "g6d2ZXJzaW9uAahzZXJ2aWNlc5S+Y29tLm1kaS5zZXJ2aWNlcy51cGRhdGVNYW5hZ2V...",
"recorded_at": "2012-09-09T08:27:08Z",
"received_at": "2012-09-09T08:27:09Z"
}
This example message has the following properties:
359551032079468@@server@@