Are :PublishAsync calls guaranteed to be received in :SubscribeAsync functions?

I need help determining whether PublishAsync messages are guaranteed to be received or not

If, in the first server, I wrap “PublishAsync” in a pcall and it succeeds, and in the second server the “SubscribeAsync” pcall also succeeds, is it guaranteed that the message will arrive or it may be lost due to limitations? (I am not referring to subscribing after posting!!)

1 Like

If the other server has subscribed already, and the server publishes a message, it should arrive because you wrapped it in a pcall.

So yeah, in a pcall, they should be.

1 Like

From the documentation:

Delivery is best effort and not guaranteed. Make sure to architect your game so delivery failures are not critical.

Ive had some issues before where some servers would seemingly not receive messages anymore, even when wrapped in a pcall. Your example should work fine though

1 Like

Yes, my game has a very secure method. This is why the only thing I need to know is whether, even when both protected calls succeed, there is a possibility of SubscribeAsync not retrieving a posted message.

->Server1 subscribes to a topic called “Lol”

->Server2 posts after that in the topic “Lol” a message

Imagine both actions have succeeded, is there still a possibility, for some reason, that server1 may not retrieve the message server2 posted, a limitation or anything? Or once PublishMessage has succeeded in the pcall it is guaranteed to have arrived?

This topic was solved very long ago

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.