feat(bot-platform): migrate BotRegistry to Redis Streams consumer group (#63)

Replace pub/sub subscribe with XREADGROUP on bot game-start stream.
Remove dual-write from EventPublisher.publishGameStart.
Consumer group: bot-platform-consumer, XACK after forwarding.
Poll loop uses emitter identity to prevent thread leak on re-registration.
Group created with '$' offset — no historical replay on first connect.

Closes NCS-101
https://knockoutwhist.youtrack.cloud/issue/NCS-101

Reviewed-on: #63
This commit was merged in pull request #63.
This commit is contained in:
2026-06-09 21:48:21 +02:00
parent 225c2285b7
commit 0ad2e10999
4 changed files with 145 additions and 21 deletions
@@ -36,7 +36,6 @@ class EventPublisher:
new XAddArgs().maxlen(maxStreamLen).nearlyExactTrimming(),
Map("data" -> json).asJava,
)
redis.pubsub(classOf[String]).publish(s"${redisConfig.prefix}:bot:$botId:events", json)
()
def publishChallengeCreated(destUserId: String, challengeId: String, challengerName: String): Unit =