Subscription preview | Documentation on Cloud Pub/Sub | Google Cloud, subscription configuration | Google Play Console
Google Subscription
Attract new subscribers with tests, discovery prices and promotions on Google.
Subscription preview
To receive messages published in a subject, you must create an associated subscription on this subject. Only messages published in the subject after the creation of the subscription are available for subscribed customers. The subscriber customer receives and treats messages published in the subject. A subject can be associated with several subscriptions, but a given subscription can only be associated.
The preservation functionality of subjects allows a subscription associated with a subject to go back and reread previously published messages. To find out more about this feature, see the reopen page and permanently delete messages.
Subscription workflow
- Once a message has been sent to a subscriber, the latter must acknowledge receipt.
- If a message is sent to the distribution and a subscriber has not yet read it, it is called pending.
- Pub/Sub tries several times to distribute a message that is not yet confirmed. However, Pub/Sub is trying not to distribute any message pending to another subscription on the same subscription.
- The subscriber has a configurable and limited time, called Ackdeadline, to acknowledge receipt of the waiting message. After this period, the message is no longer considered pending and advertising/sub is trying to redistribute it.
Types of subscriptions
When you create a subscription, you must specify the type of distribution of messages. Pub/SU offers the following types of subscriptions:
- THE Pull subscriptions Use a subscriber customer to request messages from the Pub/Sub server.
- THE push subscriptions Use the Pub/Sub server to send queries to your subscriber application to distribute messages.
- L’Export of subscriptions Allows you to export your messages directly to a Google Cloud resource. These subscriptions are as follows:
- THE Bigquery subscriptions export data to a Bigquery table.
- THE Cloud Storage subscriptions export data to a Cloud Storage Bucket.
To choose the subscription adapted to the needs of your business, consult choosing a type of subscription. You can update the type of distribution of messages for a subscription at any time after its creation.
Default subscription properties
By default, PUB/SU offers a distribution of type “at least once”, without guarantee of sorting on all types of subscriptions. If messages have the same sorting key and are in the same region, you can activate the messages classification. Once you have defined messages to sort messages, the PUB/SU service broadcasts messages with the same sorting key and in the order in which the PUB/SUP service receives them.
Pub/Sub is also compatible with “Exactly once” broadcasting.
In general, PUB/SU distributes each message once and in the order in which it was published. However, messages can sometimes be distributed out of disorder or several times. Pub/Sub can redistribute a message even after a confirmation request for the message has been returned. This discount can be caused by problems such as rebounds on the server side or customer -side problems. Thus, although rare, any message can be returned at any time.
To be able to manage the sending in several times, your subscriber must be idempot when processing messages.
Subscription expiration
By default, subscriptions expire after 31 days of inactivity or in the absence of updates. Open connections, successful active or pushy sweater actions are examples of subscriber activities. If advertising/sub detects a subscriber activity or an update of the properties of the subscription, the clock of removing the subscription restart. Using subscription expiration rules, you can configure the duration of inactivity or make the subscription persistent, whatever the activity. You can also delete a subscription manually.
Although you can create a subscription with the same name as a deleted subscription, the new subscription has no relationship with the old. Even if the deleted subscription included many unconfirmed messages, a new subscription bearing the same name would present any waiting message at the time of creation (no message awaiting distribution).
Following steps
- Choose the type of subscription adapted to the requirements of your business.
- Understand the workflow for each type of subscription:
- Sweater
- To transfer
- BigQuery
- Cloud Storage
Comment
Unless otherwise indicated, the content of this page is governed by a Creative Commons Assignment 4 license.0, and code samples are governed by a Apache 2 license.0. For more information, see the rules of the Google Developers site. Java is a registered trademark of Oracle and/or its affiliated companies.
Last update on 2023/08/03 (UTC).
Configuration of subscriptions
Attract new subscribers with tests, discovery prices and promotions on Google.
Retain your customers
Discover the different measures that you can put in place to limit the loss of subscribers (period of grace, blocking and account suspension, possibility of changing subscription level)
Customize your subscriptions
Adapt your subscriptions to customer needs by offering different invoicing periods, using local currencies and modifying your prices
Good practices
- Allow users to test your application before subscribing by setting up a test (which you choose the duration) or indicate a discovery price applicable to a certain number of invoicing periods.
- Personalize the price for each language and invoice users in their local currency.
- Offer your subscribers the possibility of updating their payment method in the event of refusal of recurring payment by setting up grace deadlines.
- Leave users the freedom to change their plan (by moving to a lower or upper package) or to re -register to keep their access.
- To reduce the loss of users due to voluntary subscription termination and offer Internet users another solution, you can allow them to suspend their subscription.
Learn more
Create a subscription
Find out how to add a subscription to your application and find out about your responsibilities as a developer
Promote purchase thanks to subscriptions
Find out how to optimize your income generated by subscriptions according to user motivations and their commitment
Documentation for developers
Find out how to use Google Play Billing to integrate specific features for subscriptions to your application
Subscription models for games
Find out how to apply a subscription model to your game by following a course at the request of the Play Academy