GitHub user vishnu-chalil created a discussion: Kafka producer initalization 
using event Listner plugin makes gravitino unresponsive

Hi Team, I was trying to use the event listner plugin in gravitino for 
capturing the events and sending to kafka topic. But when I initalize the kafka 
producer in init method it makes the gravitino unresponsive. Iam using kafka 
client 4.0.0. 

Here is the code snipet in init method.

```
        kafkaProperties = new Properties();
        kafkaProperties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, 
bootstrapServers);
        kafkaProperties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, 
"org.apache.kafka.common.serialization.StringSerializer");
        kafkaProperties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, 
"org.apache.kafka.common.serialization.StringSerializer");
        kafkaProducer = new KafkaProducer<>(kafkaProperties);
```
Whole gravitino becomes unresponsive when this is `kafkaProducer = new 
KafkaProducer<>(kafkaProperties);` is executed. 

Below is the gravitino logs.

```
2025-10-01 12:28:26.509 INFO [ForkJoinPool.commonPool-worker-3] 
[com.zdp.gravitino_plugin.SearchEventListener.getKafkaProducer(SearchEventListener.java:122)]
 - Creating Kafka producer on first use..

2025-10-01 12:28:26.509 INFO [ForkJoinPool.commonPool-worker-3] 
[com.zdp.gravitino_plugin.SearchEventListener.getKafkaProducer(SearchEventListener.java:123)]
 - kafka props 
{value.serializer=org.apache.kafka.common.serialization.StringSerializer, 
request.timeout.ms=3000, max.block.ms=3000, 
bootstrap.servers=host.docker.internal:9092, delivery.timeout.ms=5000, 
key.serializer=org.apache.kafka.common.serialization.StringSerializer}

```

Is there any recommended approach or restrictions while using 
EventListenerPlugin?

GitHub link: https://github.com/apache/gravitino/discussions/8746

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to