Hey Flink, I have a few questions regarding the Fl...
# troubleshooting
s
Hey Flink, I have a few questions regarding the Flink and Kafka connectors and two-phase commits. • Q1. As we already know, the only number of Flink-Kafka consumers we can make is the total number of partitions in Kafka, so how does Flink scale horizontally? • Q2. I want to implement a two-phase commit with Kafka to Flink as the source and Flink to Postgresql as the sink. I want to create a POC for that; can anyone give me examples or documents? • Q3. I have my custom code written in GO for data transformation. To use Flink as ETL, I need to decide whether I need to convert my code to Java or whether I can directly implement GO in Flink.
m
On Q2 I don’t think the Flink Postgres connector supports 2PC
s
If I go towards Pinot or Clickhouse
m
There aren’t ASF Flink supported connectors for those
s
So than which DB I can use as a sink.
m
You can use all sorts of DBs, but DBs don’t support two phase commit sinks
The Kafka sink supports 2PC
✅ 1
s
Aah Okh got it so can you give me some flink or Kafka examples where 2PC is used in code.
m
There’s a variety of blog posts on this on the Flink website
s
Please let me know if you can answer the remaining two questions as well. Thanks
z
On Q1, you can make the number of consumers to be any number smaller or equal to number of partitions
s
Yes that is the problem the number of consumers will be equal to the number of Kafka partitions only so how can I horizontally scale then.
m
Why is that a problem?
If you want to have more consumers, why not increase the number of partitions? You can't read with multiple consumers from one Kafka partition, that would mess up all delivery guarantees
Q3: You can't use Go in Flink. You'll have to use Java, Python or SQL
s
One more thing how we can ensure exactly once consistency in DB.