title: Can a kafka Stream join have more that two topics that can be joined together
body: <p>I have the below example which will consume these two topics -&gt; &quot;test-topic-A&quot; and  &quot;test-topic-B&quot; perform a join and then output to a new streamed topic -&gt; &quot;test-topic-Streamed&quot;, this work very well but is it possible to <em><strong>join more than two topic into a single stream</strong></em>? I have a .py script that acts as a producer and another .py script as a consumer<br />
  Python Producer console:
  <strong>Key produced -&gt; test-key-join
  Topic produced -&gt; test-topic-A
  Data in topic -&gt; Producer 1 left topic
  {'status_code': 200, 'error': None}
  message sent successfully...
  Key produced -&gt; test-key-join
  Topic produced -&gt; test-topic-B
  Data in topic -&gt; Producer 2 right topic
  {'status_code': 200, 'error': None}</strong></p>
  <p>Python Consumer console:<em><strong>strong text</strong></em>
  <strong>ConsumerRecord(topic='test-topic-Streamed', partition=0, offset=82, timestamp=1659716723171,
  timestamp_type=0, key=b'test-key-join', value=b'LEFT=&quot;Producer 1 left topic&quot;, RIGHT=&quot;Producer
  2 right topic&quot;', headers=[], checksum=None, serialized_key_size=13, serialized_value_size=60,
  serialized_header_size=-1)</strong></p>
  <pre><code>public static void main(String[] args) throws Exception {
  
  
  private final static String outputTopic = &quot;test-topic-Streamed&quot;;
  Properties props = new Properties();
  props.put(StreamsConfig.APPLICATION_ID_CONFIG, &quot;streams-pipe&quot;);
  props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, &quot;localhost:9093&quot;); //
  props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());
  props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass());  
  
  final StreamsBuilder builder = new StreamsBuilder();
  System.out.println(&quot;Stream-Stream Inner Many Topics Join Example \n &quot;);
  KStream&lt;String, String&gt; leftSource = builder.stream(&quot;test-topic-A&quot;);
  KStream&lt;String, String&gt; rightSource = builder.stream(&quot;test-topic-B&quot;);
  
  KStream&lt;String, String&gt; joined = leftSource.join(rightSource, (leftValue, rightValue) -&gt; &quot;LEFT=&quot; + leftValue + &quot;, RIGHT=&quot; + rightValue, /* ValueJoiner */
    JoinWindows.of(Duration.ofSeconds(5)),//ofMinutes(5)),
    Joined.with(
        Serdes.String(), /* key */
        Serdes.String(), /* left value */
        Serdes.String()) /* right value */
          
  );
  // Output the stream 
  joined.to(outputTopic);    
         
  //Create the Kafka Streams instance
  final Topology topology = builder.build();
  final KafkaStreams streams= new KafkaStreams(topology, props);
  final CountDownLatch latch = new CountDownLatch(1);
  
  
  Runtime.getRuntime().addShutdownHook(new Thread(&quot;streams-shutdown-hook&quot;) {
    @Override
    public void run() {
      streams.close();
      latch.countDown();
    }
  });
  
  try {
    streams.start();
    latch.await();
  } catch (Throwable e) {
    System.exit(1);
  }
  System.exit(0);
  
  
   }//End Main
  </code></pre>