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/kafka/KafkaCanalConnector.java:282
*/
@Override
public void ack() {
waitClientRunning();
if (!running) {
return;
}
if (kafkaConsumer != null) {
kafkaConsumer.commitSync();
}
if (kafkaConsumer2 != null) {
kafkaConsumer2.commitSync();
}
}
@Override
public void subscribe(String filter) throws CanalClientException {
throw new CanalClientException("mq not support this method");
}
@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");
}
@OverrideView on GitHub (pinned to 87be50e876)
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.
When it happens
Trigger: Thrown at client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java:282 when the library encounters an invalid state.
Common situations: 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.
AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14).
Data as JSON: /api/errors/4ec56e9a87da501d.
Report an issue: GitHub.