{"record":{"id":"45a301560a714bfe","repo":"apache/seatunnel","slug":"acknowledge-failed","errorCode":"ACKNOWLEDGE_FAILED","errorMessage":"Failed to delete Azure Queue Storage messages for checkpoint ${checkpointId}","messagePattern":"Failed to delete Azure Queue Storage messages for checkpoint (.+?)","errorType":"error_code","errorClass":"AzureQueueConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/source/AzureQueueStorageSourceReader.java","lineNumber":191,"sourceCode":"        List<AzureQueueMessage> messages;\n        synchronized (acknowledgementLock) {\n            Map.Entry<Long, List<AzureQueueMessage>> checkpoint =\n                    pendingAcknowledgements.floorEntry(checkpointId);\n            if (checkpoint == null) {\n                return;\n            }\n            messages = new ArrayList<>(checkpoint.getValue());\n        }\n\n        for (AzureQueueMessage message : messages) {\n            try {\n                synchronized (message) {\n                    if (!message.isDeleted()) {\n                        receiver.delete(message);\n                    }\n                }\n            } catch (Exception e) {\n                throw new AzureQueueConnectorException(\n                        AzureQueueConnectorErrorCode.ACKNOWLEDGE_FAILED,\n                        \"Failed to delete Azure Queue Storage messages for checkpoint \"\n                                + checkpointId,\n                        e);\n            }\n        }\n\n        synchronized (acknowledgementLock) {\n            leasedMessages.removeAll(messages);\n            unacknowledgedMessages.removeAll(messages);\n            pendingAcknowledgements.headMap(checkpointId, true).clear();\n            for (List<AzureQueueMessage> pending : pendingAcknowledgements.values()) {\n                pending.removeAll(messages);\n            }\n        }\n    }\n\n    @Override","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/source/AzureQueueStorageSourceReader.java#L173-L209","documentation":"When a checkpoint completes, the reader deletes the messages accumulated under that checkpoint. If receiver.delete(message) throws for any message, the reader throws AzureQueueConnectorException(ACKNOWLEDGE_FAILED) naming the checkpointId, so the failure is surfaced to the engine instead of being silently swallowed (messages would reappear after visibility expiry).","triggerScenarios":"notifyCheckpointComplete(checkpointId) iterates pending messages and receiver.delete() raises — e.g. pop receipt expired (visibility elapsed), message already deleted, or transient Azure HTTP errors.","commonSituations":"Slow checkpoints where processing takes longer than visibility_timeout_seconds so the pop receipt is stale, duplicate deletes from overlapping checkpoints, or Azure throttling/outage during delete.","solutions":["Increase visibility_timeout_seconds so messages stay invisible through checkpoint intervals","Retry the job — deletes are retried for messages not yet deleted","Ensure checkpoint intervals are shorter than the visibility timeout","Inspect the wrapped cause for Azure-specific delete errors"],"exampleFix":"// before\nvisibility_timeout_seconds = 60   # checkpoint interval 120s -> pop receipt expires\n// after\nvisibility_timeout_seconds = 600","handlingStrategy":"retry","validationCode":"// Ensure checkpoint interval fits within visibility window\nif (checkpointIntervalMs >= visibilityTimeoutSeconds * 1000L) {\n    throw new IllegalArgumentException(\"checkpoint interval too long for visibility timeout\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    reader.notifyCheckpointComplete(checkpointId);\n} catch (AzureQueueConnectorException e) {\n    if (e.getErrorCode() == AzureQueueConnectorErrorCode.ACKNOWLEDGE_FAILED) {\n        // engine will retry/restore; log cause for Azure delete errors\n        LOG.warn(\"Ack failed for checkpoint {}\", checkpointId, e.getCause());\n    }\n}","preventionTips":["Keep checkpoint interval well below visibility_timeout_seconds","Monitor Azure Storage throttling (429) and latency","Renew visibility for long processing (see VISIBILITY_RENEWAL_FAILED)","Expect at-least-once semantics; make downstream deletes idempotent"],"tags":["azure","checkpoint","delete","acknowledge"],"backgroundTag":"upstream-api-error","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}