Skip to content

Commit 68e0efd

Browse files
committed
BE: Allow overriding producer and consumer properties
address review comments
1 parent e522a85 commit 68e0efd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

api/src/main/java/io/kafbat/ui/service/ConsumerGroupService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ public EnhancedConsumer createConsumer(KafkaCluster cluster,
265265
Map<String, Object> properties) {
266266
Properties props = new Properties();
267267
KafkaClientSslPropertiesUtil.addKafkaSslProperties(cluster.getOriginalProperties().getSsl(), props);
268+
props.putAll(cluster.getProperties());
268269
props.putAll(cluster.getConsumerProperties());
269270
props.put(ConsumerConfig.CLIENT_ID_CONFIG, "kafbat-ui-consumer-" + System.currentTimeMillis());
270271
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, cluster.getBootstrapServers());

api/src/main/java/io/kafbat/ui/service/MessagesService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ public static KafkaProducer<byte[], byte[]> createProducer(KafkaCluster cluster,
200200
Map<String, Object> additionalProps) {
201201
Properties properties = new Properties();
202202
KafkaClientSslPropertiesUtil.addKafkaSslProperties(cluster.getOriginalProperties().getSsl(), properties);
203+
properties.putAll(cluster.getProperties());
203204
properties.putAll(cluster.getProducerProperties());
204205
properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, cluster.getBootstrapServers());
205206
properties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class);

0 commit comments

Comments
 (0)