Sign In Register

How can we help you today?

Start a new topic

SparkMessage.send() message ordering when sending multiple messages from one script

Hey all,

We're doing multiple SparkMessage.send() in one Cloud Code run and the messages do not arrive in order while a client is online.

Why is this? Is .send() not truly immediate? Should we not be expecting messages sent using .send to arrive in the order they were queued on the server?



1 Comment

Hi Ryan, 

This is expected behavior due to the Asynchronous nature of these messages. It can be due to many different reasons including the quality of your connection or the amount of cloud code associated with a particular message. 

You can handle this on the client using conditionals, and checking for certain messages. 

Happy to assist further.

Best Regards, Patrick. 

Login to post a comment