X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2Fdomain%2Fexceptions%2FShardNotOwnedException.java;h=d5bc5ce4697752e1ce6f9e25718111d09bb0fb0d;hb=f70bb25f9b0769068028348995a78ece2130cd35;hp=25df317b5641bd20f4611b7bd0c0dd9da0e5854f;hpb=a4c69f2736204751a70e916daf451ed6eb7b2994;p=demos%2Fkafka%2Fchat diff --git a/src/main/java/de/juplo/kafka/chat/backend/domain/exceptions/ShardNotOwnedException.java b/src/main/java/de/juplo/kafka/chat/backend/domain/exceptions/ShardNotOwnedException.java index 25df317b..d5bc5ce4 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/domain/exceptions/ShardNotOwnedException.java +++ b/src/main/java/de/juplo/kafka/chat/backend/domain/exceptions/ShardNotOwnedException.java @@ -5,13 +5,16 @@ 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; } }