So I’m using messaging services for chat system in my game and I got this error: "The game server has reached the allowed limit of active subscriptions."
In the Wiki documentation I can’t find anything mentioning the limit of active subscriptions. Why is this happening?
Documentation is outdated. You can test local with the script below. Enable API Request in Roblox Studio and run.
local MessagingService = game:GetService("MessagingService")
local topic_prefix = 'topic_';
spawn(function()
wait(3)
for i = 1, 10 do
local topic = topic_prefix..i
local connection
local success, err = pcall(function()
connection = MessagingService:SubscribeAsync(topic, function()
--- empty
end)
end)
if success then
print('Successfully connected to the "'..topic..'" topic')
else
warn('Error connecting to "'..topic..'" topic', err)
end
wait(2)
end
end)
Output
12:59:13.993 Successfully connected to the "topic_1" topic - Server - Server:28
12:59:16.428 Successfully connected to the "topic_2" topic - Server - Server:28
12:59:18.895 Successfully connected to the "topic_3" topic - Server - Server:28
12:59:21.312 Successfully connected to the "topic_4" topic - Server - Server:28
12:59:23.729 Successfully connected to the "topic_5" topic - Server - Server:28
12:59:26.146 Successfully connected to the "topic_6" topic - Server - Server:28
12:59:28.595 Successfully connected to the "topic_7" topic - Server - Server:28
12:59:31.008 Error connecting to "topic_8" topic "The game server has reached the allowed limit of active subscriptions." - Server - Server:30
12:59:33.401 Error connecting to "topic_9" topic "The game server has reached the allowed limit of active subscriptions." - Server - Server:30
12:59:35.804 Error connecting to "topic_10" topic "The game server has reached the allowed limit of active subscriptions." - Server - Server:30
ps. You can increase the number of players in Studio to test the behavior