{"record":{"id":"42154fb2c738caf0","repo":"alibaba/canal","slug":"mq-get-ack-not-support-concurrent-async-ack-42154f","errorCode":null,"errorMessage":"mq get/ack not support concurrent & async ack","messagePattern":"mq get/ack not support concurrent & async ack","errorType":"exception","errorClass":"CanalClientException","httpStatus":null,"severity":"error","filePath":"client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java","lineNumber":196,"sourceCode":"    public void rollback(long batchId) throws CanalClientException {\n        throw new CanalClientException(\"mq not support this method\");\n\n    }\n\n    @Override\n    public List<Message> getList(Long timeout, TimeUnit unit) throws CanalClientException {\n        List<Message> messages = getListWithoutAck(timeout, unit);\n        if (messages != null && !messages.isEmpty()) {\n            ack();\n        }\n        return messages;\n    }\n\n    @Override\n    public List<Message> getListWithoutAck(Long timeout, TimeUnit unit) throws CanalClientException {\n        try {\n            if (this.lastGetBatchMessage != null) {\n                throw new CanalClientException(\"mq get/ack not support concurrent & async ack\");\n            }\n\n            ConsumerBatchMessage batchMessage = messageBlockingQueue.poll(timeout, unit);\n            if (batchMessage != null) {\n                this.lastGetBatchMessage = batchMessage;\n                return batchMessage.getData();\n            }\n        } catch (InterruptedException ex) {\n            logger.warn(\"Get message timeout\", ex);\n            throw new CanalClientException(\"Failed to fetch the data after: \" + timeout);\n        }\n        return Lists.newArrayList();\n    }\n\n    @Override\n    public List<FlatMessage> getFlatList(Long timeout, TimeUnit unit) throws CanalClientException {\n        List<FlatMessage> messages = getFlatListWithoutAck(timeout, unit);\n        if (messages != null && !messages.isEmpty()) {","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java#L178-L214","documentation":"Error \"mq get/ack not support concurrent & async ack\" thrown in alibaba/canal.","triggerScenarios":"Thrown at client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java:196 when the library encounters an invalid state.","commonSituations":"Concurrent async ack on RabbitMQ connector. Serialize acks per batch; concurrent acknowledgements on one channel are not supported by the client.","solutions":["Disable concurrent/async ack for the RabbitMQ connector; process and ack batches sequentially.","Use getWithoutAck with manual ack only from a single consumer thread."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}