File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
services/alarm-server/src/main/java/org/phoebus/applications/alarm/server Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2828import org .apache .kafka .clients .admin .AdminClientConfig ;
2929import org .apache .kafka .clients .admin .AlterConfigOp ;
3030import org .apache .kafka .clients .admin .ConfigEntry ;
31- import org .apache .kafka .clients .admin .ListTopicsResult ;
3231import org .apache .kafka .clients .admin .NewTopic ;
3332import org .phoebus .applications .alarm .AlarmSystemConstants ;
3433import org .phoebus .applications .alarm .client .ClientState ;
34+ import org .phoebus .applications .alarm .client .KafkaHelper ;
3535import org .phoebus .applications .alarm .model .AlarmTreeItem ;
3636import org .phoebus .applications .alarm .model .AlarmTreeLeaf ;
3737import org .phoebus .applications .alarm .model .SeverityLevel ;
@@ -93,7 +93,9 @@ public class AlarmServerMain implements ServerModelListener
9393 * @throws Exception
9494 */
9595 private static void ensureKafkaTopics (String server , String topic , String kafka_props_file ) throws Exception {
96- try (AdminClient admin = AdminClient .create (Map .of (AdminClientConfig .BOOTSTRAP_SERVERS_CONFIG , server ))) {
96+ var kafka_props = KafkaHelper .loadPropsFromFile (kafka_props_file );
97+ kafka_props .put (AdminClientConfig .BOOTSTRAP_SERVERS_CONFIG , server );
98+ try (AdminClient admin = AdminClient .create (kafka_props )) {
9799 Set <String > topics = admin .listTopics ().names ().get (60 , TimeUnit .SECONDS );
98100 // Compacted topic
99101 String compactedTopic = topic ;
You can’t perform that action at this time.
0 commit comments