in src/main/java/com/amazonaws/mskdatagen/core/Context.java [125:148]
private void addGlobalConfigs(List<Config> configs) {
GlobalConfigs globalConfigs = (GlobalConfigs) getConfig(ConfigType.GLOBAL_CONFIG, "global");
configs.forEach(config -> {
if (config.getKind() == Kind.GLOBAL) {
Optional.ofNullable(config.getConfigs()).ifPresent(t -> {
String join = String.join(".", t);
switch (join) {
case "throttle.ms":
globalConfigs.setThrottleMs(Long.parseLong(config.getValue()));
break;
case "history.records.max":
globalConfigs.setHistoryRecordsMax(Long.parseLong(config.getValue()));
break;
case "matching.rate":
globalConfigs.setMatchingRate(Double.parseDouble(config.getValue()));
break;
default:
String message = String.format("Unrecognized global configuration: %s", config.getOriginalKey());
throw new IllegalArgumentException(message);
}
});
}
});
}