diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java index 21ae0f027cbe..e82e70355728 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java @@ -32,6 +32,7 @@ private PubsubMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) private PubsubMessage() { data_ = com.google.protobuf.ByteString.EMPTY; messageId_ = ""; + orderingKey_ = ""; } @java.lang.Override @@ -98,6 +99,13 @@ private PubsubMessage( publishTime_ = subBuilder.buildPartial(); } + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderingKey_ = s; break; } default: @@ -350,6 +358,61 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { return getPublishTime(); } + public static final int ORDERING_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderingKey_; + /** + * + * + *
+ * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ public java.lang.String getOrderingKey() {
+ java.lang.Object ref = orderingKey_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderingKey_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ public com.google.protobuf.ByteString getOrderingKeyBytes() {
+ java.lang.Object ref = orderingKey_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ orderingKey_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -375,6 +438,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (publishTime_ != null) {
output.writeMessage(4, getPublishTime());
}
+ if (!getOrderingKeyBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderingKey_);
+ }
unknownFields.writeTo(output);
}
@@ -403,6 +469,9 @@ public int getSerializedSize() {
if (publishTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPublishTime());
}
+ if (!getOrderingKeyBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderingKey_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -426,6 +495,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasPublishTime()) {
result = result && getPublishTime().equals(other.getPublishTime());
}
+ result = result && getOrderingKey().equals(other.getOrderingKey());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@@ -449,6 +519,8 @@ public int hashCode() {
hash = (37 * hash) + PUBLISH_TIME_FIELD_NUMBER;
hash = (53 * hash) + getPublishTime().hashCode();
}
+ hash = (37 * hash) + ORDERING_KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getOrderingKey().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -631,6 +703,8 @@ public Builder clear() {
publishTime_ = null;
publishTimeBuilder_ = null;
}
+ orderingKey_ = "";
+
return this;
}
@@ -668,6 +742,7 @@ public com.google.pubsub.v1.PubsubMessage buildPartial() {
} else {
result.publishTime_ = publishTimeBuilder_.build();
}
+ result.orderingKey_ = orderingKey_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@@ -729,6 +804,10 @@ public Builder mergeFrom(com.google.pubsub.v1.PubsubMessage other) {
if (other.hasPublishTime()) {
mergePublishTime(other.getPublishTime());
}
+ if (!other.getOrderingKey().isEmpty()) {
+ orderingKey_ = other.orderingKey_;
+ onChanged();
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1273,6 +1352,130 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
return publishTimeBuilder_;
}
+ private java.lang.Object orderingKey_ = "";
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ public java.lang.String getOrderingKey() {
+ java.lang.Object ref = orderingKey_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderingKey_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ public com.google.protobuf.ByteString getOrderingKeyBytes() {
+ java.lang.Object ref = orderingKey_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ orderingKey_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ public Builder setOrderingKey(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ orderingKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ public Builder clearOrderingKey() {
+
+ orderingKey_ = getDefaultInstance().getOrderingKey();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ public Builder setOrderingKeyBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ orderingKey_ = value;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java
index e1db91aa9512..83af3d87f633 100644
--- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java
@@ -137,4 +137,37 @@ public interface PubsubMessageOrBuilder
* .google.protobuf.Timestamp publish_time = 4;
*/
com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ java.lang.String getOrderingKey();
+ /**
+ *
+ *
+ * + * Identifies related messages for which publish order should be respected. + * If a `Subscription` has `enable_message_ordering` set to `true`, messages + * published with the same `ordering_key` value will be delivered to + * subscribers in the order in which they are received by the Pub/Sub system. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
string ordering_key = 5;
+ */
+ com.google.protobuf.ByteString getOrderingKeyBytes();
}
diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
index df3bcc0691d2..2024dd9a3aa5 100644
--- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
+++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
@@ -216,192 +216,194 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "bsub.v1.Topic.LabelsEntry\022F\n\026message_sto"
+ "rage_policy\030\003 \001(\0132&.google.pubsub.v1.Mes"
+ "sageStoragePolicy\032-\n\013LabelsEntry\022\013\n\003key\030"
- + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\333\001\n\rPubsubMessa"
+ + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\361\001\n\rPubsubMessa"
+ "ge\022\014\n\004data\030\001 \001(\014\022C\n\nattributes\030\002 \003(\0132/.g"
+ "oogle.pubsub.v1.PubsubMessage.Attributes"
+ "Entry\022\022\n\nmessage_id\030\003 \001(\t\0220\n\014publish_tim"
- + "e\030\004 \001(\0132\032.google.protobuf.Timestamp\0321\n\017A"
+ + "e\030\004 \001(\0132\032.google.protobuf.Timestamp\022\024\n\014o"
+ + "rdering_key\030\005 \001(\t\0321\n\017AttributesEntry\022\013\n\003"
+ + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\" \n\017GetTopic"
+ + "Request\022\r\n\005topic\030\001 \001(\t\"m\n\022UpdateTopicReq"
+ + "uest\022&\n\005topic\030\001 \001(\0132\027.google.pubsub.v1.T"
+ + "opic\022/\n\013update_mask\030\002 \001(\0132\032.google.proto"
+ + "buf.FieldMask\"R\n\016PublishRequest\022\r\n\005topic"
+ + "\030\001 \001(\t\0221\n\010messages\030\002 \003(\0132\037.google.pubsub"
+ + ".v1.PubsubMessage\"&\n\017PublishResponse\022\023\n\013"
+ + "message_ids\030\001 \003(\t\"K\n\021ListTopicsRequest\022\017"
+ + "\n\007project\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa"
+ + "ge_token\030\003 \001(\t\"V\n\022ListTopicsResponse\022\'\n\006"
+ + "topics\030\001 \003(\0132\027.google.pubsub.v1.Topic\022\027\n"
+ + "\017next_page_token\030\002 \001(\t\"U\n\035ListTopicSubsc"
+ + "riptionsRequest\022\r\n\005topic\030\001 \001(\t\022\021\n\tpage_s"
+ + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"P\n\036ListTop"
+ + "icSubscriptionsResponse\022\025\n\rsubscriptions"
+ + "\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t\"Q\n\031ListT"
+ + "opicSnapshotsRequest\022\r\n\005topic\030\001 \001(\t\022\021\n\tp"
+ + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"H\n\032Li"
+ + "stTopicSnapshotsResponse\022\021\n\tsnapshots\030\001 "
+ + "\003(\t\022\027\n\017next_page_token\030\002 \001(\t\"#\n\022DeleteTo"
+ + "picRequest\022\r\n\005topic\030\001 \001(\t\"\245\003\n\014Subscripti"
+ + "on\022\014\n\004name\030\001 \001(\t\022\r\n\005topic\030\002 \001(\t\0221\n\013push_"
+ + "config\030\004 \001(\0132\034.google.pubsub.v1.PushConf"
+ + "ig\022\034\n\024ack_deadline_seconds\030\005 \001(\005\022\035\n\025reta"
+ + "in_acked_messages\030\007 \001(\010\022=\n\032message_reten"
+ + "tion_duration\030\010 \001(\0132\031.google.protobuf.Du"
+ + "ration\022:\n\006labels\030\t \003(\0132*.google.pubsub.v"
+ + "1.Subscription.LabelsEntry\022\037\n\027enable_mes"
+ + "sage_ordering\030\n \001(\010\022=\n\021expiration_policy"
+ + "\030\013 \001(\0132\".google.pubsub.v1.ExpirationPoli"
+ + "cy\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030"
+ + "\002 \001(\t:\0028\001\":\n\020ExpirationPolicy\022&\n\003ttl\030\001 \001"
+ + "(\0132\031.google.protobuf.Duration\"\255\002\n\nPushCo"
+ + "nfig\022\025\n\rpush_endpoint\030\001 \001(\t\022@\n\nattribute"
+ + "s\030\002 \003(\0132,.google.pubsub.v1.PushConfig.At"
+ + "tributesEntry\022<\n\noidc_token\030\003 \001(\0132&.goog"
+ + "le.pubsub.v1.PushConfig.OidcTokenH\000\0321\n\017A"
+ "ttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001"
- + "(\t:\0028\001\" \n\017GetTopicRequest\022\r\n\005topic\030\001 \001(\t"
- + "\"m\n\022UpdateTopicRequest\022&\n\005topic\030\001 \001(\0132\027."
- + "google.pubsub.v1.Topic\022/\n\013update_mask\030\002 "
- + "\001(\0132\032.google.protobuf.FieldMask\"R\n\016Publi"
- + "shRequest\022\r\n\005topic\030\001 \001(\t\0221\n\010messages\030\002 \003"
- + "(\0132\037.google.pubsub.v1.PubsubMessage\"&\n\017P"
- + "ublishResponse\022\023\n\013message_ids\030\001 \003(\t\"K\n\021L"
- + "istTopicsRequest\022\017\n\007project\030\001 \001(\t\022\021\n\tpag"
- + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"V\n\022List"
- + "TopicsResponse\022\'\n\006topics\030\001 \003(\0132\027.google."
- + "pubsub.v1.Topic\022\027\n\017next_page_token\030\002 \001(\t"
- + "\"U\n\035ListTopicSubscriptionsRequest\022\r\n\005top"
- + "ic\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke"
- + "n\030\003 \001(\t\"P\n\036ListTopicSubscriptionsRespons"
- + "e\022\025\n\rsubscriptions\030\001 \003(\t\022\027\n\017next_page_to"
- + "ken\030\002 \001(\t\"Q\n\031ListTopicSnapshotsRequest\022\r"
- + "\n\005topic\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage"
- + "_token\030\003 \001(\t\"H\n\032ListTopicSnapshotsRespon"
- + "se\022\021\n\tsnapshots\030\001 \003(\t\022\027\n\017next_page_token"
- + "\030\002 \001(\t\"#\n\022DeleteTopicRequest\022\r\n\005topic\030\001 "
- + "\001(\t\"\204\003\n\014Subscription\022\014\n\004name\030\001 \001(\t\022\r\n\005to"
- + "pic\030\002 \001(\t\0221\n\013push_config\030\004 \001(\0132\034.google."
- + "pubsub.v1.PushConfig\022\034\n\024ack_deadline_sec"
- + "onds\030\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001("
- + "\010\022=\n\032message_retention_duration\030\010 \001(\0132\031."
- + "google.protobuf.Duration\022:\n\006labels\030\t \003(\013"
- + "2*.google.pubsub.v1.Subscription.LabelsE"
- + "ntry\022=\n\021expiration_policy\030\013 \001(\0132\".google"
- + ".pubsub.v1.ExpirationPolicy\032-\n\013LabelsEnt"
- + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\":\n\020Ex"
- + "pirationPolicy\022&\n\003ttl\030\001 \001(\0132\031.google.pro"
- + "tobuf.Duration\"\255\002\n\nPushConfig\022\025\n\rpush_en"
- + "dpoint\030\001 \001(\t\022@\n\nattributes\030\002 \003(\0132,.googl"
- + "e.pubsub.v1.PushConfig.AttributesEntry\022<"
- + "\n\noidc_token\030\003 \001(\0132&.google.pubsub.v1.Pu"
- + "shConfig.OidcTokenH\000\0321\n\017AttributesEntry\022"
- + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032<\n\tOidcT"
- + "oken\022\035\n\025service_account_email\030\001 \001(\t\022\020\n\010a"
- + "udience\030\002 \001(\tB\027\n\025authentication_method\"S"
- + "\n\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007mes"
- + "sage\030\002 \001(\0132\037.google.pubsub.v1.PubsubMess"
- + "age\".\n\026GetSubscriptionRequest\022\024\n\014subscri"
- + "ption\030\001 \001(\t\"\202\001\n\031UpdateSubscriptionReques"
- + "t\0224\n\014subscription\030\001 \001(\0132\036.google.pubsub."
- + "v1.Subscription\022/\n\013update_mask\030\002 \001(\0132\032.g"
- + "oogle.protobuf.FieldMask\"R\n\030ListSubscrip"
- + "tionsRequest\022\017\n\007project\030\001 \001(\t\022\021\n\tpage_si"
- + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\031ListSubs"
- + "criptionsResponse\0225\n\rsubscriptions\030\001 \003(\013"
- + "2\036.google.pubsub.v1.Subscription\022\027\n\017next"
- + "_page_token\030\002 \001(\t\"1\n\031DeleteSubscriptionR"
- + "equest\022\024\n\014subscription\030\001 \001(\t\"b\n\027ModifyPu"
- + "shConfigRequest\022\024\n\014subscription\030\001 \001(\t\0221\n"
- + "\013push_config\030\002 \001(\0132\034.google.pubsub.v1.Pu"
- + "shConfig\"U\n\013PullRequest\022\024\n\014subscription\030"
- + "\001 \001(\t\022\032\n\022return_immediately\030\002 \001(\010\022\024\n\014max"
- + "_messages\030\003 \001(\005\"L\n\014PullResponse\022<\n\021recei"
- + "ved_messages\030\001 \003(\0132!.google.pubsub.v1.Re"
- + "ceivedMessage\"_\n\030ModifyAckDeadlineReques"
- + "t\022\024\n\014subscription\030\001 \001(\t\022\017\n\007ack_ids\030\004 \003(\t"
- + "\022\034\n\024ack_deadline_seconds\030\003 \001(\005\";\n\022Acknow"
- + "ledgeRequest\022\024\n\014subscription\030\001 \001(\t\022\017\n\007ac"
- + "k_ids\030\002 \003(\t\"\244\001\n\024StreamingPullRequest\022\024\n\014"
- + "subscription\030\001 \001(\t\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027m"
- + "odify_deadline_seconds\030\003 \003(\005\022\037\n\027modify_d"
- + "eadline_ack_ids\030\004 \003(\t\022#\n\033stream_ack_dead"
- + "line_seconds\030\005 \001(\005\"U\n\025StreamingPullRespo"
- + "nse\022<\n\021received_messages\030\001 \003(\0132!.google."
- + "pubsub.v1.ReceivedMessage\"\257\001\n\025CreateSnap"
- + "shotRequest\022\014\n\004name\030\001 \001(\t\022\024\n\014subscriptio"
- + "n\030\002 \001(\t\022C\n\006labels\030\003 \003(\01323.google.pubsub."
- + "v1.CreateSnapshotRequest.LabelsEntry\032-\n\013"
- + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:"
- + "\0028\001\"v\n\025UpdateSnapshotRequest\022,\n\010snapshot"
- + "\030\001 \001(\0132\032.google.pubsub.v1.Snapshot\022/\n\013up"
- + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM"
- + "ask\"\277\001\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022\r\n\005topic\030"
- + "\002 \001(\t\022/\n\013expire_time\030\003 \001(\0132\032.google.prot"
- + "obuf.Timestamp\0226\n\006labels\030\004 \003(\0132&.google."
- + "pubsub.v1.Snapshot.LabelsEntry\032-\n\013Labels"
- + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"&\n"
- + "\022GetSnapshotRequest\022\020\n\010snapshot\030\001 \001(\t\"N\n"
- + "\024ListSnapshotsRequest\022\017\n\007project\030\001 \001(\t\022\021"
- + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"_\n"
- + "\025ListSnapshotsResponse\022-\n\tsnapshots\030\001 \003("
- + "\0132\032.google.pubsub.v1.Snapshot\022\027\n\017next_pa"
- + "ge_token\030\002 \001(\t\")\n\025DeleteSnapshotRequest\022"
- + "\020\n\010snapshot\030\001 \001(\t\"m\n\013SeekRequest\022\024\n\014subs"
- + "cription\030\001 \001(\t\022*\n\004time\030\002 \001(\0132\032.google.pr"
- + "otobuf.TimestampH\000\022\022\n\010snapshot\030\003 \001(\tH\000B\010"
- + "\n\006target\"\016\n\014SeekResponse2\277\010\n\tPublisher\022j"
- + "\n\013CreateTopic\022\027.google.pubsub.v1.Topic\032\027"
- + ".google.pubsub.v1.Topic\")\202\323\344\223\002#\032\036/v1/{na"
- + "me=projects/*/topics/*}:\001*\022}\n\013UpdateTopi"
- + "c\022$.google.pubsub.v1.UpdateTopicRequest\032"
- + "\027.google.pubsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{t"
- + "opic.name=projects/*/topics/*}:\001*\022\202\001\n\007Pu"
- + "blish\022 .google.pubsub.v1.PublishRequest\032"
- + "!.google.pubsub.v1.PublishResponse\"2\202\323\344\223"
- + "\002,\"\'/v1/{topic=projects/*/topics/*}:publ"
- + "ish:\001*\022o\n\010GetTopic\022!.google.pubsub.v1.Ge"
- + "tTopicRequest\032\027.google.pubsub.v1.Topic\"\'"
- + "\202\323\344\223\002!\022\037/v1/{topic=projects/*/topics/*}\022"
- + "\200\001\n\nListTopics\022#.google.pubsub.v1.ListTo"
- + "picsRequest\032$.google.pubsub.v1.ListTopic"
- + "sResponse\"\'\202\323\344\223\002!\022\037/v1/{project=projects"
- + "/*}/topics\022\262\001\n\026ListTopicSubscriptions\022/."
- + "google.pubsub.v1.ListTopicSubscriptionsR"
- + "equest\0320.google.pubsub.v1.ListTopicSubsc"
- + "riptionsResponse\"5\202\323\344\223\002/\022-/v1/{topic=pro"
- + "jects/*/topics/*}/subscriptions\022\242\001\n\022List"
- + "TopicSnapshots\022+.google.pubsub.v1.ListTo"
- + "picSnapshotsRequest\032,.google.pubsub.v1.L"
- + "istTopicSnapshotsResponse\"1\202\323\344\223\002+\022)/v1/{"
- + "topic=projects/*/topics/*}/snapshots\022t\n\013"
- + "DeleteTopic\022$.google.pubsub.v1.DeleteTop"
- + "icRequest\032\026.google.protobuf.Empty\"\'\202\323\344\223\002"
- + "!*\037/v1/{topic=projects/*/topics/*}2\371\021\n\nS"
- + "ubscriber\022\206\001\n\022CreateSubscription\022\036.googl"
- + "e.pubsub.v1.Subscription\032\036.google.pubsub"
- + ".v1.Subscription\"0\202\323\344\223\002*\032%/v1/{name=proj"
- + "ects/*/subscriptions/*}:\001*\022\222\001\n\017GetSubscr"
- + "iption\022(.google.pubsub.v1.GetSubscriptio"
- + "nRequest\032\036.google.pubsub.v1.Subscription"
- + "\"5\202\323\344\223\002/\022-/v1/{subscription=projects/*/s"
- + "ubscriptions/*}\022\240\001\n\022UpdateSubscription\022+"
- + ".google.pubsub.v1.UpdateSubscriptionRequ"
- + "est\032\036.google.pubsub.v1.Subscription\"=\202\323\344"
- + "\223\002722/v1/{subscription.name=projects/*/s"
- + "ubscriptions/*}:\001*\022\234\001\n\021ListSubscriptions"
- + "\022*.google.pubsub.v1.ListSubscriptionsReq"
- + "uest\032+.google.pubsub.v1.ListSubscription"
- + "sResponse\".\202\323\344\223\002(\022&/v1/{project=projects"
- + "/*}/subscriptions\022\220\001\n\022DeleteSubscription"
- + "\022+.google.pubsub.v1.DeleteSubscriptionRe"
- + "quest\032\026.google.protobuf.Empty\"5\202\323\344\223\002/*-/"
+ + "(\t:\0028\001\032<\n\tOidcToken\022\035\n\025service_account_e"
+ + "mail\030\001 \001(\t\022\020\n\010audience\030\002 \001(\tB\027\n\025authenti"
+ + "cation_method\"S\n\017ReceivedMessage\022\016\n\006ack_"
+ + "id\030\001 \001(\t\0220\n\007message\030\002 \001(\0132\037.google.pubsu"
+ + "b.v1.PubsubMessage\".\n\026GetSubscriptionReq"
+ + "uest\022\024\n\014subscription\030\001 \001(\t\"\202\001\n\031UpdateSub"
+ + "scriptionRequest\0224\n\014subscription\030\001 \001(\0132\036"
+ + ".google.pubsub.v1.Subscription\022/\n\013update"
+ + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\""
+ + "R\n\030ListSubscriptionsRequest\022\017\n\007project\030\001"
+ + " \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 "
+ + "\001(\t\"k\n\031ListSubscriptionsResponse\0225\n\rsubs"
+ + "criptions\030\001 \003(\0132\036.google.pubsub.v1.Subsc"
+ + "ription\022\027\n\017next_page_token\030\002 \001(\t\"1\n\031Dele"
+ + "teSubscriptionRequest\022\024\n\014subscription\030\001 "
+ + "\001(\t\"b\n\027ModifyPushConfigRequest\022\024\n\014subscr"
+ + "iption\030\001 \001(\t\0221\n\013push_config\030\002 \001(\0132\034.goog"
+ + "le.pubsub.v1.PushConfig\"U\n\013PullRequest\022\024"
+ + "\n\014subscription\030\001 \001(\t\022\032\n\022return_immediate"
+ + "ly\030\002 \001(\010\022\024\n\014max_messages\030\003 \001(\005\"L\n\014PullRe"
+ + "sponse\022<\n\021received_messages\030\001 \003(\0132!.goog"
+ + "le.pubsub.v1.ReceivedMessage\"_\n\030ModifyAc"
+ + "kDeadlineRequest\022\024\n\014subscription\030\001 \001(\t\022\017"
+ + "\n\007ack_ids\030\004 \003(\t\022\034\n\024ack_deadline_seconds\030"
+ + "\003 \001(\005\";\n\022AcknowledgeRequest\022\024\n\014subscript"
+ + "ion\030\001 \001(\t\022\017\n\007ack_ids\030\002 \003(\t\"\244\001\n\024Streaming"
+ + "PullRequest\022\024\n\014subscription\030\001 \001(\t\022\017\n\007ack"
+ + "_ids\030\002 \003(\t\022\037\n\027modify_deadline_seconds\030\003 "
+ + "\003(\005\022\037\n\027modify_deadline_ack_ids\030\004 \003(\t\022#\n\033"
+ + "stream_ack_deadline_seconds\030\005 \001(\005\"U\n\025Str"
+ + "eamingPullResponse\022<\n\021received_messages\030"
+ + "\001 \003(\0132!.google.pubsub.v1.ReceivedMessage"
+ + "\"\257\001\n\025CreateSnapshotRequest\022\014\n\004name\030\001 \001(\t"
+ + "\022\024\n\014subscription\030\002 \001(\t\022C\n\006labels\030\003 \003(\01323"
+ + ".google.pubsub.v1.CreateSnapshotRequest."
+ + "LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022"
+ + "\r\n\005value\030\002 \001(\t:\0028\001\"v\n\025UpdateSnapshotRequ"
+ + "est\022,\n\010snapshot\030\001 \001(\0132\032.google.pubsub.v1"
+ + ".Snapshot\022/\n\013update_mask\030\002 \001(\0132\032.google."
+ + "protobuf.FieldMask\"\277\001\n\010Snapshot\022\014\n\004name\030"
+ + "\001 \001(\t\022\r\n\005topic\030\002 \001(\t\022/\n\013expire_time\030\003 \001("
+ + "\0132\032.google.protobuf.Timestamp\0226\n\006labels\030"
+ + "\004 \003(\0132&.google.pubsub.v1.Snapshot.Labels"
+ + "Entry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val"
+ + "ue\030\002 \001(\t:\0028\001\"&\n\022GetSnapshotRequest\022\020\n\010sn"
+ + "apshot\030\001 \001(\t\"N\n\024ListSnapshotsRequest\022\017\n\007"
+ + "project\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage"
+ + "_token\030\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n"
+ + "\tsnapshots\030\001 \003(\0132\032.google.pubsub.v1.Snap"
+ + "shot\022\027\n\017next_page_token\030\002 \001(\t\")\n\025DeleteS"
+ + "napshotRequest\022\020\n\010snapshot\030\001 \001(\t\"m\n\013Seek"
+ + "Request\022\024\n\014subscription\030\001 \001(\t\022*\n\004time\030\002 "
+ + "\001(\0132\032.google.protobuf.TimestampH\000\022\022\n\010sna"
+ + "pshot\030\003 \001(\tH\000B\010\n\006target\"\016\n\014SeekResponse2"
+ + "\277\010\n\tPublisher\022j\n\013CreateTopic\022\027.google.pu"
+ + "bsub.v1.Topic\032\027.google.pubsub.v1.Topic\")"
+ + "\202\323\344\223\002#\032\036/v1/{name=projects/*/topics/*}:\001"
+ + "*\022}\n\013UpdateTopic\022$.google.pubsub.v1.Upda"
+ + "teTopicRequest\032\027.google.pubsub.v1.Topic\""
+ + "/\202\323\344\223\002)2$/v1/{topic.name=projects/*/topi"
+ + "cs/*}:\001*\022\202\001\n\007Publish\022 .google.pubsub.v1."
+ + "PublishRequest\032!.google.pubsub.v1.Publis"
+ + "hResponse\"2\202\323\344\223\002,\"\'/v1/{topic=projects/*"
+ + "/topics/*}:publish:\001*\022o\n\010GetTopic\022!.goog"
+ + "le.pubsub.v1.GetTopicRequest\032\027.google.pu"
+ + "bsub.v1.Topic\"\'\202\323\344\223\002!\022\037/v1/{topic=projec"
+ + "ts/*/topics/*}\022\200\001\n\nListTopics\022#.google.p"
+ + "ubsub.v1.ListTopicsRequest\032$.google.pubs"
+ + "ub.v1.ListTopicsResponse\"\'\202\323\344\223\002!\022\037/v1/{p"
+ + "roject=projects/*}/topics\022\262\001\n\026ListTopicS"
+ + "ubscriptions\022/.google.pubsub.v1.ListTopi"
+ + "cSubscriptionsRequest\0320.google.pubsub.v1"
+ + ".ListTopicSubscriptionsResponse\"5\202\323\344\223\002/\022"
+ + "-/v1/{topic=projects/*/topics/*}/subscri"
+ + "ptions\022\242\001\n\022ListTopicSnapshots\022+.google.p"
+ + "ubsub.v1.ListTopicSnapshotsRequest\032,.goo"
+ + "gle.pubsub.v1.ListTopicSnapshotsResponse"
+ + "\"1\202\323\344\223\002+\022)/v1/{topic=projects/*/topics/*"
+ + "}/snapshots\022t\n\013DeleteTopic\022$.google.pubs"
+ + "ub.v1.DeleteTopicRequest\032\026.google.protob"
+ + "uf.Empty\"\'\202\323\344\223\002!*\037/v1/{topic=projects/*/"
+ + "topics/*}2\371\021\n\nSubscriber\022\206\001\n\022CreateSubsc"
+ + "ription\022\036.google.pubsub.v1.Subscription\032"
+ + "\036.google.pubsub.v1.Subscription\"0\202\323\344\223\002*\032"
+ + "%/v1/{name=projects/*/subscriptions/*}:\001"
+ + "*\022\222\001\n\017GetSubscription\022(.google.pubsub.v1"
+ + ".GetSubscriptionRequest\032\036.google.pubsub."
+ + "v1.Subscription\"5\202\323\344\223\002/\022-/v1/{subscripti"
+ + "on=projects/*/subscriptions/*}\022\240\001\n\022Updat"
+ + "eSubscription\022+.google.pubsub.v1.UpdateS"
+ + "ubscriptionRequest\032\036.google.pubsub.v1.Su"
+ + "bscription\"=\202\323\344\223\002722/v1/{subscription.na"
+ + "me=projects/*/subscriptions/*}:\001*\022\234\001\n\021Li"
+ + "stSubscriptions\022*.google.pubsub.v1.ListS"
+ + "ubscriptionsRequest\032+.google.pubsub.v1.L"
+ + "istSubscriptionsResponse\".\202\323\344\223\002(\022&/v1/{p"
+ + "roject=projects/*}/subscriptions\022\220\001\n\022Del"
+ + "eteSubscription\022+.google.pubsub.v1.Delet"
+ + "eSubscriptionRequest\032\026.google.protobuf.E"
+ + "mpty\"5\202\323\344\223\002/*-/v1/{subscription=projects"
+ + "/*/subscriptions/*}\022\243\001\n\021ModifyAckDeadlin"
+ + "e\022*.google.pubsub.v1.ModifyAckDeadlineRe"
+ + "quest\032\026.google.protobuf.Empty\"J\202\323\344\223\002D\"?/"
+ "v1/{subscription=projects/*/subscription"
- + "s/*}\022\243\001\n\021ModifyAckDeadline\022*.google.pubs"
- + "ub.v1.ModifyAckDeadlineRequest\032\026.google."
- + "protobuf.Empty\"J\202\323\344\223\002D\"?/v1/{subscriptio"
- + "n=projects/*/subscriptions/*}:modifyAckD"
- + "eadline:\001*\022\221\001\n\013Acknowledge\022$.google.pubs"
- + "ub.v1.AcknowledgeRequest\032\026.google.protob"
- + "uf.Empty\"D\202\323\344\223\002>\"9/v1/{subscription=proj"
- + "ects/*/subscriptions/*}:acknowledge:\001*\022\204"
- + "\001\n\004Pull\022\035.google.pubsub.v1.PullRequest\032\036"
- + ".google.pubsub.v1.PullResponse\"=\202\323\344\223\0027\"2"
- + "/v1/{subscription=projects/*/subscriptio"
- + "ns/*}:pull:\001*\022f\n\rStreamingPull\022&.google."
- + "pubsub.v1.StreamingPullRequest\032\'.google."
- + "pubsub.v1.StreamingPullResponse\"\000(\0010\001\022\240\001"
- + "\n\020ModifyPushConfig\022).google.pubsub.v1.Mo"
- + "difyPushConfigRequest\032\026.google.protobuf."
- + "Empty\"I\202\323\344\223\002C\">/v1/{subscription=project"
- + "s/*/subscriptions/*}:modifyPushConfig:\001*"
- + "\022~\n\013GetSnapshot\022$.google.pubsub.v1.GetSn"
- + "apshotRequest\032\032.google.pubsub.v1.Snapsho"
- + "t\"-\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/snap"
- + "shots/*}\022\214\001\n\rListSnapshots\022&.google.pubs"
- + "ub.v1.ListSnapshotsRequest\032\'.google.pubs"
- + "ub.v1.ListSnapshotsResponse\"*\202\323\344\223\002$\022\"/v1"
- + "/{project=projects/*}/snapshots\022\203\001\n\016Crea"
- + "teSnapshot\022\'.google.pubsub.v1.CreateSnap"
- + "shotRequest\032\032.google.pubsub.v1.Snapshot\""
- + ",\202\323\344\223\002&\032!/v1/{name=projects/*/snapshots/"
- + "*}:\001*\022\214\001\n\016UpdateSnapshot\022\'.google.pubsub"
- + ".v1.UpdateSnapshotRequest\032\032.google.pubsu"
- + "b.v1.Snapshot\"5\202\323\344\223\002/2*/v1/{snapshot.nam"
- + "e=projects/*/snapshots/*}:\001*\022\200\001\n\016DeleteS"
- + "napshot\022\'.google.pubsub.v1.DeleteSnapsho"
- + "tRequest\032\026.google.protobuf.Empty\"-\202\323\344\223\002\'"
- + "*%/v1/{snapshot=projects/*/snapshots/*}\022"
- + "\204\001\n\004Seek\022\035.google.pubsub.v1.SeekRequest\032"
- + "\036.google.pubsub.v1.SeekResponse\"=\202\323\344\223\0027\""
- + "2/v1/{subscription=projects/*/subscripti"
- + "ons/*}:seek:\001*B\256\001\n\024com.google.pubsub.v1B"
- + "\013PubsubProtoP\001Z6google.golang.org/genpro"
- + "to/googleapis/pubsub/v1;pubsub\370\001\001\252\002\026Goog"
- + "le.Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub"
- + "\\V1\352\002\031Google::Cloud::PubSub::V1b\006proto3"
+ + "s/*}:modifyAckDeadline:\001*\022\221\001\n\013Acknowledg"
+ + "e\022$.google.pubsub.v1.AcknowledgeRequest\032"
+ + "\026.google.protobuf.Empty\"D\202\323\344\223\002>\"9/v1/{su"
+ + "bscription=projects/*/subscriptions/*}:a"
+ + "cknowledge:\001*\022\204\001\n\004Pull\022\035.google.pubsub.v"
+ + "1.PullRequest\032\036.google.pubsub.v1.PullRes"
+ + "ponse\"=\202\323\344\223\0027\"2/v1/{subscription=project"
+ + "s/*/subscriptions/*}:pull:\001*\022f\n\rStreamin"
+ + "gPull\022&.google.pubsub.v1.StreamingPullRe"
+ + "quest\032\'.google.pubsub.v1.StreamingPullRe"
+ + "sponse\"\000(\0010\001\022\240\001\n\020ModifyPushConfig\022).goog"
+ + "le.pubsub.v1.ModifyPushConfigRequest\032\026.g"
+ + "oogle.protobuf.Empty\"I\202\323\344\223\002C\">/v1/{subsc"
+ + "ription=projects/*/subscriptions/*}:modi"
+ + "fyPushConfig:\001*\022~\n\013GetSnapshot\022$.google."
+ + "pubsub.v1.GetSnapshotRequest\032\032.google.pu"
+ + "bsub.v1.Snapshot\"-\202\323\344\223\002\'\022%/v1/{snapshot="
+ + "projects/*/snapshots/*}\022\214\001\n\rListSnapshot"
+ + "s\022&.google.pubsub.v1.ListSnapshotsReques"
+ + "t\032\'.google.pubsub.v1.ListSnapshotsRespon"
+ + "se\"*\202\323\344\223\002$\022\"/v1/{project=projects/*}/sna"
+ + "pshots\022\203\001\n\016CreateSnapshot\022\'.google.pubsu"
+ + "b.v1.CreateSnapshotRequest\032\032.google.pubs"
+ + "ub.v1.Snapshot\",\202\323\344\223\002&\032!/v1/{name=projec"
+ + "ts/*/snapshots/*}:\001*\022\214\001\n\016UpdateSnapshot\022"
+ + "\'.google.pubsub.v1.UpdateSnapshotRequest"
+ + "\032\032.google.pubsub.v1.Snapshot\"5\202\323\344\223\002/2*/v"
+ + "1/{snapshot.name=projects/*/snapshots/*}"
+ + ":\001*\022\200\001\n\016DeleteSnapshot\022\'.google.pubsub.v"
+ + "1.DeleteSnapshotRequest\032\026.google.protobu"
+ + "f.Empty\"-\202\323\344\223\002\'*%/v1/{snapshot=projects/"
+ + "*/snapshots/*}\022\204\001\n\004Seek\022\035.google.pubsub."
+ + "v1.SeekRequest\032\036.google.pubsub.v1.SeekRe"
+ + "sponse\"=\202\323\344\223\0027\"2/v1/{subscription=projec"
+ + "ts/*/subscriptions/*}:seek:\001*B\256\001\n\024com.go"
+ + "ogle.pubsub.v1B\013PubsubProtoP\001Z6google.go"
+ + "lang.org/genproto/googleapis/pubsub/v1;p"
+ + "ubsub\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Goog"
+ + "le\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::PubS"
+ + "ub::V1b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -450,7 +452,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_pubsub_v1_PubsubMessage_descriptor,
new java.lang.String[] {
- "Data", "Attributes", "MessageId", "PublishTime",
+ "Data", "Attributes", "MessageId", "PublishTime", "OrderingKey",
});
internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor =
internal_static_google_pubsub_v1_PubsubMessage_descriptor.getNestedTypes().get(0);
@@ -561,6 +563,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
"RetainAckedMessages",
"MessageRetentionDuration",
"Labels",
+ "EnableMessageOrdering",
"ExpirationPolicy",
});
internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor =
diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
index 8bde436d8da5..f5a07cb1b551 100644
--- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
+++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
@@ -27,6 +27,7 @@ private Subscription() {
topic_ = "";
ackDeadlineSeconds_ = 0;
retainAckedMessages_ = false;
+ enableMessageOrdering_ = false;
}
@java.lang.Override
@@ -120,6 +121,11 @@ private Subscription(
labels_.getMutableMap().put(labels__.getKey(), labels__.getValue());
break;
}
+ case 80:
+ {
+ enableMessageOrdering_ = input.readBool();
+ break;
+ }
case 90:
{
com.google.pubsub.v1.ExpirationPolicy.Builder subBuilder = null;
@@ -547,6 +553,27 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) {
return map.get(key);
}
+ public static final int ENABLE_MESSAGE_ORDERING_FIELD_NUMBER = 10;
+ private boolean 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. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
bool enable_message_ordering = 10;
+ */
+ public boolean getEnableMessageOrdering() {
+ return enableMessageOrdering_;
+ }
+
public static final int EXPIRATION_POLICY_FIELD_NUMBER = 11;
private com.google.pubsub.v1.ExpirationPolicy expirationPolicy_;
/**
@@ -646,6 +673,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9);
+ if (enableMessageOrdering_ != false) {
+ output.writeBool(10, enableMessageOrdering_);
+ }
if (expirationPolicy_ != null) {
output.writeMessage(11, getExpirationPolicy());
}
@@ -688,6 +718,9 @@ public int getSerializedSize() {
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__);
}
+ if (enableMessageOrdering_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, enableMessageOrdering_);
+ }
if (expirationPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpirationPolicy());
}
@@ -720,6 +753,7 @@ public boolean equals(final java.lang.Object obj) {
result = result && getMessageRetentionDuration().equals(other.getMessageRetentionDuration());
}
result = result && internalGetLabels().equals(other.internalGetLabels());
+ result = result && (getEnableMessageOrdering() == other.getEnableMessageOrdering());
result = result && (hasExpirationPolicy() == other.hasExpirationPolicy());
if (hasExpirationPolicy()) {
result = result && getExpirationPolicy().equals(other.getExpirationPolicy());
@@ -755,6 +789,8 @@ public int hashCode() {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
+ hash = (37 * hash) + ENABLE_MESSAGE_ORDERING_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableMessageOrdering());
if (hasExpirationPolicy()) {
hash = (37 * hash) + EXPIRATION_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getExpirationPolicy().hashCode();
@@ -944,6 +980,8 @@ public Builder clear() {
messageRetentionDurationBuilder_ = null;
}
internalGetMutableLabels().clear();
+ enableMessageOrdering_ = false;
+
if (expirationPolicyBuilder_ == null) {
expirationPolicy_ = null;
} else {
@@ -994,6 +1032,7 @@ public com.google.pubsub.v1.Subscription buildPartial() {
}
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
+ result.enableMessageOrdering_ = enableMessageOrdering_;
if (expirationPolicyBuilder_ == null) {
result.expirationPolicy_ = expirationPolicy_;
} else {
@@ -1070,6 +1109,9 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) {
mergeMessageRetentionDuration(other.getMessageRetentionDuration());
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
+ if (other.getEnableMessageOrdering() != false) {
+ setEnableMessageOrdering(other.getEnableMessageOrdering());
+ }
if (other.hasExpirationPolicy()) {
mergeExpirationPolicy(other.getExpirationPolicy());
}
@@ -2110,6 +2152,68 @@ public Builder putAllLabels(java.util.Map+ * 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. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
bool enable_message_ordering = 10;
+ */
+ public boolean getEnableMessageOrdering() {
+ return 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. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
bool enable_message_ordering = 10;
+ */
+ public Builder setEnableMessageOrdering(boolean value) {
+
+ enableMessageOrdering_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
bool enable_message_ordering = 10;
+ */
+ public Builder clearEnableMessageOrdering() {
+
+ enableMessageOrdering_ = false;
+ onChanged();
+ return this;
+ }
+
private com.google.pubsub.v1.ExpirationPolicy expirationPolicy_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.pubsub.v1.ExpirationPolicy,
diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java
index 03eace1dd4a4..37f2292758d1 100644
--- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java
@@ -265,6 +265,23 @@ public interface SubscriptionOrBuilder
*/
java.lang.String getLabelsOrThrow(java.lang.String key);
+ /**
+ *
+ *
+ * + * 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. + * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This + * API might be changed in backward-incompatible ways and is not recommended + * for production use. It is not subject to any SLA or deprecation policy. + *+ * + *
bool enable_message_ordering = 10;
+ */
+ boolean getEnableMessageOrdering();
+
/**
*
*
diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
index 9d79638f8fd6..715af9c18c46 100644
--- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
+++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
@@ -406,6 +406,15 @@ message PubsubMessage {
// it receives the `Publish` call. It must not be populated by the
// publisher in a `Publish` call.
google.protobuf.Timestamp publish_time = 4;
+
+ // Identifies related messages for which publish order should be respected.
+ // If a `Subscription` has `enable_message_ordering` set to `true`, messages
+ // published with the same `ordering_key` value will be delivered to
+ // subscribers in the order in which they are received by the Pub/Sub system.
+ // EXPERIMENTAL: This feature is part of a closed alpha release. This
+ // API might be changed in backward-incompatible ways and is not recommended
+ // for production use. It is not subject to any SLA or deprecation policy.
+ string ordering_key = 5;
}
// Request for the GetTopic method.
@@ -607,6 +616,15 @@ message Subscription {
// managing labels.
map