SUPPORT-8591: commit after checking

This commit is contained in:
gulnaz 2024-10-09 09:32:25 +03:00
parent 986aa01830
commit b0e1872e72

View file

@ -66,10 +66,10 @@ public abstract class BaseReplyingKafkaService<T, V> implements ReplyingKafkaSer
if (match) {
responseRef.set(consumerRecord.value());
consumer.commitSync();
break;
}
}
consumer.commitSync();
}
return Optional.ofNullable(responseRef.get())
.orElseThrow(() -> new RuntimeException("Kafka return result is null"));