{"record":{"id":"4ec56e9a87da501d","repo":"alibaba/canal","slug":"mq-not-support-this-method","errorCode":null,"errorMessage":"mq not support this method","messagePattern":"mq not support this method","errorType":"exception","errorClass":"CanalClientException","httpStatus":null,"severity":"error","filePath":"client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java","lineNumber":282,"sourceCode":"     */\n    @Override\n    public void ack() {\n        waitClientRunning();\n        if (!running) {\n            return;\n        }\n\n        if (kafkaConsumer != null) {\n            kafkaConsumer.commitSync();\n        }\n        if (kafkaConsumer2 != null) {\n            kafkaConsumer2.commitSync();\n        }\n    }\n\n    @Override\n    public void subscribe(String filter) throws CanalClientException {\n        throw new CanalClientException(\"mq not support this method\");\n    }\n\n    @Override\n    public Message get(int batchSize) throws CanalClientException {\n        throw new CanalClientException(\"mq not support this method\");\n    }\n\n    @Override\n    public Message get(int batchSize, Long timeout, TimeUnit unit) throws CanalClientException {\n        throw new CanalClientException(\"mq not support this method\");\n    }\n\n    @Override\n    public Message getWithoutAck(int batchSize) throws CanalClientException {\n        throw new CanalClientException(\"mq not support this method\");\n    }\n\n    @Override","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java#L264-L300","documentation":"Error \"mq not support this method\" thrown in alibaba/canal.","triggerScenarios":"Thrown at client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java:282 when the library encounters an invalid state.","commonSituations":"Unsupported method on an MQ-backed connector. Keep the guard: Kafka connectors cannot support server-style subscribe semantics; callers should check connector type before invoking.","solutions":["Do not call subscribe/unSubscribe/rollback on the Kafka connector; MQ connectors only support get/ack semantics over consumed messages.","Manage offsets through Kafka consumer group configuration instead of canal subscribe APIs."],"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"}