Skip to main content
Rohit1997jio
Silver ⭐️⭐️⭐️
Nov 16, 2023 8:33 AM UTC
Solved

terminating kafka connection if publish kafka processor is idle for 5 min and star when data receive

Hi ,

In Apache NIFI  I am  consuming data from one Kafka topic and publishing that data to customer Kafka topic . For this iam using ConsumeKafka and PublishKafka processor respectively.

If outgoing dataflow is idle for more than 5 minutes, the Kafka connection with customer should be terminated and  reconnected when there is  any new  messages consumed .

how to do this with publish kafka processor ??

joseomjr
joseomjrAnswer
Gold ⭐️⭐️
Dec 8, 2023 8:47 PM UTC

A similar question was recently asked. Kafka connections are meant to be persistent. If you want to handle what you're asking, you'll have to custom build a solution that monitors the queues and stop/starts the processors. All of these can be achieved via NiFi REST API.

1 reply

joseomjr
joseomjrAnswer
Gold ⭐️⭐️
Dec 8, 2023 8:47 PM UTC

A similar question was recently asked. Kafka connections are meant to be persistent. If you want to handle what you're asking, you'll have to custom build a solution that monitors the queues and stop/starts the processors. All of these can be achieved via NiFi REST API.

Translate