1

Applying locks on kafka events using redis so that same kafka event will not process by multiple pods.

java.lang.IllegalStateException: None of slaves were synced at org.redisson.RedissonBaseLock.lambda$evalWriteAsync$0(RedissonBaseLock.java:225) at java.util.concurrent.CompletableFuture.uniHandle(Unknown Source) at java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.complete(Unknown Source) at org.redisson.command.CommandBatchService.lambda$executeAsync$7(CommandBatchService.java:322) at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.complete(Unknown Source) at org.redisson.command.RedisCommonBatchExecutor.handleResult(RedisCommonBatchExecutor.java:163) at org.redisson.command.RedisExecutor.checkAttemptPromise(RedisExecutor.java:524) at org.redisson.command.RedisExecutor.lambda$execute$4(RedisExecutor.java:176) at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.complete(Unknown Source) at org.redisson.client.handler.CommandDecoder.decodeCommandBatch(CommandDecoder.java:318) at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:210) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:137) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:113) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510) at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279) at io.netty.channel.Abstract...

borchvm
  • 3,533
  • 16
  • 44
  • 45

1 Answers1

1

I guess your approach is wrong. You don't need Redis or other tools with locks for that. With proper setup of kafka consumer groups message won't be picked up by different pod