You might have received an email from Google about a change to Cloud Pub/Sub message retention pricing, effective June 30, 2024.
If you’re wondering what this is and whether it affects you, I’ll add some clarifying thoughts here:
Are RevenueCat apps affected?
No. RevenueCat acknowledges all Pub/Sub messages right away, so using RevenueCat will not incur any extra charges on your account from this message retention policy.
Am I affected outside of RevenueCat’s usage?
Probably not, but you could be affected if you have:
- “idle subscriptions” (meaning things that subscribe to the Pub/Sub messages but don’t actually do anything).
- use the pub/sub queue as a form of a backup, and return a non-200 status code to pub/sub messages so they don’t get deleted from there
- have listeners that are very slow to respond (over 24 hrs).
Is there a way to check if I’m affected?
Yes! Just log into Google Cloud (not Play Console): https://console.cloud.google.com/cloudpubsub/subscription/
Then select your project, go to Pub/Sub, select the Topic, click on the subscription to that topic and the charts are on the overview section.
So… what is this change anyway?
Google uses Cloud Pub/Sub messages to deliver real-time developer notifications for changes in subscriptions, new purchases, cancellations, etc.
As a RevenueCat customer, setting this up as an optional but recommended step, since it’ll allow us to provide you with real-time information, webhooks, etc.
Once Google sends out a message in Cloud Pub/Sub, subscribers are expected to acknowledge the message by returning a 200 status code.
Up until now, if you didn’t return a 200 status code, Google would retain those messages for free for 7 days (and delete them afterwards). Starting now, Google will start charging for messages retained (i.e.: unacknowledged) for longer than 24 hours. They charge $0.27 per GB-month for these.
If you are affected and still want to keep the messages for over 24 hours, you can avoid this cost without further changes by enabling Topic Retention on the topic.