1. Size of message
This has already been reported in 2019, but hasn’t been fixed since then.
This limit is 976B instead of 1024B (1kB) because it is calculated including the Data/Sent fields.
MessagingService:PublishAsync("a", string.rep("a", 974)) --has a size of 976
MessagingService:PublishAsync("a", string.rep("a", 975)) --too large
2. Messages sent per game server
When there is only one player in the server, this limit is 360 instead of 210 (150 + 60 * 1).
for i = 1, 1000 do
task.wait()
task.spawn(function()
local success = pcall(function()
MessagingService:PublishAsync("a", 0)
end)
if success then print(i) end
end)
end
3. Messages received per topic
This limit is 75 instead of 30 (10 + 20 * 1) when testing with one server.
local received = 0
MessagingService:SubscribeAsync("a", function()
received += 1
print(received)
end)
for _ = 1, 1000 do
task.wait(0.05)
task.spawn(function()
pcall(function()
MessagingService:PublishAsync("a", 0)
end)
end)
end