"Too many publish request, retry later" Error, MessagingService

Im really new into MessagingService, I can see theres limits about the size and the messages.

My question is how could I perform sending data from game servers on a constant loop cause right now Im getting this error: “Too many publish request, retry later”

Im sending a table not big, just a few lines, but I wanted to get the response from all those servers around each 30 seconds. When a server starts, a loop functions starts to send that info. I suppose my approach is wrong, what can you suggest me?

Never tried this, but perhaps take a look at MemoryStoreService. It allows for transmission of larger data between servers of the same game.

Here’s a tutorial showing how to use MemoryStoreService.

According to the docs (MessagingService | Roblox Creator Documentation)

Limit Maximum
Size of message 1kB
Messages sent per game server 150 + 60 * (number of players in this game server) per minute
Messages received per topic (10 + 20 * number of servers) per minute
Messages received for entire game (100 + 50 * number of servers) per minute

I think your issue is that every server is sending back a response, so it’s killing the limit. Not sure what you’d do there. You should be fine though? Send over your code.

There is no one-size-fits-all answer to this question as it depends on the specific use case, but a few tips to get you started:

  1. Make sure that you are using Roblox’s PublishAsync method instead of Publish, as this will limit the amount of requests that are sent out in a single batch.

  2. If you’re sending out a lot of messages, it might be worth considering using a Roblox queue system, such as the JobSchedulerService. This will allow you to send messages in batches and will allow for more efficient use of resources.

  3. Make sure that you are using Roblox’s rate limiting system to ensure that you don’t send out too many requests in a given period of time.

  4. If you’re sending data that is not frequently changing, you may want to consider using a caching system to reduce the amount of requests sent out.

Hopefully this gives you some ideas on how to approach this issue. Good luck!