Flink Kafka connector - apache-kafka

I am using the KafkaConsumer82 and connector jar version is 0.10.2 and kafka version is 0.9.1 and flink version is 1.0.0.
The Java consumer works fine when I run it from with in an IDE as a standalone main program. But when I run it from flink run, then I don't see the messages being consumed and don't see any log in stdout of the JobManager in 1ocalhost:8081. Please let me know what might be the issue.

As a first step I would suggest getting the versions in sync. If you're using Kafka 0.9 and Flink 1.0.0 I would suggest using flink-connector-kafka-0.9 version 1.0.0 which contains FlinkKafkaConsumer09.

Related

upgrade Apache kafka from 2.7 version to 3.X without zookeeper on production kafka cluster

we have production Kafka cluster with 2.7 version , 5 Kafka brokers on RHEL 7.9 version
we want to upgrade the Kafka version to 3.X version
3.X version not include zookeeper , so we are wondering if we can do upgrade without any data loss
regarding to kafka 2.7 version , Kafka storing the metadata on zookeeper servers ( as brokers ids , topics names etc )
but is it possible to perform rolling upgrade from 2.7 to 3.x version without any data loss?
The upgrade guide should contain all infos you need.
While KRaft mode (without ZooKeeper) is production ready since 3.3, they still keep ZooKeeper around for compatibility until the 4.0 release.
Furthermore If I understand correctly, it is currently only possible to set up a fresh cluster in KRaft mode, but not to migrate an existing one with ZooKeeper. Kafka 3.5 will be a migration version they intend you to migrate from ZooKeeper to KRaft.
This is explained quite nicely in the release notes from Kafka, especially for Kafka 3.3 and the release video
As long as your Kafka brokers are not running with Java 8 still, you can simply do a rolling upgrade from 2.7 to 3.X like you are used to.

Kafka exporter for latest kafka (kafka 17)

I want to add monitoring of my kafka.
I've found product named kafka exporter which depends on 14.9.3. I use kafka 17(https://artifacthub.io/packages/helm/bitnami/kafka/17.0.0) and it doesn't work with latest kafka exporter(https://artifacthub.io/packages/helm/prometheus-community/prometheus-kafka-exporter, version: 1.6.0) because of version incompatibility. I investigated the issue and found out that it is because kafka exporter can't work with kafka 17. I tried to downgrade kafka to to 14.9.3 and problem disappeared.
So my question is: how to monitor Kafka 17 ?

nifi publishKafka processor can not publish on kafka 2.5

I'm trying to publish a simple json to a kafka topic. I'm using the dockerized version of both apache nifi and apache kafka (latest of both). the kafka version is 2.5 but there is no processor to connect to this version.
When I use the other publishKafka processors I get this error:"can not update metadata in 5000 ms".
Can anyone help me about the problem?
Kafka up to 2.6 is now supported in NiFi 1.12.X. You need to upgrade and switch to the new Kafka 2.6 processors.

Kafka upgrade path form 0.10.0.1 to 2.5.0

I have 5 kafka clusters and one of them runs kafkamirror to consume from the other 4 kakfa and produce for the main kafka cluster.
I've tried the latest version of kafka separately and my apps seems to work fine with the newest version. The upgrade process, as described in the Kafka upgrade https://kafka.apache.org/documentation/#upgrade is a rolling update, first going to 2.5.0 and maintaining the broker protocol with 0.10.0 and then a rolling restart with the newer protocol
The problem is the mirrormaker and have no downtime in the upgrade process to avoid loss of messages. I've read that consumers should be upgraded first, in this case mirrormaker is producer and consumer at the same time, so I tryed to upgrade my main kafka cluster first and now is running with 2.5.0 with 2.5.0 protocol and the other cluster of my tests it's still on 0.10.0. When I try to initiate the mirror I am getting some warnings/errors because I am still using old deprecated configs:
Which path should I follow to do the upgrade?

Not able to upgrade Kafka cluster from 1.0.0 to 2.0

I am trying to upgrade my Kafka cluster from Kafka 1.0.0 to Kafka 2.0 I stopped all the instances in the cluster and updated the server.properties file with -
inter.broker.protocol.version=1.0
I am upgrading from 1.0.0 and have not overridden the message format, so inter.broker.protocol.version is the only parameter that I have to update.
I restarted Kafka but nothing happens when I do
grep "Kafka version" /usr/local/kafka/logs/*
or go inside libs folder I see 1.0.0, not 2.0 which suggests Kafka is still running on 1.0.0 can somebody please guide me what I am doing wrong?
Note: I am following the up gradation procedure from here
https://kafka.apache.org/documentation/#upgrade