I have a Flink application that sources two Kafka ...
# troubleshooting
c
I have a Flink application that sources two Kafka topics. The first topic has 12 partitions and the second one has 192 partitions and has 10x more data than the first topic. So, I have 4 parallelisms for the task that sources the first topic and 24 for all other tasks. The issue is the task that sources the first topic will finish (or stop) consuming the topic after the app runs for a day or so while the task that sources the second topic continues to run for days. Please see the screen shot. I don't know why the first task will finish when it is not in batch mode. Please help me resolve this issue.
a
The Kafka source shouldn't transition to
FINISHED
by default unless you set the source as bounded or you set up a stopping offset as in using
setUnbounded
for datastream API. Could you share the code you use to initialize the source?
c
Yes, I called sourceBuilder.setBounded(OffsetsInitializer.latest()) unintentionally. It doesn't happen again after I remove the call. Thanks.
✅ 1