I am using the Real-time developer notifications to handle my app subscriptions. I've read that Pub/Sub messages may be ordered.
I want to execute some logic when the notification type is SUBSCRIPTION_PURCHASED, but if it arrives unordered and after another message, maybe it could be problematic and could be better if I ignore the notification type and deal with the DB data directly. Are Real-time developer notifications ordered?
As I am using Cloud Functions and it unfortunately don't support this Pub/Sub message ordering directly, I would have to create a HTTP endpoint with Functions, set it in Pub/Sub console, and verify myself if the Authorization header is ok.
Also, that list link says the messages are sent at least once, so I could receive that SUBSCRIPTION_PURCHASED again. At which rate they may be redelivered even if ack'ed? How to handle that in CF, where there may be multiple Functions instances running? If the redeliver messages are sent too quickly, maybe I couldn't handle that via DB check.