subscriptions_create: Creates a subscription to a given topic

View source: R/subscriptions.R

subscriptions_createR Documentation

Creates a subscription to a given topic

Description

Creates a subscription to a given topic

Usage

subscriptions_create(
  name,
  topic,
  dead_letter_policy = NULL,
  msg_retention_duration = NULL,
  labels = NULL,
  retry_policy = NULL,
  push_config = NULL,
  ack_deadline = NULL,
  expiration_policy = NULL,
  filter = NULL,
  detached = NULL,
  retain_acked_messages = NULL,
  enable_msg_ordering = NULL
)

Arguments

name

character Required, name of the subscription to be created

topic

Topic, character Required, an instance of a Topic object or a topic name

dead_letter_policy

DeadLetterPolicy A policy object that specifies the conditions for dead lettering messages in this subscription

msg_retention_duration

string How long to retain unacknowledged messages in the subscription's backlog in seconds

labels

list Key-value pairs for snapshot labels

retry_policy

RetryPolicy A RetryPolicy object that specifies how Pub/Sub retries message delivery for this subscription

push_config

PushConfig A PushConfig object

ack_deadline

numeric The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message.

expiration_policy

ExpirationPolicy A policy object that specifies the conditions for this subscription's expiration

filter

character An expression written in the Pub/Sub filter language

detached

logical Indicates whether the subscription is detached from its topic

retain_acked_messages

logical Indicates whether to retain acknowledged messages

enable_msg_ordering

logical If true, messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system

Value

A Subscription object

See Also

Other Subscription functions: subscriptions_ack(), subscriptions_delete(), subscriptions_detach(), subscriptions_exists(), subscriptions_get(), subscriptions_list(), subscriptions_modify_ack_deadline(), subscriptions_modify_pushconf(), subscriptions_patch(), subscriptions_pull(), subscriptions_seek()


googlePubsubR documentation built on March 7, 2023, 6:38 p.m.