Hi,
I have a multiple high level streams DSL to execute.

In first it reads from a source topic processes the data and sends the data
to a sink.

In second it again reads from same source topic processes the data and
sends it to a different topic.

For now these two operations are independent.

Now I can start two java applications.

But I was wondering if I can do all in single java application.

So my code is like:
-----------------------------------------------------------------------------------------------------
Properties props = new Properties();
props.put(StreamsConfig.APPLICATION_ID_CONFIG, "advice");
.....

KStreamBuilder builder = new KStreamBuilder();
.....

//first stream
builder.stream(Serdes.String(), valueSerde, "advice-stream")
.......

//second steam
builder.stream(Serdes.String(), valueSerde, "advice-stream")
........


final KafkaStreams streams = new KafkaStreams(builder, props);
.........
streams.start();

Will this work?

What will be the output of the following command
kafka-run-class.sh kafka.admin.ConsumerGroupCommand --new-consumer
--bootstrap-server localhost:9092 --group advice --describe

Will it show me two offsets one for first stream and one for second as each
may have different offsets.

What about rocksdb state stores?

Or this is not possible?

Thanks
Sachin

Reply via email to