From f13142c01364a4a39c1d08b953119165c2ca1b3c Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 22 Sep 2023 18:58:35 +0200 Subject: [PATCH] WIP:haproxy --- .../chat/backend/implementation/kafka/KafkaTestUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java index 956d7cec..52a527d3 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java +++ b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaTestUtils.java @@ -1,6 +1,7 @@ package de.juplo.kafka.chat.backend.implementation.kafka; import de.juplo.kafka.chat.backend.ChatBackendProperties; +import de.juplo.kafka.chat.backend.domain.ShardingPublisherStrategy; import lombok.extern.slf4j.Slf4j; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.TopicPartition; @@ -10,6 +11,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.kafka.core.KafkaTemplate; import org.springframework.kafka.support.SendResult; +import reactor.core.publisher.Mono; import java.time.Clock; import java.util.List; @@ -23,6 +25,12 @@ public class KafkaTestUtils @Import(KafkaServicesConfiguration.class) public static class KafkaTestConfiguration { + @Bean + public ShardingPublisherStrategy shardingPublisherStrategy() + { + return shard -> Mono.just("MOCKED!"); + } + @Bean public WorkAssignor dataChannelWorkAssignor( ChatBackendProperties properties, -- 2.20.1