Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding default impl for get topics method #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
import io.confluent.kafka.streams.serdes.avro.SpecificAvroSerde;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -49,6 +50,9 @@ public abstract class KafkaStreamsApp extends PlatformService {
public static final String CLEANUP_LOCAL_STATE = "cleanup.local.state";
public static final String PRE_CREATE_TOPICS = "precreate.topics";
public static final String KAFKA_STREAMS_CONFIG_KEY = "kafka.streams.config";
public static final String INPUT_TOPIC_CONFIG_KEY = "input.topic";
public static final String OUTPUT_TOPIC_CONFIG_KEY = "output.topic";

private static final Logger logger = LoggerFactory.getLogger(KafkaStreamsApp.class);
protected KafkaStreams app;

@@ -182,11 +186,15 @@ public Logger getLogger() {
}

public List<String> getInputTopics(Map<String, Object> properties) {
return new ArrayList<>();
Config jobConfig = (Config) properties.get(getJobConfigKey());
return jobConfig != null ?
Arrays.asList(jobConfig.getString(INPUT_TOPIC_CONFIG_KEY)) : new ArrayList<>();
}

public List<String> getOutputTopics(Map<String, Object> properties) {
return new ArrayList<>();
Config jobConfig = (Config) properties.get(getJobConfigKey());
return jobConfig != null ?
Arrays.asList(jobConfig.getString(OUTPUT_TOPIC_CONFIG_KEY)) : new ArrayList<>();
}

private Map<String, Object> getJobStreamsConfig(Config jobConfig) {