주제를 만들 때는 주제 설정을 위한 여러 옵션을 지정해야 합니다. 이러한 속성 중 일부는 모든 유형의 주제에 공통적이며 다음 섹션에서 설명합니다.
기본 구독 추가
Pub/Sub 주제에 기본 구독을 추가합니다. 주제가 생성된 후에 주제의 다른 구독을 만들 수 있습니다. 기본 구독에는 다음과 같은 속성이 있습니다.
-sub의 구독 ID
가져오기 전송 유형
메시지 보관 기간 7일
31일 동안 활동이 없으면 만료됨
확인 기한 10초
즉시 재시도 정책
스키마
스키마는 메시지 데이터 필드가 따라야 하는 형식입니다. 스키마는 Pub/Sub가 적용하는 게시자와 구독자 간의 계약입니다.
주제 스키마는 메시지 유형과 권한을 표준화하여 조직의 여러 팀에서 사용할 수 있도록 합니다. Pub/Sub는 메시지 유형 및 권한을 위한 중앙 권한을 만듭니다. 스키마로 주제를 만들려면 스키마 만들기 및 관리를 참조하세요.
메시지 보관 기간
게시 후 Pub/Sub 주제에서 메시지를 보관하는 기간을 지정합니다. 메시지 보관 기간이 끝나면 Pub/Sub는 확인 상태에 관계없이 메시지를 삭제할 수 있습니다. 주제에 게시된 모든 메시지를 저장할 때 메시지 스토리지 요금이 청구됩니다.
기본값 = 사용 설정되지 않음
최솟값 = 10분
최댓값 = 31일
고객 관리 암호화 키(CMEK) 사용
주제가 CMEK로 암호화되는지 여부를 지정합니다. Pub/Sub는 기본적으로 Google-owned and Google-managed encryption keys 로 메시지를 암호화합니다. 이 옵션을 지정하면 Pub/Sub에서 CMEK와 함께 봉투 암호화 패턴을 사용합니다. 이 방식에서 Cloud KMS는 메시지를 암호화하지 않습니다. 대신 Cloud KMS는 Pub/Sub에서 각 주제에 만드는 데이터 암호화 키(DEK)를 암호화합니다.
Pub/Sub는 주제에 생성된 최신 DEK를 사용하여 메시지를 암호화합니다. Pub/Sub는 메시지가 구독자에게 전달되기 직전에 메시지를 복호화합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["Pub/Sub topic properties are the characteristics of a topic.\nYou can set topic properties when you create or update a topic.\n\nThis document describes the different topic properties\nyou can set for a topic.\n\nBefore you begin\n\n- Learn about [topics](/pubsub/docs/publish-message-overview#about_topics) and the publish messages workflow.\n- [Create a topic](/pubsub/docs/create-topic).\n\nCommon topic properties\n\nWhen you create a topic, you must specify a number of options to\nset up the topic. Some of these properties are common to all types of\ntopics and are discussed in the next sections.\n\nAdd a default subscription\n\nAdds a default subscription to the Pub/Sub topic. You can create\nanother subscription for the topic after the topic is created. The default\nsubscription has the following properties:\n\n- Subscription ID of `-sub`\n- Pull delivery type\n- Message retention duration of seven days\n- Expiration after 31 days of inactivity\n- Acknowledgment deadline of 10 seconds\n- Immediate retry policy\n\nSchema\n\nA schema is a format that the message data field must follow. A\nschema is a contract between the publisher and subscriber that\nPub/Sub enforces.\n\nTopic schemas help standardize message types and\npermissions to allow them to be consumed by different teams in your\norganization. Pub/Sub creates a central authority for message\ntypes and permissions. To create a topic with schema, see\n[Create and manage schemas](/pubsub/docs/schemas).\n\nMessage retention duration\n\nSpecifies how long the Pub/Sub topic retains messages after\npublication. After the message retention duration is over, Pub/Sub\nmight discard the message regardless of its acknowledgment state. Message\nstorage fees are charged for storing all messages published to the topic.\n\n- Default = Not enabled\n- Minimum value = 10 minutes\n- Maximum value = 31 days\n\nUse a customer-managed encryption key (CMEK)\n\nSpecifies if the topic is encrypted with a CMEK. Pub/Sub encrypts\nmessages with Google-owned and Google-managed encryption keys by default. If you specify this option,\nPub/Sub uses the envelope encryption pattern with CMEK. In this\napproach, Cloud KMS does not encrypt the messages. Instead, Cloud KMS encrypts\nthe Data Encryption Keys (DEKs) that Pub/Sub creates for each\ntopic.\n\nPub/Sub encrypts the messages using the newest DEK that was\ngenerated for the topic. Pub/Sub decrypts the messages shortly\nbefore they are delivered to subscribers.\n\nFor more information about creating a key, see [Configure message\nencryption](/pubsub/docs/encryption).\n\nSingle Message Transforms (SMTs)\n\nSpecifies lightweight modifications to message attributes and data directly\nwithin Pub/Sub. This enables data cleaning, filtering, or format\nconversion before the messages are published to the topic.\n\nFor more information, see [SMTs Overview](/pubsub/docs/smts/smts-overview) and\n[Create a topic with SMTs](/pubsub/docs/smts/create-topic-smt).\n\nWhat's next\n\n- Create a [pull subscription](/pubsub/docs/create-subscription).\n- Create a [push subscription](/pubsub/docs/create-push-subscription).\n- Create a [BigQuery subscription](/pubsub/docs/create-bigquery-subscription).\n- Create a [Cloud Storage subscription](/pubsub/docs/create-cloudstorage-subscription)."]]