<?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 consuming data from multiple kafka topic and publishing to multiple topics - one to one mapping in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/consuming-data-from-multiple-kafka-topic-and-publishing-to/m-p/379044#M243764</link>
    <description>&lt;P&gt;I want to create a flow In NIFI where i want to consumer data from 3 Kafka topics and produce that data into 3 different Kafka topics . each topic should produce data into unique topic . for example -&amp;nbsp;&lt;/P&gt;&lt;P&gt;kafka topics 1&amp;nbsp; --&amp;gt;&amp;nbsp; produce to topic A&lt;BR /&gt;kafka topics 2 --&amp;gt; produce to topic B&lt;BR /&gt;kafka topics 3 --&amp;gt; produce to topic C&lt;/P&gt;&lt;P&gt;i want to use only one Consumer processor and one producer processor . Right now i am using 3 produce Kafka processor .&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone suggest better approach to do so and in more optimized way.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Help me to reduce three publish processors to 1 , but it should be still able to consume from multiple topics and produce&amp;nbsp;to multiple topics but dynamically , like topic1 produces&amp;nbsp;data to topic A only and topic 2 to topic B and so on .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried using expression language . kafka.topic is the attribute which contains consumer topics. so i added if else condition for different consumer topic but the output was not the producer topic but whole string mentioned below&lt;/P&gt;&lt;P&gt;in update attribute added a property customerKafkaTopic=${kafka.topic:contains('alerts'):ifElse('${kafkaTopic1}',${kafka.topic:contains('events'):ifElse('${kafkaTopic2}',${kafka.topic:contains('ack'):ifElse('${kafkatopic3}','Not_found')}))}}&lt;/P&gt;&lt;P&gt;and passed this property&amp;nbsp;customerKafkaTopic in publish kafka but it is not working&lt;SPAN&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help with a working approach.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="direct kafka .png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38937i269737CCB159435E/image-size/large?v=v2&amp;amp;px=999" role="button" title="direct kafka .png" alt="direct kafka .png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 06:56:26 GMT</pubDate>
    <dc:creator>Rohit1997jio</dc:creator>
    <dc:date>2023-11-15T06:56:26Z</dc:date>
    <item>
      <title>consuming data from multiple kafka topic and publishing to multiple topics - one to one mapping</title>
      <link>https://community.cloudera.com/t5/Support-Questions/consuming-data-from-multiple-kafka-topic-and-publishing-to/m-p/379044#M243764</link>
      <description>&lt;P&gt;I want to create a flow In NIFI where i want to consumer data from 3 Kafka topics and produce that data into 3 different Kafka topics . each topic should produce data into unique topic . for example -&amp;nbsp;&lt;/P&gt;&lt;P&gt;kafka topics 1&amp;nbsp; --&amp;gt;&amp;nbsp; produce to topic A&lt;BR /&gt;kafka topics 2 --&amp;gt; produce to topic B&lt;BR /&gt;kafka topics 3 --&amp;gt; produce to topic C&lt;/P&gt;&lt;P&gt;i want to use only one Consumer processor and one producer processor . Right now i am using 3 produce Kafka processor .&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone suggest better approach to do so and in more optimized way.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Help me to reduce three publish processors to 1 , but it should be still able to consume from multiple topics and produce&amp;nbsp;to multiple topics but dynamically , like topic1 produces&amp;nbsp;data to topic A only and topic 2 to topic B and so on .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried using expression language . kafka.topic is the attribute which contains consumer topics. so i added if else condition for different consumer topic but the output was not the producer topic but whole string mentioned below&lt;/P&gt;&lt;P&gt;in update attribute added a property customerKafkaTopic=${kafka.topic:contains('alerts'):ifElse('${kafkaTopic1}',${kafka.topic:contains('events'):ifElse('${kafkaTopic2}',${kafka.topic:contains('ack'):ifElse('${kafkatopic3}','Not_found')}))}}&lt;/P&gt;&lt;P&gt;and passed this property&amp;nbsp;customerKafkaTopic in publish kafka but it is not working&lt;SPAN&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help with a working approach.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="direct kafka .png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38937i269737CCB159435E/image-size/large?v=v2&amp;amp;px=999" role="button" title="direct kafka .png" alt="direct kafka .png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 06:56:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/consuming-data-from-multiple-kafka-topic-and-publishing-to/m-p/379044#M243764</guid>
      <dc:creator>Rohit1997jio</dc:creator>
      <dc:date>2023-11-15T06:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: consuming data from multiple kafka topic and publishing to multiple topics - one to one mapping</title>
      <link>https://community.cloudera.com/t5/Support-Questions/consuming-data-from-multiple-kafka-topic-and-publishing-to/m-p/379347#M243840</link>
      <description>&lt;P&gt;What's wrong with 1:1 relationship? If you're concerned with performance, then leveraging "&lt;SPAN&gt;Message Demarcator" for the Consume and Publish will provide the best throughput.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 21:56:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/consuming-data-from-multiple-kafka-topic-and-publishing-to/m-p/379347#M243840</guid>
      <dc:creator>joseomjr</dc:creator>
      <dc:date>2023-11-21T21:56:22Z</dc:date>
    </item>
  </channel>
</rss>

