Subscribe to event messages by using MQ configurations
This topic describes the format of messages to which you subscribe by using Message Queue (MQ) configurations.
Message parameters
Message body
Parameter | Type | Description |
EventCatgory | String | The category of the event. Valid values: DEVICE: device-related event BIZ: business-related event |
Event | String | The description of the event. Valid values: DEVICE_OFFLINE: The device was disconnected. DEVICE_PROPERTY: The device properties were changed. BIZ_REFRESH_DELAY: The commodity information display was delayed. BIZ_BATTERY_LOW: The battery level was low. BIZ_EVENT_STATUS_CHANGE: The event state changed. BIZ_PING: The connectivity test message was sent. BIZ_SEND: CloudESL sent instructions to the electronic shelf label (ESL). BIZ_SEND_FAILED: CloudESL failed to send instructions. BIZ_DISPLAY_RETRYING: The ESL was retrying to display the commodity information. BIZ_DISPLAY_TEMPO_FAILED: The ESL failed to retry to display the commodity information. BIZ_DISPLAY_SUCCESS: The ESL displayed the commodity information. BIZ_DISPLAY_TEMPO_FAILED: The ESL failed to display the commodity information. |
EventId | String | The unique ID of the event. |
EventTime | Long | The time when the event occurred. |
Payload | JsonObject | For more information, see the description of each type of message. |
Payload
Parameter | Type | Description |
Type | String | The category of the device. Valid values: AP: base station ESL: ESL |
DeviceBarCode | String | The barcode of the device. |
StoreId | String | The ID of the store. |
ItemBarCode | String | The barcode of the commodity. |
ItemId | String | The custom ID of the commodity. |
ItemTitle | String | The title of the commodity. |
PropertyKey | String | The name of the property that is changed. The BatteryLevel property can be changed. |
PropertyVal | String | The property value that is changed. |
BatteryLevel | String | The battery level. |
WarningLevel | String | The alert threshold that is configured for the battery level. |
ProcessedInfo | JsonObject | The event processing result. |
ProcessedInfo
Parameter | Type | Description |
Staff | String | The name of the employee who processed the event. |
Time | Long | The time when the employee processed the event. |
Reason | String | The reason why the employee processed the event or the operation that the employee performed. |
Status | String | The event processing state. Valid values: New: The event is ready to be processed. Processing: The event is being processed. Cancel: The event is canceled. Close: The event has been processed. Reopen: The event processing is resumed. |
Message content
Message indicating a disconnected base station
A message is sent if the connection between the base station and CloudESL is interrupted. For example, a message is sent due to the failure of the store network or the base station.
{
"EventCatgory":"DEVICE",
"Event":"DEVICE_OFFLINE",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"AP",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456"
}
}Message indicating a changed ESL battery level
A message is sent if the ESL battery level changes.
{
"EventCatgory":"DEVICE",
"Event":"DEVICE_PROPERTY",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"PropertyKey":"BatteryLevel",
"PropertyVal":"30",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster"
}
}Message indicating the display delay of the commodity information on the ELS
A message is sent if the commodity information is not displayed on the ESL within the specified time range after CloudESL delivers the commodity information.
{
"EventCatgory":"BIZ",
"Event":"BIZ_REFRESH_DELAY",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster",
"DelayTime":30000
}
}Message indicating a low ESL battery level
A message is sent if the ESL battery level is lower than the specified alert threshold.
{
"EventCatgory":"DEVICE",
"Event":"BIZ_BATTERY_LOW",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster",
"WarningLevel":30,
"BatteryLevel":25
}
}Message indicating a processed event
A message is sent if an event generated based on an alert rule is processed.
{
"EventCatgory":"DEVICE",
"Event":"BIZ_BATTERY_LOW",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster",
"WarningLevel":30,
"BatteryLevel":25,
"ProcessedInfo":{
"Staff":"Boss Lin",
"Time":1648097054000,
"Reason":"Change the ESL",
"Status":"Close"
}
}
}Message indicating a connectivity test
A message is sent if the MQ configuration is verified. You can ignore the message because the message is only for the connectivity test.
{
"EventCatgory":"BIZ",
"Event":"BIZ_PING",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
}
}Message indicating that the ESL was retrying to display the commodity information
If a message is sent when CloudESL redelivers the commodity information, the system will continuously retry during the validity period. You may receive multiple retry messages.
{
"EventCatgory":"BIZ",
"Event":"BIZ_DISPLAY_RETRYING",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster"
}
}Message indicating that the ESL failed to retry to display the commodity information
A message is sent if the ESL fails to display the commodity information after the CloudESL system redelivers the commodity information. The message does not indicate the final result of the display. The message only indicates that the current retry process fails. The retry operation will continue to be performed.
{
"EventCatgory":"BIZ",
"Event":"BIZ_DISPLAY_TEMPO_FAILED",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster"
}
}Message indicating that the ESL displayed the commodity information
A message is sent if the ESL successfully displays the commodity information.
{
"EventCatgory":"BIZ",
"Event":"BIZ_DISPLAY_SUCCESS",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster"
}
}Message indicating that the ESL failed to display the commodity information
A message is sent if the ESL fails to display the commodity information. The message indicates the final result of the failed display. If you receive the message, you can determine that CloudESL failed to redeliver the commodity information, and stopped delivering the commodity information.
{
"EventCatgory":"BIZ",
"Event":"BIZ_DISPLAY_FAILED",
"EventId":"abfhjkfsbeuyftfkhjlj",
"EventTime":1648096954000,
"Payload":{
"Type":"ESL",
"DeviceBarCode":"abcdefg",
"StoreId":"s-123456",
"ItemBarCode":"1245677966",
"ItemId":"1245677966",
"ItemTitle":"Australian lobster"
}
}