I’m currently building a system that relies on a messaging service. Whenever a new server is initialized, it subscribes to the appropriate topic. At the same time, my system uses a periodic update. My question is: once a server has already subscribed, should it skip the code that calculates the next update (that has a random factor) and messaging update and simply wait for the updates pushed via the messaging service? Or is it safe for every server to keep running that scheduling code independently?
In my case : I have my map’s “season” change every hour. When a new server comes online, it uses the messaging service to fetch the current season (the same value shared by all servers logically). Should the script that handles time tracking, season selection, etc., run on every server, regardless of subscription status, or only on those servers that weren’t able to subscribe (because no messaging service was available since no server was open)?
It feels a bit odd to let every server run the same scheduling logic, since they'll all send update and different results if i'm not wrong.
But at the same time making server skipping the scheduling logic is scary because maybe they won't get the Message from Messaging Service, idk.
Sorry for bad english I tried my best