diff --git a/src/coordinator.rs b/src/coordinator.rs index ba67d74..36c93be 100644 --- a/src/coordinator.rs +++ b/src/coordinator.rs @@ -501,6 +501,14 @@ impl Coordinator { items } else { tracing::error!(?receipt_handle, "Failed to parse message body"); + + sqs_delete_message( + &self.sqs_client, + &self.config.queues.db_sync_queue_url, + receipt_handle, + ) + .await?; + return Ok(()); }; diff --git a/src/participant.rs b/src/participant.rs index 9f7af8c..ad36fa6 100644 --- a/src/participant.rs +++ b/src/participant.rs @@ -210,6 +210,14 @@ impl Participant { items } else { tracing::error!(?receipt_handle, "Failed to parse message body"); + + sqs_delete_message( + &self.sqs_client, + &self.config.queues.db_sync_queue_url, + receipt_handle, + ) + .await?; + return Ok(()); };