- NAME
-
- gcloud pubsub lite-topics create - create a Pub/Sub Lite topic
- SYNOPSIS
-
-
gcloud pubsub lite-topics create
TOPIC
--partitions
=PARTITIONS
--per-partition-bytes
=PER_PARTITION_BYTES
[--location
=LOCATION
] [--message-retention-period
=MESSAGE_RETENTION_PERIOD
] [--per-partition-publish-mib
=PER_PARTITION_PUBLISH_MIB
] [--per-partition-subscribe-mib
=PER_PARTITION_SUBSCRIBE_MIB
] [--throughput-reservation
=THROUGHPUT_RESERVATION
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
- Create a Pub/Sub Lite topic.
- EXAMPLES
-
To create a Pub/Sub lite-topic, run:
gcloud pubsub lite-topics create mytopic --location=us-central1-a --partitions=1 --per-partition-bytes=30GiB --message-retention-period=2w
- POSITIONAL ARGUMENTS
-
TOPIC
- Topic ID.
- REQUIRED FLAGS
-
--partitions
=PARTITIONS
- Number of partitions in the topic.
--per-partition-bytes
=PER_PARTITION_BYTES
-
Provisioned storage, in bytes, per partition. If the number of bytes stored in
any of the topic's partitions exceeds this value, older messages will be dropped
to make room for newer ones, regardless of the value of
message-retention-period
. A valid example value of this flag would beper-partition-bytes=30GiB
.
- OPTIONAL FLAGS
-
-
Location resource - Identifies the Cloud zone this command will be executed on.
This represents a Cloud resource. (NOTE) Some attributes are not given arguments
in this group but can be set in other ways.
To set the
project
attribute:-
provide the argument
--location
on the command line with a fully specified name; -
provide the argument
--zone
on the command line with a fully specified name; -
provide the argument
--project
on the command line; -
set the property
core/project
.
--location
=LOCATION
-
ID of the location or fully qualified identifier for the location.
To set the
location
attribute:-
provide the argument
--location
on the command line; -
provide the argument
--zone
on the command line.
-
provide the argument
-
provide the argument
--message-retention-period
=MESSAGE_RETENTION_PERIOD
-
How long a published message is retained. If unset, messages will only be
dropped to make space for new ones once the
per-partition-bytes
limit is reached. A valid example value of this flag would bemessage-retention-period="2w"
. --per-partition-publish-mib
=PER_PARTITION_PUBLISH_MIB
- Topic partition publish throughput capacity in MiB/s. Must be between 4 and 16.
--per-partition-subscribe-mib
=PER_PARTITION_SUBSCRIBE_MIB
- Topic partition subscribe throughput capacity in MiB/s. Must be between 4 and 32.
--throughput-reservation
=THROUGHPUT_RESERVATION
- Reservation ID to use for topic throughput.
-
Location resource - Identifies the Cloud zone this command will be executed on.
This represents a Cloud resource. (NOTE) Some attributes are not given arguments
in this group but can be set in other ways.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - API REFERENCE
-
This command uses the
pubsublite/v1
API. The full documentation for this API can be found at: https://cloud.google.com/pubsub/lite/docs - NOTES
-
These variants are also available:
gcloud alpha pubsub lite-topics create
gcloud beta pubsub lite-topics create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-02-06 UTC.",
"confidential": False
}