{"record":{"id":"08db66e22f42cc9a","repo":"alibaba/canal","slug":"error-08db66","errorCode":null,"errorMessage":"error","messagePattern":"error","errorType":"exception","errorClass":"CanalClientException","httpStatus":null,"severity":"error","filePath":"client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java","lineNumber":137,"sourceCode":"        if (connect == null) {\n            this.connect();\n        }\n\n        Consumer consumer = new DefaultConsumer(channel) {\n\n            @Override\n            public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties,\n                                       byte[] body) throws IOException {\n\n                if (body != null) {\n                    channel.basicAck(envelope.getDeliveryTag(), process(body));\n                }\n            }\n        };\n        try {\n            channel.basicConsume(queueName, false, consumer);\n        } catch (IOException e) {\n            throw new CanalClientException(\"error\", e);\n        }\n    }\n\n    @Override\n    public void subscribe() throws CanalClientException {\n        this.subscribe(null);\n    }\n\n    @Override\n    public void unsubscribe() throws CanalClientException {\n        // 取消订阅 直接强行断开吧\n        this.disconnect();\n    }\n\n    @Override\n    public Message get(int batchSize) throws CanalClientException {\n        return null;\n    }","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java#L119-L155","documentation":"Error \"error\" thrown in alibaba/canal.","triggerScenarios":"Thrown at client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java:137 when the library encounters an invalid state.","commonSituations":"Generic error in RabbitMQ consumer loop. Replace the bare 'error' log context at call sites with the operation in progress; guard the loop so one failure does not spin.","solutions":["Look at the full stack trace for the underlying RabbitMQ consumer error; typical causes are connection loss or channel closure during consumption.","Enable automatic recovery on the RabbitMQ connection factory or restart the connector when this occurs."],"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"}