I am getting this error, while producing data to UAT environmet:
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for topic-2: 30808 ms has passed since batch creation plus linger time
In the dev environment it is working fine, data is getting pushed in UAT kafka Logs but it is getting so much time.
public ProducerFactory<String, Object> producerFactory() {
Map<String, Object> config = new HashMap<>();
config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,"ip:port");
config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
StringSerializer.class);
config.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
StringSerializer.class);}