Topic properties

Pub/Sub topic properties are the characteristics of a topic. You can set topic properties when you create or update a topic.

This document describes the different topic properties you can set for a topic.

Before you begin

Common topic properties

When you create a topic, you must specify a number of options to set up the topic. Some of these properties are common to all types of topics and are discussed in the next sections.

Add a default subscription

Adds a default subscription to the Pub/Sub topic. You can create another subscription for the topic after the topic is created. The default subscription has the following properties:

  • Subscription ID of -sub
  • Pull delivery type
  • Message retention duration of seven days
  • Expiration after 31 days of inactivity
  • Acknowledgment deadline of 10 seconds
  • Immediate retry policy

Schema

A schema is a format that the message data field must follow. A schema is a contract between the publisher and subscriber that Pub/Sub enforces.