CrossServerManager | v1.1.0 - Now with Offline Simulation & Virtual Servers

**CrossServerManager v1.1.0 - Now with Offline Simulation & Virtual Servers **

A Roblox module for advanced cross-server messaging, supporting reliable message delivery, retries, deduplication, replay, throttling, custom monitoring, and more, now with a full offline simulation mode so you can develop and test without needing live Roblox servers.

link: GitHub - V1nyI/roblox-cross-server-manager: A Roblox module for advanced cross-server messaging and distributed communication. Supports reliable message delivery, retries, deduplication, replay, throttling, custom monitoring.

What’s New in v1.1.0

  • Offline Mode - Test your game without Roblox backend services
  • Virtual Servers - Create simulated servers for local multi-server testing in Studio
  • Service Limit Simulation - Configure quotas for MessagingService, MemoryStoreService, and DataStoreService to match Roblox limits
  • Limit Statistics - Check usage counters in real time with GetLimitStats()
  • Offline Queue & Replay - Queue processing and message replay now work fully in offline mode
  • Targeted Replay - In offline mode, replay missed messages to a specific simulated server
  • Backward Compatible - All online mode features from v1.0.5 remain intact

Feature Comparison

Feature v1.0.5 (Old) v1.1.0 (New)
Modes Online only Online + Offline
Virtual Servers :cross_mark: :white_check_mark:
Limit Simulation :cross_mark: :white_check_mark:
Limit Stats :cross_mark: :white_check_mark:
Offline Queue :cross_mark: :white_check_mark:
Offline Replay :cross_mark: :white_check_mark:
Targeted Replay :cross_mark: :white_check_mark:
Backwards Compatibility :white_check_mark: :white_check_mark:

Offline Mode Example

local CSM = require(path.to.CrossServerManager)
CSM:SetMode("offline")

local serverA = CSM:CreateVirtualSimulationServer("ServerA")
local serverB = CSM:CreateVirtualSimulationServer("ServerB")

serverB:Subscribe("Chat", function(payload)
    print("[ServerB] Received:", payload)
end)

serverA:Publish("Chat", "Hello from A!")


Features

  • Reliable cross-server messaging
  • Automatic retry with exponential backoff
  • Deduplication for safe message processing
  • Message replay for new/late servers
  • Per-message-type throttling & configuration
  • Dead-letter queue on repeated failure
  • Custom monitoring event hooks
  • Flush pending messages on server shutdown
  • Flexible subscription control (pause, resume, unsubscribe)
  • Version check and update notification
  • Rate limit awareness with degradation

Installation

  1. Copy CrossServerManager.lua into your Roblox project (ideally in ServerScriptService).
  2. Require it in your server-side script:
    local CrossServerManager = require(path.to.CrossServerManager)
    

Initialization / Starting the Module

Before using the module, you should start its internal processes.
Call :Start() as early as possible on the server (e.g., at the top of your main server script):

local CrossServerManager = require(path.to.CrossServerManager)
CrossServerManager:Start() -- Initialize

You only need to call :Start() once per server, Set Variable Debug to Enable _log()


Basic Usage

note: Set localPublish to true to publish the message only locally on the current server. This is useful for testing or when you want to avoid sending messages across servers.

-- Subscribe to a topic
local subscription = CrossServerManager:Subscribe("MyTopic", function(payload, uuid, seq, messageType)
    print("Received:", payload)
end)

-- Publish a message
local uuid, success, err = CrossServerManager:Publish("MyTopic", {data = 123}, "default", 60)

-- Pause, resume, or unsubscribe from a topic
subscription:Pause()
subscription:Resume()
subscription:Unsubscribe()

Replay Missed Messages

Replay is one of the most powerful features of this module. If your server was offline or you want to “catch up” on messages sent before joining,

use ReplayMissedMessages to process messages from a given point in time:

-- Replay all messages for "MyTopic" sent since a specific timestamp (e.g., last hour)
local oneHourAgo = os.time() - 3600
CrossServerManager:ReplayMissedMessages("MyTopic", oneHourAgo)
  • This will fetch and deliver up to the last 40 messages for the topic that were sent since the given timestamp.

  • Note: Messages must have been published with messageRetentionTime > 0 and not expired to be eligible for replay.

  • Deduplication ensures you won’t process the same message twice.
  • Useful when a new server starts or for recovering missed events.

Advanced Usage

Monitoring Events

CrossServerManager:MonitoringOn("onMessageSent", function(uuid, topic, payload, seq, messageType)
    print("Message sent:", uuid)
end)

New API Additions

  • SetMode(mode) - "online" or "offline"
  • CreateVirtualSimulationServer(name) - Create a simulated server in offline mode
  • SetLimitSimulation(config) - Enable/disable limit simulation per service
  • GetLimitStats(service) - View current usage stats for simulated limits

Full API Overview

  • :Start() - Initializes the module
  • :Subscribe(topic, callback) - Subscribe to messages on a topic
  • :Publish(topic, payload, messageType, messageRetentionTime, localPublish) - Publish a message
  • :ReplayMissedMessages(topic, sinceTimestamp, [targetServer]) - Replay recent messages
  • :BulkPublish(messages, localBulkPublish) - Publish multiple messages
  • :FlushPendingMessages() - Immediately flush all pending messages
  • :MonitoringOn(eventName, callback) - Listen for monitoring events
  • :Unsubscribe(topic, id) - Unsubscribe a specific callback
  • :GetServerId() - Get the current server ID
  • :SetDebugMode(enabled) - Enable or disable debug logs
  • Offline mode only: SetMode, CreateVirtualSimulationServer, SetLimitSimulation, GetLimitStats


Update Logs – v1.1.0

  • Added offline mode with virtual server support
  • Added simulated service quotas and statistics
  • Extended queue and replay to work offline
  • Added targeted replay for specific virtual servers
  • Maintains full backwards compatibility with v1.0.5

License

MIT - see LICENSE for details.


GitHub: V1nyI


How do you feel about this new update?
  • Useful
  • Neutral
  • Confusing
  • Bad
0 voters

Is this Module useful?
  • Yes
  • Maybe
  • No
0 voters
24 Likes

feel free to ask me anything about this module!

oops i forgot to add SetDebugMode, now it is added

Open to ideas, feel free to share any feature suggestions!

This looks really awesome!
I must ask though, what does it do better than the services roblox uses currently? Sorry, I only skimmed it and I’m not very familiar with this so I don’t really understand the power it might provide

Hello!
With MessagingService alone

  • Messages are lost if a server is offline or joins late
  • If publish fails, it’s gone forever, no retries
  • You have no way to replay old messages
  • You can’t cancel, bulk send, or throttle messages
  • There’s no built-in way to avoid duplicates

With this module:

  • Messages can be saved in MemoryStore and replayed for servers that join later (messageRetentionTime)
  • Failed messages automatically retry until delivered or marked as “dead letter”
  • You can cancel messages before they’re processed
  • Supports bulk publishing and local publishing
  • Avoids duplicates

Highlighted Features:

  • Message Replay: Never miss an event, store messages in MemoryStore and replay them for late-joining servers (messageRetentionTime)
  • Local Publish for Testing: Send messages to the same server, perfect for development, debugging, and internal events
1 Like

Update logs, Version: “v1.0.5”

  • SetDebugMode – Enable or disable debug mode
  • :BulkPublish(messages: {{topic: string, payload: any, messageType: string, messageRetentionTime: number, localPublish: boolean}) – Publish Multiple Messages

BulkPublish

  • Publishes all messages atomically — if one fails, none are sent.

  • Supports up to 100 messages in a single batch

  • Supports both MemoryStore-based retention and local-only publish.
  • Bypasses message queue if flagged for local delivery only.

Been cooking up a small but powerful addition for CrossServerManager, it’ll make your workflow safer, Release coming soon

CrossServerManager v1.1.0 - Now with Offline Simulation & Virtual Servers

What’s New in v1.1.0

  • Offline Mode - Test your game without Roblox backend services
  • Virtual Servers - Create simulated servers for local multi-server testing in Studio
  • Service Limit Simulation - Configure quotas for MessagingService, MemoryStoreService, and DataStoreService to match Roblox limits
  • Limit Statistics - Check usage counters in real time with GetLimitStats()
  • Offline Queue & Replay - Queue processing and message replay now work fully in offline mode
  • Targeted Replay - In offline mode, replay missed messages to a specific simulated server
  • Backward Compatible - All online mode features from v1.0.5 remain intact

Feature Comparison

Feature v1.0.5 (Old) v1.1.0 (New)
Modes Online only Online + Offline
Virtual Servers :cross_mark: :white_check_mark:
Limit Simulation :cross_mark: :white_check_mark:
Limit Stats :cross_mark: :white_check_mark:
Offline Queue :cross_mark: :white_check_mark:
Offline Replay :cross_mark: :white_check_mark:
Targeted Replay :cross_mark: :white_check_mark:
Backwards Compatibility :white_check_mark: :white_check_mark:
1 Like

1 Like

Module is now available at roblox creator store: https://create.roblox.com/store/asset/114422237276742/CrossServerManager