@@ -884,6 +884,32 @@ public static String substitute(String address) throws Exception {
884
884
885
885
if (address == null )
886
886
return address ;
887
+
888
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
889
+
890
+ while (address .contains ("$BIDSCHANNEL" ))
891
+ address = GetEnvironmentVariable (address , "$BIDSCHANNEL" , "kafka://[$BROKERLIST]&topic=bids" );
892
+ while (address .contains ("$WINSCHANNEL" ))
893
+ address = GetEnvironmentVariable (address , "$WINSCHANNEL" , "kafka://[$BROKERLIST]&topic=wins" );
894
+ while (address .contains ("$REQUESTSCHANNEL" ))
895
+ address = GetEnvironmentVariable (address , "$REQUESTSCHANNEL" , "kafka://[$BROKERLIST]&topic=requests" );
896
+ while (address .contains ("$CLICKSCHANNEL" ))
897
+ address = GetEnvironmentVariable (address , "$CLICKSCHANNEL" , "kafka://[$BROKERLIST]&topic=clicks" );
898
+ while (address .contains ("$PIXELSCHANNEL" ))
899
+ address = GetEnvironmentVariable (address , "$PIXELSCHANNEL" , "kafka://[$BROKERLIST]&topic=pixels" );
900
+ while (address .contains ("$VIDEOEVENTSCHANNEL" ))
901
+ address = GetEnvironmentVariable (address , "$VIDEOEVENTSCHANNEL" , "kafka://[$BROKERLIST]&topic=videoevents" );
902
+ while (address .contains ("$POSTBACKEVENTSCHANNEL" ))
903
+ address = GetEnvironmentVariable (address , "$POSTBACKEVENTSCHANNEL" , "kafka://[$BROKERLIST]&topic=postbackevents" );
904
+ while (address .contains ("$STATUSCHANNEL" ))
905
+ address = GetEnvironmentVariable (address , "$STATUSCHANNEL" , "kafka://[$BROKERLIST]&topic=status" );
906
+ while (address .contains ("$REASONSCHANNEL" ))
907
+ address = GetEnvironmentVariable (address , "$REASONSCHANNEL" , "kafka://[$BROKERLIST]&topic=reasons" );
908
+ while (address .contains ("$LOGCHANNEL" ))
909
+ address = GetEnvironmentVariable (address , "$LOGCHANNEL" , "kafka://[$BROKERLIST]&topic=reasons" );
910
+ kafka ://[$BROKERLIST]&topic=logs
911
+
912
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////
887
913
888
914
while (address .contains ("$GEOPATCH" ))
889
915
address = GetEnvironmentVariable (address , "$GEOPATCH" , "" );
@@ -907,14 +933,37 @@ public static String substitute(String address) throws Exception {
907
933
while (address .contains ("$BIDSWITCH_ID" ))
908
934
address = GetEnvironmentVariable (address , "$BIDSWITCH_ID" , "bidswitch-id" );
909
935
910
- while (address .contains ("$S3REGION" ))
911
- address = GetEnvironmentVariable (address , "$S3REGION" , "" );
912
- while (address .contains ("$S3BUCKET" ))
913
- address = GetEnvironmentVariable (address , "$S3BUCKET" , "" );
914
- while (address .contains ("$S3ACCESSKEY" ))
915
- address = GetEnvironmentVariable (address , "$S3ACCESSKEY" , "" );
916
- while (address .contains ("$S3SECRETKEY" ))
917
- address = GetEnvironmentVariable (address , "$S3SECRETKEY" , "" );
936
+ /////////////////////////////////////////////////////////////////////////////
937
+
938
+ while (address .contains ("$S3BUCKET" ))
939
+ address = GetEnvironmentVariable (address ,"$S3BUCKET" , "" );
940
+
941
+ while (address .contains ("$AWSACCESSKEY" ))
942
+ address = GetEnvironmentVariable (address ,"$AWSACCESSKEY" , "" );
943
+
944
+ while (address .contains ("$AWSSECRETKEY" ))
945
+ address = GetEnvironmentVariable (address ,"$AWSSECRETKEY" , "" );
946
+
947
+ while (address .contains ("$AWSREGION" ))
948
+ address = GetEnvironmentVariable (address ,"$AWSREGION" , Regions .US_EAST_1 .getName ());
949
+
950
+ while (address .contains ("$AWSKINESIS_STREAM" ))
951
+ address = GetEnvironmentVariable (address ,"$AWS_KINESIS_STREAM" , "" );
952
+
953
+ while (address .contains ("$AWSKINESIS_PARTITION" ))
954
+ address = GetEnvironmentVariable (address ,"$AWS_KINESESIS_PARTITION" , "part-1" );
955
+
956
+ while (address .contains ("AWSKINESIS_SHARD" ))
957
+ address = GetEnvironmentVariable (address ,"$AWS_KINESIS_SHARD" , "shardId-000000000000" );
958
+
959
+ while (address .contains ("AWS_KINESIS_ITERATOR" ))
960
+ address = GetEnvironmentVariable (address ,"$AWS_KENESIS_ITERATOR" , "LATEST" );
961
+
962
+ while (address .contains ("AWSKINESIS_RECORDS" ))
963
+ address = GetEnvironmentVariable (address ,"$AWS_KENSIS_RECORDS" , "1" );
964
+
965
+ /////////////////////////////////////////////////////////////////////////////
966
+
918
967
919
968
while (address .contains ("$FREQGOV" ))
920
969
address = GetEnvironmentVariable (address , "$FREQGOV" , "true" );
@@ -1006,7 +1055,7 @@ public static String GetEnvironmentVariable(String address, String varName) {
1006
1055
*/
1007
1056
public static String GetEnvironmentVariable (String address , String varName , String altName ) {
1008
1057
String test = GetEnvironmentVariable (address , varName );
1009
- if (test == null ) {
1058
+ if (test == null && altName != null ) {
1010
1059
test = address .replace (varName , altName );
1011
1060
}
1012
1061
return test ;
0 commit comments