Created 03-21-2017 11:24 AM
Hello,
I use a HandleHttpRequest to get a POST request with 2 parameters (kafkaHost and kafkaPort)
I can see my param in the attribute of the data (http.param.kafkaHost and http.param.kafkaPort)
I want to use them in a PublishKafka_0_10 to define kafka Brokers propertie (support expression language)
like this : Kafka Brokers = ${http.param.kafkaHost}:${http.param.kafkaPort}
It's doesn't works, my attributes aren't use (log file : bootstrap.servers = [:])
There is a solution ?
Created 03-21-2017 12:58 PM
The PublishKafka processor establishes a connection to the brokers before it even looks at the attributes of a FlowFile. This way it does not need to establish a new connection for every single FlowFile. While the broker property does not support FlowFile attributes, it should support resolving Expression Language statements that pull values from environment variables or the NiFi variable registry (File on disk with key value pairs).
Thank you,
Matt
Created 03-21-2017 12:58 PM
The PublishKafka processor establishes a connection to the brokers before it even looks at the attributes of a FlowFile. This way it does not need to establish a new connection for every single FlowFile. While the broker property does not support FlowFile attributes, it should support resolving Expression Language statements that pull values from environment variables or the NiFi variable registry (File on disk with key value pairs).
Thank you,
Matt
Created 03-21-2017 01:08 PM
Thanks Matt, i will find another way so.
Created on 04-03-2021 06:36 PM - edited 04-03-2021 06:36 PM
Hello @sy_robert,
were you able to resolve this on how to dynamically assign brokers list from a flowfile attributes?
Created 04-04-2021 10:50 PM
@sivat as this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.
Regards,
Vidya Sargur,Created 04-05-2021 06:18 AM
@VidyaSargur thank you for the recommendation.
I already started a new thread https://community.cloudera.com/t5/Support-Questions/trying-to-assign-JMS-Broker-URI-property-value-a... which is almost the same question as this thread.
Just wanted to check if @sy_robert found any workaround over this.