conduktor.io ↗

Kafka Exception MisconfiguredInternalTopicException

org.apache.kafka.streams.errors.MisconfiguredInternalTopicException
Non-retriable Streams

MisconfiguredInternalTopicException is a Kafka client-side exception (org.apache.kafka.streams.errors.MisconfiguredInternalTopicException).

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.streams.errors.MisconfiguredInternalTopicException: Existing internal topic my-app-Counts-changelog has invalid partitions: expected: 1; actual: 3. Use 'kafka-streams-application-reset.sh' tool to clean up invalid topics before processing. at org.apache.kafka.streams.processor.internals.InternalTopicManager.getNumPartitions(InternalTopicManager.java:380) at org.apache.kafka.streams.processor.internals.InternalTopicManager.validateTopics(InternalTopicManager.java:300) at org.apache.kafka.streams.processor.internals.InternalTopicManager.makeReady(InternalTopicManager.java:200) at org.apache.kafka.streams.processor.internals.StreamsPartitionAssignor.prepareTopic(StreamsPartitionAssignor.java:1180) at org.apache.kafka.streams.processor.internals.StreamsPartitionAssignor.assign(StreamsPartitionAssignor.java:560)

Diagnostic Commands

kafka-topics.sh --bootstrap-server <b>:9092 --describe --topic <application.id>-<store>-changelog # check actual partition count vs input topic kafka-configs.sh --bootstrap-server <b>:9092 --describe --entity-type topics --entity-name <application.id>-<store>-changelog # confirm cleanup.policy=compact kafka-streams-application-reset.sh --application-id <app-id> --bootstrap-server <b>:9092 --input-topics <topics> # then restart to recreate internal topics correctly

Related

Related Streams exceptions: BrokerNotFoundException · InternalTopicsAlreadySetupException · InvalidStateStoreException · InvalidStateStorePartitionException · LockException · MissingInternalTopicsException · MissingSourceTopicException · ProcessorStateException

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