The docs say Delivery is best effort and not guaranteed. Make sure to architect your experience so delivery failures are not critical. They don’t say how to handle or detect delivery failure. PublishAsync returns void, so does it error when it fails? What errors can I expect?
For comparison, memory stores have a documented list of status codes that can occur. Ideally every API would have something like this to refer to so that every response can be properly handled.
It’s like UDP I believe; There are no built-in measures to verify the message was not lost due to network conditions (like Packet Loss), so you should not assume that it’s guaranteed to be received.
The person responding above is right – there’s no way to guarantee message delivery or detect delivery failures with the MessagingService. I recommend only using messages for non-critical updates, and using something like data stores for critical data.
As for PublishAsync, you can catch and log publishing errors by wrapping it in a pcall. It’ll throw an error if you exceed rate limits, use invalid data, or if the service is unavailable.