nick christidis
07/26/2023, 4:05 PMList<DataStream<T>> dataStreams = kafkaSourceInfos.stream()
.map(srcInfo -> {
final KafkaSource<T> kafkaSource = buildKafkaSource(srcInfo);
return kafkaSource;
});
.toList();
Note: Imagine buildKafkaSource(..) is an auxiliary method which is creating a KafkaSource with specific properties with a specific group.id
When I merge all those dataStreams with the method DataStream#union (https://nightlies.apache.org/flink/flink-docs-master/api/java/org/apache/flink/streaming/api/datastream/DataStream.html#union-org.ap[…]ataStream...-)
so to have one and then wire my ProcessFunction, etc.
Meaning (pseudo-code more or less):
SingleOutputStreamOperator<T> source = dataStreams
.stream()
.skip(1) // cause reduce will already take first element
.reduce(dataStreams.get(0), DataStream::union)
.map(i -> i);
....
source.keyBy(..).process(...)
The group.id is never registered (consumer group with this id) - this is cross checked from Burrow, but also from inspecting kafka internals.
By not registered, I mean that kafka consumption works as it should, but the offset lag, and other metrics which I should have based on group.id...they are not there, as there is not a consumer group with this group.id.
By the time I remove the union function all works fine.
Is this a known issue? Has anyone else experienced that before?
Thanks in advance!Martijn Visser
07/26/2023, 5:01 PMnick christidis
07/26/2023, 9:17 PMnick christidis
07/27/2023, 12:55 PMMartijn Visser
07/27/2023, 12:56 PMnick christidis
07/27/2023, 3:20 PMMartijn Visser
07/27/2023, 7:36 PM