{"record":{"id":"c39ff331fa9cc943","repo":"alibaba/canal","slug":"mq-not-support-this-method-c39ff3","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/pulsarmq/PulsarMQCanalConnector.java","lineNumber":467,"sourceCode":"     * @return void\n     * @date 2021/9/13 22:28\n     * @author chad\n     * @since 1 by chad at 2021/9/13 添加注释\n     */\n    @Override\n    public void rollback() throws CanalClientException {\n        try {\n            if (this.lastGetBatchMessage != null) {\n                this.consumer.negativeAcknowledge(this.lastGetBatchMessage);\n            }\n        } finally {\n            this.lastGetBatchMessage = null;\n        }\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\n    public Message getWithoutAck(int batchSize, Long timeout, TimeUnit unit) throws CanalClientException {\n        throw new CanalClientException(\"mq not support this method\");\n    }\n\n    @Override","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client/src/main/java/com/alibaba/otter/canal/client/pulsarmq/PulsarMQCanalConnector.java#L449-L485","documentation":"Error \"mq not support this method\" thrown in alibaba/canal.","triggerScenarios":"Thrown at client/src/main/java/com/alibaba/otter/canal/client/pulsarmq/PulsarMQCanalConnector.java:467 when the library encounters an invalid state.","commonSituations":"Unsupported method on Pulsar connector. Keep the guard and document which CanalConnector operations are valid for MQ-backed instances.","solutions":["Avoid subscribe/unSubscribe/rollback calls on the Pulsar MQ connector; only get/ack are supported.","Configure the topic and subscription via connector properties 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"}