WIP:setup
authorKai Moritz <kai@juplo.de>
Sat, 24 Feb 2024 17:41:44 +0000 (18:41 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 24 Feb 2024 17:41:44 +0000 (18:41 +0100)
src/main/java/de/juplo/kafka/chat/backend/implementation/haproxy/HaproxyShardingPublisherStrategy.java
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java
src/test/resources/haproxy.cfg

index 3caaeb3..ad71d49 100644 (file)
@@ -5,7 +5,6 @@ import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import reactor.core.publisher.Mono;
 
-import java.io.IOException;
 import java.net.SocketAddress;
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
@@ -33,7 +32,7 @@ public class HaproxyShardingPublisherStrategy implements ShardingPublisherStrate
       socketChannel.close();
       return Mono.just(instanceId);
     }
-    catch (IOException e)
+    catch (Exception e)
     {
       return Mono.error(e);
     }
index f139b76..2287a33 100644 (file)
@@ -152,7 +152,8 @@ public class DataChannel implements Runnable, ConsumerRebalanceListener
               "Could not publish instance {} as owner of shard {}: {}",
               instanceId,
               partition,
-              throwable))
+              throwable.toString()))
+          .onErrorComplete()
           .block();
     });
 
index b73e97c..ad9bb8f 100644 (file)
@@ -37,11 +37,3 @@ backend backend_2
 
 backend backend_3
   server b3 backend-3:8080 check
-
-userlist haproxy-dataplaneapi
-  user juplo insecure-password juplo
-
-program api
-   command /usr/bin/dataplaneapi --host 0.0.0.0 --port 5555 --haproxy-bin /usr/sbin/haproxy --config-file /usr/local/etc/haproxy/haproxy.cfg --reload-cmd "kill -SIGUSR2 1" --restart-cmd "kill -SIGUSR2 1" --reload-delay 5 --userlist haproxy-dataplaneapi
-   no option start-on-reload
-