Hi Nicolas,

Good question! I'm not sure why it is a terminal operation, maybe one of
the original authors can chip in. However, you could probably work around
it by using TopologyBuilder.addProcessor(...) rather then KStream.process

Thanks,
Damian

On Wed, 18 Jan 2017 at 13:48 Nicolas Fouché <nfou...@onfocus.io> wrote:

> Hi,
>
> as far as I understand, calling `KStream.process` prevents the developer
> from adding further operations to a `KStreamBuilder` [1], because its
> return type is `void`. Good.
>
> But it also prevents the developer from adding operations to its superclass
> `TopologyBuilder`. In my case I wanted to add a sink, and the parent of
> this sink would be the name of the Processor that is created by
> `KStream.process`. Is there any reason why this method does not return the
> processor name [2] ? Is it because it would be a bad idea continuing
> building my topology with the low-level API ?
>
> [1]
>
> https://github.com/confluentinc/examples/blob/3.1.x/kafka-streams/src/test/java/io/confluent/examples/streams/MixAndMatchLambdaIntegrationTest.java%23L56
> [2]
>
> https://github.com/apache/kafka/blob/b6011918fbc36bfaa465bdcc750e2435985d9101/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamImpl.java#L391
>
>
> Thanks.
> Nicolas.
>

Reply via email to