@@ -38,17 +38,21 @@ private static KafkaAvroDeserializer getDeserializer(String schemaRegistryUrl, S
3838
3939 private static void setConfigFromEnvIfAvailable (String topicName , String configPath , Map <String ,Object > config ){
4040
41+ System .out .println ("-----------STARTING topic name: " + topicName );
4142 String configPrefix = "SCHEMA_REGISTRY" ;
42- String topicScopedEnvPath = Arrays .stream (new String []{configPrefix , configPath .replace ( " ." , "_" ), topicName .replace ("-" , "_" ) } )
43+ String topicScopedEnvPath = Arrays .stream (new String []{configPrefix , configPath .replaceAll ( " \\ ." , "_" ), topicName .replaceAll ("-" , "_" ) } )
4344 .map (String ::toUpperCase ).collect (Collectors .joining ("_" ));
4445
45- String noTopicScopedEnvPath = Arrays .stream (new String []{ "SCHEMA_REGISTRY" , configPath .replace ( " ." , "_" ) })
46+ String noTopicScopedEnvPath = Arrays .stream (new String []{ configPrefix , configPath .replaceAll ( " \\ ." , "_" ) })
4647 .map (String ::toUpperCase ).collect (Collectors .joining ("_" ));
4748
4849 for (String envPath : new String []{topicScopedEnvPath , noTopicScopedEnvPath }) {
50+
4951 String namingStrategyValue = System .getenv (envPath );
52+ System .out .println ("-----------STARTING topic name: " + envPath + " " + namingStrategyValue );
5053 if (namingStrategyValue != null ) {
51- config .put (envPath , namingStrategyValue );
54+ System .out .println ("-----------STARTING topic name: " + envPath + " " + namingStrategyValue );
55+ config .put (configPath , namingStrategyValue );
5256 }
5357 }
5458 }
0 commit comments