lightbend/kafka-streams-scala

Is 2.11 supported?

Opened this issue · 2 comments

I cannot seem to compile a simple application based on Confluent's example in Scala 2.11. Below is a sample of the code I am using. The compiler cannot make sense of the flatMapValues signature, with or without the implicit conversions. I am guessing that I am hitting an issue with the SAM translations from the Java 8 stream API. Does this library have some additional conversions that are meant to apply here? Is 2.11 supported?

    val statusUpdates: KStream[String, StatusUpdate] =
      builder.stream[String, StatusUpdate](Serdes.String(), CustomSerdes.statusUpdate, "statusUpdate")

    statusUpdates.
      flatMapValues(statusUpdate => statusUpdate.metrics.getOrElse(Seq.empty)).
      to(Serdes.String(), CustomSerdes.metric, "metrics")

    new KafkaStreams(builder, streamingConfig)

Can you please point to the full example of Confluent ? The library supports Scala 2.11 and we have examples of working flatMapValues here.

I can take a look at the error by trying out the example.

@debasishg I forgot to call into KafkaStreamS, after fixing it it's working now. Thanks!