WIP:haproxy
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / domain / exceptions / ShardNotOwnedException.java
index 3b63833..d5bc5ce 100644 (file)
@@ -1,17 +1,20 @@
-package de.juplo.kafka.chat.backend.domain;
+package de.juplo.kafka.chat.backend.domain.exceptions;
 
 import lombok.Getter;
 
 
 public class ShardNotOwnedException extends IllegalStateException
 {
+  @Getter
+  private final String instanceId;
   @Getter
   private final int shard;
 
 
-  public ShardNotOwnedException(int shard)
+  public ShardNotOwnedException(String instanceId, int shard)
   {
-    super("This instance does not own the shard " + shard);
+    super("Instance " + instanceId + " does not own the shard " + shard);
+    this.instanceId = instanceId;
     this.shard = shard;
   }
 }