Does Google Cloud Pub/Sub message retention pricing affect RevenueCat?

  • 1 February 2024
  • 2 replies
  • 115 views

Userlevel 5
Badge +8
  • RevenueCat Staff
  • 236 replies

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. 


2 replies

Thanks, Andy!

 

But why do you need 7 days retention, so? Will RevenueCat update the extension (Enable In-App Purchases with RevenueCat) to reduce the retention duration in a near future?

Userlevel 5
Badge +8

@fellipetav 

To clarify, RevenueCat does not need 7 days retention. We acknowledge all messages as soon as they are received, and once acknowledged, those messages get removed.

So if you only use Pub/Sub through RevenueCat, you will not incur any charges from it, and you do not need to worry about the retention period.

You only need to care about this if you use Pub/Sub outside of RevenueCat and don’t acknowledge messages within 24hrs. 

 

Hope this helps! 

Reply