Skip to content

Get Message Status

Backendless server handles message publishing as an autonomous task. As a result, the final status of the message publishing operation is not available right away. To retrieve the status, the client application must make a separate API call as documented below:

Blocking API

Backendless.Messaging.getMessageStatus( String messageId );

Non-blocking API

Backendless.Messaging.getMessageStatus( String messageId, AsyncCallback<MessageStatus> responder );

where:

Argument                Description
messageId ID of the message assigned to the message and returned by the Message Publishing API request.

Return Value

Method returns an instance of com.backendless.messaging.MessageStatus. The object contains the following properties:

where:

Argument                Description
messageId ID of the message for which the publishing status is retrieved.
status a Java enum consisting of the following values: FAILED, PUBLISHED, SCHEDULED, CANCELLED, UNKNOWN
errorMessage contains a detailed error message when status is PublishStatusEnum.FAILED.

Codeless Reference

pubsub_api_get_message_status_1

where:

Argument                Description
message id ID of the message for which the publishing status is retrieved.

Returns an object containing message status details. The object contains the following properties:

where:

Argument                Description
messageId ID of the message for which the publishing status is retrieved.
status can be one of the following values: FAILED, PUBLISHED, SCHEDULED, CANCELLED, UNKNOWN
errorMessage contains a detailed error message when status is "failed".

The example below checks the message status with the following identifier: "message:6052643A-F96C-4253-BCF0-F606A4BBB794".

pubsub_api_get_message_status_2