Class/Object

com.google.pubsub.v1.pubsub

Subscription

Related Docs: object Subscription | package pubsub

Permalink

final case class Subscription(name: String = "", topic: String = "", pushConfig: Option[PushConfig] = _root_.scala.None, ackDeadlineSeconds: Int = 0, retainAckedMessages: Boolean = false, messageRetentionDuration: Option[Duration] = _root_.scala.None, labels: Map[String, String] = ..., enableMessageOrdering: Boolean = false, expirationPolicy: Option[ExpirationPolicy] = _root_.scala.None, filter: String = "", deadLetterPolicy: Option[DeadLetterPolicy] = _root_.scala.None, retryPolicy: Option[RetryPolicy] = _root_.scala.None, detached: Boolean = false) extends GeneratedMessage with Message[Subscription] with Updatable[Subscription] with Product with Serializable

A subscription resource.

name

Required. The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}". {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

topic

Required. The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}. The value of this field will be _deleted-topic_ if the topic has been deleted.

pushConfig

If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.

ackDeadlineSeconds

The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be <i>outstanding</i>. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call ModifyAckDeadline with the corresponding ack_id if using non-streaming pull or send the ack_id in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.

retainAckedMessages

Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the message_retention_duration window. This must be true if you would like to [Seek to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).

messageRetentionDuration

How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retain_acked_messages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a Seek can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.

labels

See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.

enableMessageOrdering

If true, messages published with the same ordering_key in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order.

expirationPolicy

A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expiration_policy is not set, a *default policy* with ttl of 31 days will be used. The minimum allowed value for expiration_policy.ttl is 1 day.

filter

An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only PubsubMessages whose attributes field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.

deadLetterPolicy

A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription.

retryPolicy

A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.

detached

Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. Pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.

Annotations
@SerialVersionUID()
Linear Supertypes
Product, Equals, Updatable[Subscription], Message[Subscription], GeneratedMessage, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Subscription
  2. Product
  3. Equals
  4. Updatable
  5. Message
  6. GeneratedMessage
  7. Serializable
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Subscription(name: String = "", topic: String = "", pushConfig: Option[PushConfig] = _root_.scala.None, ackDeadlineSeconds: Int = 0, retainAckedMessages: Boolean = false, messageRetentionDuration: Option[Duration] = _root_.scala.None, labels: Map[String, String] = ..., enableMessageOrdering: Boolean = false, expirationPolicy: Option[ExpirationPolicy] = _root_.scala.None, filter: String = "", deadLetterPolicy: Option[DeadLetterPolicy] = _root_.scala.None, retryPolicy: Option[RetryPolicy] = _root_.scala.None, detached: Boolean = false)

    Permalink

    name

    Required. The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}". {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

    topic

    Required. The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}. The value of this field will be _deleted-topic_ if the topic has been deleted.

    pushConfig

    If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.

    ackDeadlineSeconds

    The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be <i>outstanding</i>. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call ModifyAckDeadline with the corresponding ack_id if using non-streaming pull or send the ack_id in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.

    retainAckedMessages

    Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the message_retention_duration window. This must be true if you would like to [Seek to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).

    messageRetentionDuration

    How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retain_acked_messages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a Seek can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.

    labels

    See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.

    enableMessageOrdering

    If true, messages published with the same ordering_key in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order.

    expirationPolicy

    A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expiration_policy is not set, a *default policy* with ttl of 31 days will be used. The minimum allowed value for expiration_policy.ttl is 1 day.

    filter

    An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only PubsubMessages whose attributes field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.

    deadLetterPolicy

    A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription.

    retryPolicy

    A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.

    detached

    Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. Pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val ackDeadlineSeconds: Int

    Permalink

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

    The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be <i>outstanding</i>. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call ModifyAckDeadline with the corresponding ack_id if using non-streaming pull or send the ack_id in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.

  5. def addAllLabels(__vs: Iterable[(String, String)]): Subscription

    Permalink
  6. def addLabels(__vs: (String, String)*): Subscription

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clearDeadLetterPolicy: Subscription

    Permalink
  9. def clearExpirationPolicy: Subscription

    Permalink
  10. def clearLabels: Subscription

    Permalink
  11. def clearMessageRetentionDuration: Subscription

    Permalink
  12. def clearPushConfig: Subscription

    Permalink
  13. def clearRetryPolicy: Subscription

    Permalink
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def companion: Subscription.type

    Permalink
    Definition Classes
    Subscription → GeneratedMessage
  16. val deadLetterPolicy: Option[DeadLetterPolicy]

    Permalink

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

    A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription.

  17. val detached: Boolean

    Permalink

    Indicates whether the subscription is detached from its topic.

    Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. Pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.

  18. val enableMessageOrdering: Boolean

    Permalink

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

    If true, messages published with the same ordering_key in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order.

  19. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. val expirationPolicy: Option[ExpirationPolicy]

    Permalink

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

    A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expiration_policy is not set, a *default policy* with ttl of 31 days will be used. The minimum allowed value for expiration_policy.ttl is 1 day.

  21. val filter: String

    Permalink

    An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering).

    An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only PubsubMessages whose attributes field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.

  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def getDeadLetterPolicy: DeadLetterPolicy

    Permalink
  25. def getExpirationPolicy: ExpirationPolicy

    Permalink
  26. def getField(__field: FieldDescriptor): PValue

    Permalink
    Definition Classes
    Subscription → GeneratedMessage
  27. def getFieldByNumber(__fieldNumber: Int): Any

    Permalink
    Definition Classes
    Subscription → GeneratedMessage
  28. def getMessageRetentionDuration: Duration

    Permalink
  29. def getPushConfig: PushConfig

    Permalink
  30. def getRetryPolicy: RetryPolicy

    Permalink
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. val labels: Map[String, String]

    Permalink

    See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.

  33. def mergeFrom(_input__: CodedInputStream): Subscription

    Permalink
    Definition Classes
    Subscription → Message
  34. val messageRetentionDuration: Option[Duration]

    Permalink

    How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published.

    How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retain_acked_messages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a Seek can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.

  35. val name: String

    Permalink

    Required.

    Required. The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}". {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

  36. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  37. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. val pushConfig: Option[PushConfig]

    Permalink

    If push delivery is used with this subscription, this field is used to configure it.

    If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.

  40. val retainAckedMessages: Boolean

    Permalink

    Indicates whether to retain acknowledged messages.

    Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the message_retention_duration window. This must be true if you would like to [Seek to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).

  41. val retryPolicy: Option[RetryPolicy]

    Permalink

    A policy that specifies how Pub/Sub retries message delivery for this subscription.

    A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.

  42. final def serializedSize: Int

    Permalink
    Definition Classes
    Subscription → GeneratedMessage
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. def toByteArray: Array[Byte]

    Permalink
    Definition Classes
    GeneratedMessage
  45. def toByteString: ByteString

    Permalink
    Definition Classes
    GeneratedMessage
  46. def toPMessage: PMessage

    Permalink
    Definition Classes
    GeneratedMessage
  47. def toProtoString: String

    Permalink
    Definition Classes
    Subscription → GeneratedMessage
  48. val topic: String

    Permalink

    Required.

    Required. The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}. The value of this field will be _deleted-topic_ if the topic has been deleted.

  49. def update(ms: (Lens[Subscription, Subscription]) ⇒ Mutation[Subscription]*): Subscription

    Permalink
    Definition Classes
    Updatable
  50. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def withAckDeadlineSeconds(__v: Int): Subscription

    Permalink
  54. def withDeadLetterPolicy(__v: DeadLetterPolicy): Subscription

    Permalink
  55. def withDetached(__v: Boolean): Subscription

    Permalink
  56. def withEnableMessageOrdering(__v: Boolean): Subscription

    Permalink
  57. def withExpirationPolicy(__v: ExpirationPolicy): Subscription

    Permalink
  58. def withFilter(__v: String): Subscription

    Permalink
  59. def withLabels(__v: Map[String, String]): Subscription

    Permalink
  60. def withMessageRetentionDuration(__v: Duration): Subscription

    Permalink
  61. def withName(__v: String): Subscription

    Permalink
  62. def withPushConfig(__v: PushConfig): Subscription

    Permalink
  63. def withRetainAckedMessages(__v: Boolean): Subscription

    Permalink
  64. def withRetryPolicy(__v: RetryPolicy): Subscription

    Permalink
  65. def withTopic(__v: String): Subscription

    Permalink
  66. def writeDelimitedTo(output: OutputStream): Unit

    Permalink
    Definition Classes
    GeneratedMessage
  67. def writeTo(_output__: CodedOutputStream): Unit

    Permalink
    Definition Classes
    Subscription → GeneratedMessage
  68. def writeTo(output: OutputStream): Unit

    Permalink
    Definition Classes
    GeneratedMessage

Deprecated Value Members

  1. def getAllFields: Map[FieldDescriptor, Any]

    Permalink
    Definition Classes
    GeneratedMessage
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.0) Use toPMessage

  2. def getField(field: FieldDescriptor): Any

    Permalink
    Definition Classes
    GeneratedMessage
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.0) Use getField that accepts a ScalaPB descriptor and returns PValue

Inherited from Product

Inherited from Equals

Inherited from Updatable[Subscription]

Inherited from Message[Subscription]

Inherited from GeneratedMessage

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped