Class SubscriptionDestination
- All Implemented Interfaces:
Serializable
Instances are pure subscription identity: equals(Object) and hashCode() are defined over exactly (project, subscription), so a split carries one and the
enumerator can key its per-subscription bookkeeping by it. The reader does not key its
subscribers this way — it keys them by split id, because under OrderingMode.NONE several
splits deliberately consume one subscription, each with its own subscriber. Subscriber settings
are intentionally not part of this class — they are configured on the source — keeping
subscription identity stable.
Instances are immutable; the resource path and hash are precomputed.
Deliberately mirrors sink.TopicDestination (and the BigQuery module's
TableDestination) rather than sharing a base type: the three name different resources and only
coincide in shape. A shared destination-identity type was considered and declined when issue #61
created flink-connector-gcp-base — a type moves there only once it has multiple
consumers, and nothing consumes destination identity across modules.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the Google Cloud project id, given as a bare id rather than a resource path.Returns the Pub/Sub subscription id, given as a bare id rather than a resource path.inthashCode()static SubscriptionDestinationCreates aSubscriptionDestinationfrom bare ids, not resource paths.toString()Returns the subscription path in theprojects/<p>/subscriptions/<s>form used by the Pub/Sub API.
-
Method Details
-
of
Creates aSubscriptionDestinationfrom bare ids, not resource paths.- Parameters:
project- the Google Cloud project idsubscription- the Pub/Sub subscription id- Returns:
- the destination
- Throws:
IllegalArgumentException- if a component is null or blank, has leading or trailing whitespace, or contains'/'— a separator would make the composed resource path address a different resource
-
getProject
Returns the Google Cloud project id, given as a bare id rather than a resource path. -
getSubscription
Returns the Pub/Sub subscription id, given as a bare id rather than a resource path. -
toSubscriptionPath
Returns the subscription path in theprojects/<p>/subscriptions/<s>form used by the Pub/Sub API. -
equals
-
hashCode
public int hashCode() -
toString
-