alibaba/canal · error · CanalClientException

mq not support this method

Error message

mq not support this method

What it means

Error "mq not support this method" thrown in alibaba/canal.

Source

Thrown at client/src/main/java/com/alibaba/otter/canal/client/pulsarmq/PulsarMQCanalConnector.java:467

     * @return void
     * @date 2021/9/13 22:28
     * @author chad
     * @since 1 by chad at 2021/9/13 添加注释
     */
    @Override
    public void rollback() throws CanalClientException {
        try {
            if (this.lastGetBatchMessage != null) {
                this.consumer.negativeAcknowledge(this.lastGetBatchMessage);
            }
        } finally {
            this.lastGetBatchMessage = null;
        }
    }

    @Override
    public Message get(int batchSize) throws CanalClientException {
        throw new CanalClientException("mq not support this method");
    }

    @Override
    public Message get(int batchSize, Long timeout, TimeUnit unit) throws CanalClientException {
        throw new CanalClientException("mq not support this method");
    }

    @Override
    public Message getWithoutAck(int batchSize) throws CanalClientException {
        throw new CanalClientException("mq not support this method");
    }

    @Override
    public Message getWithoutAck(int batchSize, Long timeout, TimeUnit unit) throws CanalClientException {
        throw new CanalClientException("mq not support this method");
    }

    @Override

View on GitHub (pinned to 87be50e876)

Solutions

  1. Avoid subscribe/unSubscribe/rollback calls on the Pulsar MQ connector; only get/ack are supported.
  2. Configure the topic and subscription via connector properties instead of canal subscribe APIs.

When it happens

Trigger: Thrown at client/src/main/java/com/alibaba/otter/canal/client/pulsarmq/PulsarMQCanalConnector.java:467 when the library encounters an invalid state.

Common situations: Unsupported method on Pulsar connector. Keep the guard and document which CanalConnector operations are valid for MQ-backed instances.


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