diff --git a/langstream-api-gateway/src/main/java/ai/langstream/apigateway/gateways/TopicProducerCacheFactory.java b/langstream-api-gateway/src/main/java/ai/langstream/apigateway/gateways/TopicProducerCacheFactory.java index 0ae28aa67..063bd8488 100644 --- a/langstream-api-gateway/src/main/java/ai/langstream/apigateway/gateways/TopicProducerCacheFactory.java +++ b/langstream-api-gateway/src/main/java/ai/langstream/apigateway/gateways/TopicProducerCacheFactory.java @@ -20,11 +20,10 @@ import ai.langstream.apigateway.config.TopicProperties; import io.micrometer.core.instrument.Metrics; import io.micrometer.core.instrument.binder.cache.GuavaCacheMetrics; +import java.util.function.Supplier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import java.util.function.Supplier; - @Configuration public class TopicProducerCacheFactory { @@ -39,12 +38,13 @@ public TopicProducerCache topicProducerCache(TopicProperties topicProperties) { } else { return new TopicProducerCache() { @Override - public TopicProducer getOrCreate(Key key, Supplier topicProducerSupplier) { + public TopicProducer getOrCreate( + Key key, Supplier topicProducerSupplier) { return topicProducerSupplier.get(); } + @Override - public void close() { - } + public void close() {} }; } }