Github user cestella commented on a diff in the pull request:
https://github.com/apache/metron/pull/1082#discussion_r199611812
--- Diff:
metron-platform/metron-writer/src/main/java/org/apache/metron/writer/kafka/KafkaWriter.java
---
@@ -197,6 +209,15 @@ public void init(Map stormConf, TopologyContext
topologyContext, WriterConfigura
return producerConfig;
}
+ public Optional<String> getKafkaTopic(JSONObject message) {
--- End diff --
I think I see your point. I think we're ok, though, because we're not
defaulting `kafka.topicField`. If it's not specified AND the `kafka.topic`
isn't specified, then we don't send the message anywhere. I did this
specifically so people didn't accidentally forget to unset a field and end up
in a loop. You have to go out of your way (and set the `kafka.topicField`) to
make the mistake.
---