Skip to content

Redis Communication Protocol

BharatMC uses Redis Pub/Sub and Key-Value caching to link backend web apps, Discord bots, the Velocity proxy, and backend game instances.


  • Channel: bharatsync:commands
  • Direction: Web Store / API ➔ Game Servers
  • Payload Structure:
{
"id": 1271,
"server": "lifesteal",
"player": "RoizPlayz",
"command": "crate key give RoizPlayz vote 1",
"require_online": true
}
  • Channel: bharatsync:command_results
  • Direction: Game Servers ➔ Web Backend
  • Payload Structure:
{
"id": 1271,
"player": "RoizPlayz",
"success": true,
"timestamp": 1730210832000
}

Important: Once a command ID is processed by the game server, it sends a confirmation to bharatsync:command_results and marks it in the in-memory cache to prevent infinite retry loops.


  • Channel: bharatsync:player_login
  • Direction: Game Server ➔ Web API / Redis Queue
  • Purpose: Triggers delivery of offline pending store purchases or votes as soon as the target user logs in.

  • Channel: bharatmc:vote:event
  • Payload:
{
"player": "PlayerName",
"service": "TopG",
"timestamp": 1730210900000
}

Triggers in-game vote party counters, reminder decrements, and reward dispatch.