Daniel Wojda created KAFKA-6720:
-----------------------------------

             Summary: Inconsistent Kafka Streams behaviour when topic does not 
exist
                 Key: KAFKA-6720
                 URL: https://issues.apache.org/jira/browse/KAFKA-6720
             Project: Kafka
          Issue Type: Bug
          Components: streams
    Affects Versions: 1.0.1
            Reporter: Daniel Wojda


When Kafka Streams starts it reads metadata about topics used in topology
 and it's partitions. If topology of that stream contains stateful operation 
like #join, and a topic does not exist 
[TopologyBuilderException|https://github.com/apache/kafka/blob/5bdfbd13524da667289cacb774bb92df36a253f2/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamPartitionAssignor.java#L719]
 will be thrown.

In case of streams with simple topology with stateless operations only, like 
#mapValue, and topic does not exist, Kafka Streams does not throw any 
exception, just logs a warning:
 ["log.warn("No partitions found for topic {}", 
topic);"|https://github.com/apache/kafka/blob/5bdfbd13524da667289cacb774bb92df36a253f2/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamPartitionAssignor.java#L435]
 

I believe the behaviour of Kafka Streams in both cases should be the same, and 
it should throw TopologyBuilderException.

I am more than happy to prepare a Pull Request if it is a valid issue.

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to