conduktor.io ↗

Kafka Exception InvalidStateStorePartitionException

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

Indicates that the specific state store being queried via StoreQueryParameters used a partitioning that is not assigned to this instance. You can use metadataForAllStreamsClients() to discover the correct instance that hosts the requested partition.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.streams.errors.InvalidStateStorePartitionException: The specified partition 1 for store source-table does not exist. at org.apache.kafka.streams.state.internals.QueryableStoreProvider.getStore(QueryableStoreProvider.java:75) at org.apache.kafka.streams.KafkaStreams.store(KafkaStreams.java:1190) at com.example.streams.PartitionQueryService.queryPartition(PartitionQueryService.java:53)

Diagnostic Commands

kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic <application.id>-<store>-changelog # confirm the store's partition count / valid partition range

Related

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

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