Skip to main content
Version: SDK-5.9.6

DeleteReceivedMessage

public BackendReturnObject DeleteReceivedMessage(string messageIndate);

Parameter

ValueTypeDescription
messageIndatestringindate of the received message to delete

Description

Deletes a message from the list of received messages.

Example

Synchronous

//Get the inDate of the message to delete.  
BackendReturnObject bro = Backend.Message.GetReceivedMessageList();
string messageIndate = bro.Rows()[0]["inDate"]["S"].ToString();

Backend.Message.DeleteReceivedMessage(messageIndate);

Asynchronous

//Get the inDate of the message to delete.  
Backend.Message.GetReceivedMessageList(callback =>
{
string messageIndate = callback.Rows()[0]["inDate"]["S"].ToString();

Backend.Message.DeleteReceivedMessage(messageIndate, callback2 =>
{
//Post-process
});

});

SendQueue

//Get the inDate of the message to delete.  
SendQueue.Enqueue(Backend.Message.GetReceivedMessageList, callback =>
{
string messageIndate = callback.Rows()[0]["inDate"]["S"].ToString();

SendQueue.Enqueue(Backend.Message.DeleteReceivedMessage, messageIndate, callback2 =>
{
// Post-process
});

});

Return cases

Success cases

When the deletion is successful
statusCode : 204
message : Success

Error cases

When there is no message for the corresponding messageIndate
statusCode : 404
errorCode : NotFoundException
message : message not found, message cannot be found