Fixes a bug where the plug-in's error is not cleared on each run and as a result the processRecord flag was always false.
@@ -52,8 +52,7 @@ public class OPALPlugin extends Plugin {
final String PRODUCE_TOPIC = "opal_callgraphs";
private boolean processedRecord;
private boolean writeCGToKafka = false;
- private String pluginError = "";
-
+ private String pluginError;
@Override
public List<String> consumerTopics() {
@@ -62,6 +61,7 @@ public class OPALPlugin extends Plugin {
@Override
public void consume(String topic, ConsumerRecord<String, String> kafkaRecord) {
+ pluginError = "";
processedRecord = false;
consume(kafkaRecord);
if(getPluginError().isEmpty()) { processedRecord = true; }
