<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: terminate kafka connection if publish kafka processor is idle for 5 min and start when data received in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/379373#M243847</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107711"&gt;@Rohit1997jio&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;As &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105558"&gt;@joseomjr&lt;/a&gt; already pointed out, by doing this, you defeat the single purpose of using Kafka. As you already know, Kafka is a stream-processing platform and basically function in a very basic way as a queue of messages.&lt;BR /&gt;&lt;BR /&gt;Integrating Kafka with NiFi, especially using the processor ConsumeKafka, you basically create a bucket at the end of the queue. As long as messages are present in the queue (Kafka in your case), you will have messages arriving in your bucket (you NiFi processing layer in your case). When you do not have any messages in the kafka system, your ConsumeKafka processor will be in a let's call it idle state, meaning that it will not waste resources in vain - it will however use some resources to check whether new messages arrived or not.&lt;BR /&gt;&lt;BR /&gt;That being said, I see no point in trying to kill a connection which is NOT affecting the involved systems in any way and basically defeats the entire purpose of using NiFi and Kafka.&lt;BR /&gt;&lt;BR /&gt;However, if you still want to achieve this, you will need to put some extra effort in doing this. First of all, you need to create a flow which checks the state of the desired processor using the NiFi's REST API - achievable in many ways, like InvokeHTTP, ExecuteStreamCommand, etc. If nothing has been done in the past 5 minutes (displayed in the JSON received as response from REST API) you will activate an InvokeHTTP in which you call again the REST API for STOPPING the ConsumeKafka Processor.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2023 08:10:14 GMT</pubDate>
    <dc:creator>cotopaul</dc:creator>
    <dc:date>2023-11-22T08:10:14Z</dc:date>
    <item>
      <title>terminate kafka connection if publish kafka processor is idle for 5 min and start when data received</title>
      <link>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/379208#M243806</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In Apache NIFI&amp;nbsp; I am&amp;nbsp; consuming data from one Kafka&amp;nbsp;topic and publishing&amp;nbsp;that data to customers Kafka&amp;nbsp;topic . For this i am using ConsumeKafka and PublishKafka processor respectively.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If outgoing dataflow is idle for more than 5 minutes, the Kafka connection with customer should be terminated and&amp;nbsp; reconnected when there is &amp;nbsp;any new&amp;nbsp; messages consumed .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;how to do this with publish kafka processor ?? how to terminate&amp;nbsp;and start the connection??&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 08:10:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/379208#M243806</guid>
      <dc:creator>Rohit1997jio</dc:creator>
      <dc:date>2023-11-20T08:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: terminate kafka connection if publish kafka processor is idle for 5 min and start when data received</title>
      <link>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/379346#M243839</link>
      <description>&lt;P&gt;Why do you need to stop/terminate the connection? Sort of defeats how Kafka is meant to function.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 21:50:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/379346#M243839</guid>
      <dc:creator>joseomjr</dc:creator>
      <dc:date>2023-11-21T21:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: terminate kafka connection if publish kafka processor is idle for 5 min and start when data received</title>
      <link>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/379373#M243847</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107711"&gt;@Rohit1997jio&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;As &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105558"&gt;@joseomjr&lt;/a&gt; already pointed out, by doing this, you defeat the single purpose of using Kafka. As you already know, Kafka is a stream-processing platform and basically function in a very basic way as a queue of messages.&lt;BR /&gt;&lt;BR /&gt;Integrating Kafka with NiFi, especially using the processor ConsumeKafka, you basically create a bucket at the end of the queue. As long as messages are present in the queue (Kafka in your case), you will have messages arriving in your bucket (you NiFi processing layer in your case). When you do not have any messages in the kafka system, your ConsumeKafka processor will be in a let's call it idle state, meaning that it will not waste resources in vain - it will however use some resources to check whether new messages arrived or not.&lt;BR /&gt;&lt;BR /&gt;That being said, I see no point in trying to kill a connection which is NOT affecting the involved systems in any way and basically defeats the entire purpose of using NiFi and Kafka.&lt;BR /&gt;&lt;BR /&gt;However, if you still want to achieve this, you will need to put some extra effort in doing this. First of all, you need to create a flow which checks the state of the desired processor using the NiFi's REST API - achievable in many ways, like InvokeHTTP, ExecuteStreamCommand, etc. If nothing has been done in the past 5 minutes (displayed in the JSON received as response from REST API) you will activate an InvokeHTTP in which you call again the REST API for STOPPING the ConsumeKafka Processor.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 08:10:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/379373#M243847</guid>
      <dc:creator>cotopaul</dc:creator>
      <dc:date>2023-11-22T08:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: terminate kafka connection if publish kafka processor is idle for 5 min and start when data received</title>
      <link>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/380747#M244149</link>
      <description>&lt;P&gt;consuming from nifi is fine that i want to be continuous , i want to terminate connection for publish kafka&amp;nbsp; processor , when there is no new message consumed by consumeKafka processor for more then 5 minutes , i want to terminate connection with publish kafka as my consumer kafka and producer kafka are different .&lt;/P&gt;&lt;P&gt;as soon as my consumer kafka consumer some message , i want connection to be established again with producer kafka&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 07:04:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/380747#M244149</guid>
      <dc:creator>Rohit1997jio</dc:creator>
      <dc:date>2023-12-13T07:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: terminate kafka connection if publish kafka processor is idle for 5 min and start when data received</title>
      <link>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/380748#M244150</link>
      <description>&lt;P&gt;disconnect and reconnect again this functionality i want to achieve with Publish kafka processor .&lt;/P&gt;&lt;P&gt;ConsumerKafka will consumer continuously .&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 07:06:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/terminate-kafka-connection-if-publish-kafka-processor-is/m-p/380748#M244150</guid>
      <dc:creator>Rohit1997jio</dc:creator>
      <dc:date>2023-12-13T07:06:05Z</dc:date>
    </item>
  </channel>
</rss>

