I’m currently creating a server list system for my game, it only sends a message to the rooms when a button is triggered and has a cooldown of 60 seconds, when a list is updated, everyone’s list updates and the cooldown updates to prevent overloading.
But since I started using messagingservice I ran into this issue where it would send this error message saying that it needs to wait -2147483648 seconds before retrying, and even after leaving the game and waiting for almost a day, it would still send this message, when I changed the topic name it would stop for a while, but then return again with the same error.
I can’t replicate this bug, though I’d like to throw in a suggestion first before determining if this is really a bug or not.
This would likely be true, as MessageService can only have 1kB at a time per message as seen on its reference page, though I don’t quite know how to tell you to measure the amount you’re sending.
Let's try reducing the size before calling it a bug first.
So the problem might be that the amount of data you’re attempting to send overloads it and gives the strange error (though this also seems to occur in Studio regardless of size to me). A better method might be making use of Datastores instead to send the data across all servers, and using the message service to simply tell the others to re-check the Datastores so they can update (granted Datastores take several seconds to update across all servers, so include some wait time before sending that message).
Or just in general attempt by sending small messages with the service and see if it will bug out.
If that method doesn’t work, then yeah. This could likely be some sort of bug and needs attention.
After your suggestion, I tried finding a way to compress all the data into text so it doesn’t exceed 1kb, then I found a script and made some tricks to make it work. Script for anyone interested: Text compression - #3 by RuizuKun_Dev
First I compressed it into a JSON string and then used the compressor module to make the text even smaller in size, the result is this during a test:
After some tests, I reach my final conclusion that it worked! (read last edit)
I made 3 sepparated tests to make sure no sides of the game would break, game and menu, and to make sure it really doesn’t overload, I asked my friends to keep sending requests for a few minutes while I kept checking the server’s status, and it didn’t break in the end.
Sadly I had to remove the “players connected” list since it was the main reason why the MessagingService was overloading.
Thanks @ShadokuSan and @grilme99 for helping me out , but of course, this bug still exists and needs a fix, since it doesn’t actually say “The message exceeds 1kb and cannot be sent”.
Edit: forgot to mention this, not 100% sure but whenever a topic gets this error it never resets the budget, resulting in a “corrupted” topic
I had to change the topic name so it would actually send the compressed data
Edit 05/19/2020: This bug still exists and my game, Herickman’s Hotel, cannot be completed because of it.