conduktor.io ↗

Kafka Exception InvalidTopicException

org.apache.kafka.common.errors.InvalidTopicException
Non-retriable Admin

The client has attempted to perform an operation on an invalid topic. For example the topic name is too long, contains invalid characters etc. This exception is not retriable because the operation won't suddenly become valid.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.common.errors.InvalidTopicException: The request attempted to perform an operation on an invalid topic.

Diagnostic Commands

# Describe topic partitions, leaders, and ISR kafka-topics.sh --describe --topic '<topic>' --bootstrap-server localhost:9092 # List topics and search for the target topic kafka-topics.sh --list --bootstrap-server localhost:9092 | grep -P '[^a-zA-Z0-9._-]'

Related

Protocol error: INVALID_TOPIC_EXCEPTION (code 17)

Related Admin exceptions: InvalidConfigurationException · InvalidPartitionsException · InvalidReplicationFactorException · PolicyViolationException · ThrottlingQuotaExceededException · TopicExistsException · UnsupportedVersionException

Hitting InvalidTopicException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.