conduktor.io ↗

Kafka Exception TopologyException

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

Indicates a pre run time error occurred while parsing the Topology logical topology to construct the ProcessorTopology physical processor topology.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.streams.errors.TopologyException: Invalid topology: Topology has no stream threads and no global threads, must subscribe to at least one source topic or global table. at org.apache.kafka.streams.processor.internals.InternalTopologyBuilder.buildTopology(InternalTopologyBuilder.java:1158) at org.apache.kafka.streams.processor.internals.TopologyMetadata.buildAndRewriteTopology(TopologyMetadata.java:289) at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:1003) at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:868) at com.example.MyStreamsApp.main(MyStreamsApp.java:42)

Diagnostic Commands

System.out.println(builder.build().describe()); # print the topology graph to verify sources/processors/stores and spot duplicate or missing nodes

Related

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

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