public bool Delete(DeleteMessageRequest request) { if (request == null) { return(false); } var response = SqsClient.DeleteMessage(request); return(response != null); }
private bool DeleteRecordSQS(string QueueUrl, Message InMessage) { DeleteMessageRequest DeleteRequest = new DeleteMessageRequest { QueueUrl = QueueUrl, ReceiptHandle = InMessage.ReceiptHandle }; var DeleteResponse = SqsClient.DeleteMessage(DeleteRequest); return(DeleteResponse.HttpStatusCode == HttpStatusCode.OK); }
private bool TryDeleteRecordSQS(Message InMessage) { #if DEBUG // Debug doesn't empty the queue - it's just reads records return(true); #else try { var DeleteRequest = new DeleteMessageRequest { QueueUrl = Config.Default.AWSSQSQueueUrl, ReceiptHandle = InMessage.ReceiptHandle }; var DeleteResponse = SqsClient.DeleteMessage(DeleteRequest); return(DeleteResponse.HttpStatusCode == HttpStatusCode.OK); } catch (Exception Ex) { CrashReporterProcessServicer.WriteException("TryDeleteRecordSQS: " + Ex.ToString()); } return(false); #endif }