alibaba/canal · error · CanalClientException

error

Error message

error

What it means

Error "error" thrown in alibaba/canal.

Source

Thrown at client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java:137

        if (connect == null) {
            this.connect();
        }

        Consumer consumer = new DefaultConsumer(channel) {

            @Override
            public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties,
                                       byte[] body) throws IOException {

                if (body != null) {
                    channel.basicAck(envelope.getDeliveryTag(), process(body));
                }
            }
        };
        try {
            channel.basicConsume(queueName, false, consumer);
        } catch (IOException e) {
            throw new CanalClientException("error", e);
        }
    }

    @Override
    public void subscribe() throws CanalClientException {
        this.subscribe(null);
    }

    @Override
    public void unsubscribe() throws CanalClientException {
        // 取消订阅 直接强行断开吧
        this.disconnect();
    }

    @Override
    public Message get(int batchSize) throws CanalClientException {
        return null;
    }

View on GitHub (pinned to 87be50e876)

Solutions

  1. Look at the full stack trace for the underlying RabbitMQ consumer error; typical causes are connection loss or channel closure during consumption.
  2. Enable automatic recovery on the RabbitMQ connection factory or restart the connector when this occurs.

When it happens

Trigger: Thrown at client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java:137 when the library encounters an invalid state.

Common situations: 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.


AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14). Data as JSON: /api/errors/08db66e22f42cc9a. Report an issue: GitHub.