getAttributesMap() {
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -270,7 +273,8 @@ public java.lang.String getAttributesOrDefault(
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -394,10 +398,12 @@ public 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
@@ -422,10 +428,12 @@ public 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
@@ -959,7 +967,8 @@ public int getAttributesCount() {
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -979,7 +988,8 @@ public java.util.Map getAttributes() {
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -991,7 +1001,8 @@ public java.util.Map getAttributesMap() {
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -1008,7 +1019,8 @@ public java.lang.String getAttributesOrDefault(
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -1032,7 +1044,8 @@ public Builder clearAttributes() {
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -1053,7 +1066,8 @@ public java.util.Map getMutableAttributes()
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -1072,7 +1086,8 @@ public Builder putAttributes(java.lang.String key, java.lang.String value) {
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -1411,10 +1426,12 @@ public 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
@@ -1439,10 +1456,12 @@ public 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
@@ -1467,10 +1486,12 @@ public com.google.protobuf.ByteString getOrderingKeyBytes() {
*
*
*
- * 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
@@ -1494,10 +1515,12 @@ public Builder setOrderingKey(java.lang.String value) {
*
*
*
- * 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
@@ -1517,10 +1540,12 @@ public Builder clearOrderingKey() {
*
*
*
- * 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java
index 93531bfbd..027b63e7d 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java
@@ -41,7 +41,8 @@ public interface PubsubMessageOrBuilder
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -51,7 +52,8 @@ public interface PubsubMessageOrBuilder
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -64,7 +66,8 @@ public interface PubsubMessageOrBuilder
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -74,7 +77,8 @@ public interface PubsubMessageOrBuilder
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -84,7 +88,8 @@ public interface PubsubMessageOrBuilder
*
*
*
- * Optional attributes for this message.
+ * Attributes for this message. If this field is empty, the message must
+ * contain non-empty data.
*
*
* map<string, string> attributes = 2;
@@ -167,10 +172,12 @@ public interface PubsubMessageOrBuilder
*
*
*
- * 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
@@ -185,10 +192,12 @@ public interface PubsubMessageOrBuilder
*
*
*
- * 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.
+ * If non-empty, 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 non-empty `ordering_key` value will be
+ * delivered to subscribers in the order in which they are received by the
+ * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ * must specify the same `ordering_key` value.
* <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.
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
index ba9c69e6a..929f6ad56 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
@@ -310,130 +310,130 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ription\030\001 \001(\t\022\017\n\007ack_ids\030\004 \003(\t\022\034\n\024ack_de"
+ "adline_seconds\030\003 \001(\005\";\n\022AcknowledgeReque"
+ "st\022\024\n\014subscription\030\001 \001(\t\022\017\n\007ack_ids\030\002 \003("
- + "\t\"\244\001\n\024StreamingPullRequest\022\024\n\014subscripti"
+ + "\t\"\267\001\n\024StreamingPullRequest\022\024\n\014subscripti"
+ "on\030\001 \001(\t\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027modify_dead"
+ "line_seconds\030\003 \003(\005\022\037\n\027modify_deadline_ac"
+ "k_ids\030\004 \003(\t\022#\n\033stream_ack_deadline_secon"
- + "ds\030\005 \001(\005\"U\n\025StreamingPullResponse\022<\n\021rec"
- + "eived_messages\030\001 \003(\0132!.google.pubsub.v1."
- + "ReceivedMessage\"\257\001\n\025CreateSnapshotReques"
- + "t\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.CreateS"
- + "napshotRequest.LabelsEntry\032-\n\013LabelsEntr"
- + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"v\n\025Upd"
- + "ateSnapshotRequest\022,\n\010snapshot\030\001 \001(\0132\032.g"
- + "oogle.pubsub.v1.Snapshot\022/\n\013update_mask\030"
- + "\002 \001(\0132\032.google.protobuf.FieldMask\"\277\001\n\010Sn"
- + "apshot\022\014\n\004name\030\001 \001(\t\022\r\n\005topic\030\002 \001(\t\022/\n\013e"
- + "xpire_time\030\003 \001(\0132\032.google.protobuf.Times"
- + "tamp\0226\n\006labels\030\004 \003(\0132&.google.pubsub.v1."
- + "Snapshot.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003k"
- + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"&\n\022GetSnapsh"
- + "otRequest\022\020\n\010snapshot\030\001 \001(\t\"N\n\024ListSnaps"
- + "hotsRequest\022\017\n\007project\030\001 \001(\t\022\021\n\tpage_siz"
- + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"_\n\025ListSnaps"
- + "hotsResponse\022-\n\tsnapshots\030\001 \003(\0132\032.google"
- + ".pubsub.v1.Snapshot\022\027\n\017next_page_token\030\002"
- + " \001(\t\")\n\025DeleteSnapshotRequest\022\020\n\010snapsho"
- + "t\030\001 \001(\t\"m\n\013SeekRequest\022\024\n\014subscription\030\001"
- + " \001(\t\022*\n\004time\030\002 \001(\0132\032.google.protobuf.Tim"
- + "estampH\000\022\022\n\010snapshot\030\003 \001(\tH\000B\010\n\006target\"\016"
- + "\n\014SeekResponse2\261\t\n\tPublisher\022j\n\013CreateTo"
- + "pic\022\027.google.pubsub.v1.Topic\032\027.google.pu"
- + "bsub.v1.Topic\")\202\323\344\223\002#\032\036/v1/{name=project"
- + "s/*/topics/*}:\001*\022}\n\013UpdateTopic\022$.google"
- + ".pubsub.v1.UpdateTopicRequest\032\027.google.p"
- + "ubsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{topic.name="
- + "projects/*/topics/*}:\001*\022\202\001\n\007Publish\022 .go"
- + "ogle.pubsub.v1.PublishRequest\032!.google.p"
- + "ubsub.v1.PublishResponse\"2\202\323\344\223\002,\"\'/v1/{t"
- + "opic=projects/*/topics/*}:publish:\001*\022o\n\010"
- + "GetTopic\022!.google.pubsub.v1.GetTopicRequ"
- + "est\032\027.google.pubsub.v1.Topic\"\'\202\323\344\223\002!\022\037/v"
- + "1/{topic=projects/*/topics/*}\022\200\001\n\nListTo"
- + "pics\022#.google.pubsub.v1.ListTopicsReques"
- + "t\032$.google.pubsub.v1.ListTopicsResponse\""
- + "\'\202\323\344\223\002!\022\037/v1/{project=projects/*}/topics"
- + "\022\262\001\n\026ListTopicSubscriptions\022/.google.pub"
- + "sub.v1.ListTopicSubscriptionsRequest\0320.g"
- + "oogle.pubsub.v1.ListTopicSubscriptionsRe"
- + "sponse\"5\202\323\344\223\002/\022-/v1/{topic=projects/*/to"
- + "pics/*}/subscriptions\022\242\001\n\022ListTopicSnaps"
- + "hots\022+.google.pubsub.v1.ListTopicSnapsho"
- + "tsRequest\032,.google.pubsub.v1.ListTopicSn"
- + "apshotsResponse\"1\202\323\344\223\002+\022)/v1/{topic=proj"
- + "ects/*/topics/*}/snapshots\022t\n\013DeleteTopi"
- + "c\022$.google.pubsub.v1.DeleteTopicRequest\032"
- + "\026.google.protobuf.Empty\"\'\202\323\344\223\002!*\037/v1/{to"
- + "pic=projects/*/topics/*}\032p\312A\025pubsub.goog"
- + "leapis.com\322AUhttps://www.googleapis.com/"
- + "auth/cloud-platform,https://www.googleap"
- + "is.com/auth/pubsub2\353\022\n\nSubscriber\022\206\001\n\022Cr"
- + "eateSubscription\022\036.google.pubsub.v1.Subs"
- + "cription\032\036.google.pubsub.v1.Subscription"
- + "\"0\202\323\344\223\002*\032%/v1/{name=projects/*/subscript"
- + "ions/*}:\001*\022\222\001\n\017GetSubscription\022(.google."
- + "pubsub.v1.GetSubscriptionRequest\032\036.googl"
- + "e.pubsub.v1.Subscription\"5\202\323\344\223\002/\022-/v1/{s"
- + "ubscription=projects/*/subscriptions/*}\022"
- + "\240\001\n\022UpdateSubscription\022+.google.pubsub.v"
- + "1.UpdateSubscriptionRequest\032\036.google.pub"
- + "sub.v1.Subscription\"=\202\323\344\223\002722/v1/{subscr"
- + "iption.name=projects/*/subscriptions/*}:"
- + "\001*\022\234\001\n\021ListSubscriptions\022*.google.pubsub"
- + ".v1.ListSubscriptionsRequest\032+.google.pu"
- + "bsub.v1.ListSubscriptionsResponse\".\202\323\344\223\002"
- + "(\022&/v1/{project=projects/*}/subscription"
- + "s\022\220\001\n\022DeleteSubscription\022+.google.pubsub"
- + ".v1.DeleteSubscriptionRequest\032\026.google.p"
- + "rotobuf.Empty\"5\202\323\344\223\002/*-/v1/{subscription"
- + "=projects/*/subscriptions/*}\022\243\001\n\021ModifyA"
- + "ckDeadline\022*.google.pubsub.v1.ModifyAckD"
- + "eadlineRequest\032\026.google.protobuf.Empty\"J"
- + "\202\323\344\223\002D\"?/v1/{subscription=projects/*/sub"
- + "scriptions/*}:modifyAckDeadline:\001*\022\221\001\n\013A"
- + "cknowledge\022$.google.pubsub.v1.Acknowledg"
- + "eRequest\032\026.google.protobuf.Empty\"D\202\323\344\223\002>"
- + "\"9/v1/{subscription=projects/*/subscript"
- + "ions/*}:acknowledge:\001*\022\204\001\n\004Pull\022\035.google"
- + ".pubsub.v1.PullRequest\032\036.google.pubsub.v"
- + "1.PullResponse\"=\202\323\344\223\0027\"2/v1/{subscriptio"
- + "n=projects/*/subscriptions/*}:pull:\001*\022f\n"
- + "\rStreamingPull\022&.google.pubsub.v1.Stream"
- + "ingPullRequest\032\'.google.pubsub.v1.Stream"
- + "ingPullResponse\"\000(\0010\001\022\240\001\n\020ModifyPushConf"
- + "ig\022).google.pubsub.v1.ModifyPushConfigRe"
- + "quest\032\026.google.protobuf.Empty\"I\202\323\344\223\002C\">/"
- + "v1/{subscription=projects/*/subscription"
- + "s/*}:modifyPushConfig:\001*\022~\n\013GetSnapshot\022"
- + "$.google.pubsub.v1.GetSnapshotRequest\032\032."
- + "google.pubsub.v1.Snapshot\"-\202\323\344\223\002\'\022%/v1/{"
- + "snapshot=projects/*/snapshots/*}\022\214\001\n\rLis"
- + "tSnapshots\022&.google.pubsub.v1.ListSnapsh"
- + "otsRequest\032\'.google.pubsub.v1.ListSnapsh"
- + "otsResponse\"*\202\323\344\223\002$\022\"/v1/{project=projec"
- + "ts/*}/snapshots\022\203\001\n\016CreateSnapshot\022\'.goo"
- + "gle.pubsub.v1.CreateSnapshotRequest\032\032.go"
- + "ogle.pubsub.v1.Snapshot\",\202\323\344\223\002&\032!/v1/{na"
- + "me=projects/*/snapshots/*}:\001*\022\214\001\n\016Update"
- + "Snapshot\022\'.google.pubsub.v1.UpdateSnapsh"
- + "otRequest\032\032.google.pubsub.v1.Snapshot\"5\202"
- + "\323\344\223\002/2*/v1/{snapshot.name=projects/*/sna"
- + "pshots/*}:\001*\022\200\001\n\016DeleteSnapshot\022\'.google"
- + ".pubsub.v1.DeleteSnapshotRequest\032\026.googl"
- + "e.protobuf.Empty\"-\202\323\344\223\002\'*%/v1/{snapshot="
- + "projects/*/snapshots/*}\022\204\001\n\004Seek\022\035.googl"
- + "e.pubsub.v1.SeekRequest\032\036.google.pubsub."
- + "v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subscripti"
- + "on=projects/*/subscriptions/*}:seek:\001*\032p"
- + "\312A\025pubsub.googleapis.com\322AUhttps://www.g"
- + "oogleapis.com/auth/cloud-platform,https:"
- + "//www.googleapis.com/auth/pubsubB\256\001\n\024com"
- + ".google.pubsub.v1B\013PubsubProtoP\001Z6google"
- + ".golang.org/genproto/googleapis/pubsub/v"
- + "1;pubsub\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026G"
- + "oogle\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::P"
- + "ubSub::V1b\006proto3"
+ + "ds\030\005 \001(\005\022\021\n\tclient_id\030\006 \001(\t\"U\n\025Streaming"
+ + "PullResponse\022<\n\021received_messages\030\001 \003(\0132"
+ + "!.google.pubsub.v1.ReceivedMessage\"\257\001\n\025C"
+ + "reateSnapshotRequest\022\014\n\004name\030\001 \001(\t\022\024\n\014su"
+ + "bscription\030\002 \001(\t\022C\n\006labels\030\003 \003(\01323.googl"
+ + "e.pubsub.v1.CreateSnapshotRequest.Labels"
+ + "Entry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val"
+ + "ue\030\002 \001(\t:\0028\001\"v\n\025UpdateSnapshotRequest\022,\n"
+ + "\010snapshot\030\001 \001(\0132\032.google.pubsub.v1.Snaps"
+ + "hot\022/\n\013update_mask\030\002 \001(\0132\032.google.protob"
+ + "uf.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.go"
+ + "ogle.protobuf.Timestamp\0226\n\006labels\030\004 \003(\0132"
+ + "&.google.pubsub.v1.Snapshot.LabelsEntry\032"
+ + "-\n\013LabelsEntry\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\007projec"
+ + "t\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\tsnaps"
+ + "hots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027"
+ + "\n\017next_page_token\030\002 \001(\t\")\n\025DeleteSnapsho"
+ + "tRequest\022\020\n\010snapshot\030\001 \001(\t\"m\n\013SeekReques"
+ + "t\022\024\n\014subscription\030\001 \001(\t\022*\n\004time\030\002 \001(\0132\032."
+ + "google.protobuf.TimestampH\000\022\022\n\010snapshot\030"
+ + "\003 \001(\tH\000B\010\n\006target\"\016\n\014SeekResponse2\261\t\n\tPu"
+ + "blisher\022j\n\013CreateTopic\022\027.google.pubsub.v"
+ + "1.Topic\032\027.google.pubsub.v1.Topic\")\202\323\344\223\002#"
+ + "\032\036/v1/{name=projects/*/topics/*}:\001*\022}\n\013U"
+ + "pdateTopic\022$.google.pubsub.v1.UpdateTopi"
+ + "cRequest\032\027.google.pubsub.v1.Topic\"/\202\323\344\223\002"
+ + ")2$/v1/{topic.name=projects/*/topics/*}:"
+ + "\001*\022\202\001\n\007Publish\022 .google.pubsub.v1.Publis"
+ + "hRequest\032!.google.pubsub.v1.PublishRespo"
+ + "nse\"2\202\323\344\223\002,\"\'/v1/{topic=projects/*/topic"
+ + "s/*}:publish:\001*\022o\n\010GetTopic\022!.google.pub"
+ + "sub.v1.GetTopicRequest\032\027.google.pubsub.v"
+ + "1.Topic\"\'\202\323\344\223\002!\022\037/v1/{topic=projects/*/t"
+ + "opics/*}\022\200\001\n\nListTopics\022#.google.pubsub."
+ + "v1.ListTopicsRequest\032$.google.pubsub.v1."
+ + "ListTopicsResponse\"\'\202\323\344\223\002!\022\037/v1/{project"
+ + "=projects/*}/topics\022\262\001\n\026ListTopicSubscri"
+ + "ptions\022/.google.pubsub.v1.ListTopicSubsc"
+ + "riptionsRequest\0320.google.pubsub.v1.ListT"
+ + "opicSubscriptionsResponse\"5\202\323\344\223\002/\022-/v1/{"
+ + "topic=projects/*/topics/*}/subscriptions"
+ + "\022\242\001\n\022ListTopicSnapshots\022+.google.pubsub."
+ + "v1.ListTopicSnapshotsRequest\032,.google.pu"
+ + "bsub.v1.ListTopicSnapshotsResponse\"1\202\323\344\223"
+ + "\002+\022)/v1/{topic=projects/*/topics/*}/snap"
+ + "shots\022t\n\013DeleteTopic\022$.google.pubsub.v1."
+ + "DeleteTopicRequest\032\026.google.protobuf.Emp"
+ + "ty\"\'\202\323\344\223\002!*\037/v1/{topic=projects/*/topics"
+ + "/*}\032p\312A\025pubsub.googleapis.com\322AUhttps://"
+ + "www.googleapis.com/auth/cloud-platform,h"
+ + "ttps://www.googleapis.com/auth/pubsub2\353\022"
+ + "\n\nSubscriber\022\206\001\n\022CreateSubscription\022\036.go"
+ + "ogle.pubsub.v1.Subscription\032\036.google.pub"
+ + "sub.v1.Subscription\"0\202\323\344\223\002*\032%/v1/{name=p"
+ + "rojects/*/subscriptions/*}:\001*\022\222\001\n\017GetSub"
+ + "scription\022(.google.pubsub.v1.GetSubscrip"
+ + "tionRequest\032\036.google.pubsub.v1.Subscript"
+ + "ion\"5\202\323\344\223\002/\022-/v1/{subscription=projects/"
+ + "*/subscriptions/*}\022\240\001\n\022UpdateSubscriptio"
+ + "n\022+.google.pubsub.v1.UpdateSubscriptionR"
+ + "equest\032\036.google.pubsub.v1.Subscription\"="
+ + "\202\323\344\223\002722/v1/{subscription.name=projects/"
+ + "*/subscriptions/*}:\001*\022\234\001\n\021ListSubscripti"
+ + "ons\022*.google.pubsub.v1.ListSubscriptions"
+ + "Request\032+.google.pubsub.v1.ListSubscript"
+ + "ionsResponse\".\202\323\344\223\002(\022&/v1/{project=proje"
+ + "cts/*}/subscriptions\022\220\001\n\022DeleteSubscript"
+ + "ion\022+.google.pubsub.v1.DeleteSubscriptio"
+ + "nRequest\032\026.google.protobuf.Empty\"5\202\323\344\223\002/"
+ + "*-/v1/{subscription=projects/*/subscript"
+ + "ions/*}\022\243\001\n\021ModifyAckDeadline\022*.google.p"
+ + "ubsub.v1.ModifyAckDeadlineRequest\032\026.goog"
+ + "le.protobuf.Empty\"J\202\323\344\223\002D\"?/v1/{subscrip"
+ + "tion=projects/*/subscriptions/*}:modifyA"
+ + "ckDeadline:\001*\022\221\001\n\013Acknowledge\022$.google.p"
+ + "ubsub.v1.AcknowledgeRequest\032\026.google.pro"
+ + "tobuf.Empty\"D\202\323\344\223\002>\"9/v1/{subscription=p"
+ + "rojects/*/subscriptions/*}:acknowledge:\001"
+ + "*\022\204\001\n\004Pull\022\035.google.pubsub.v1.PullReques"
+ + "t\032\036.google.pubsub.v1.PullResponse\"=\202\323\344\223\002"
+ + "7\"2/v1/{subscription=projects/*/subscrip"
+ + "tions/*}:pull:\001*\022f\n\rStreamingPull\022&.goog"
+ + "le.pubsub.v1.StreamingPullRequest\032\'.goog"
+ + "le.pubsub.v1.StreamingPullResponse\"\000(\0010\001"
+ + "\022\240\001\n\020ModifyPushConfig\022).google.pubsub.v1"
+ + ".ModifyPushConfigRequest\032\026.google.protob"
+ + "uf.Empty\"I\202\323\344\223\002C\">/v1/{subscription=proj"
+ + "ects/*/subscriptions/*}:modifyPushConfig"
+ + ":\001*\022~\n\013GetSnapshot\022$.google.pubsub.v1.Ge"
+ + "tSnapshotRequest\032\032.google.pubsub.v1.Snap"
+ + "shot\"-\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/s"
+ + "napshots/*}\022\214\001\n\rListSnapshots\022&.google.p"
+ + "ubsub.v1.ListSnapshotsRequest\032\'.google.p"
+ + "ubsub.v1.ListSnapshotsResponse\"*\202\323\344\223\002$\022\""
+ + "/v1/{project=projects/*}/snapshots\022\203\001\n\016C"
+ + "reateSnapshot\022\'.google.pubsub.v1.CreateS"
+ + "napshotRequest\032\032.google.pubsub.v1.Snapsh"
+ + "ot\",\202\323\344\223\002&\032!/v1/{name=projects/*/snapsho"
+ + "ts/*}:\001*\022\214\001\n\016UpdateSnapshot\022\'.google.pub"
+ + "sub.v1.UpdateSnapshotRequest\032\032.google.pu"
+ + "bsub.v1.Snapshot\"5\202\323\344\223\002/2*/v1/{snapshot."
+ + "name=projects/*/snapshots/*}:\001*\022\200\001\n\016Dele"
+ + "teSnapshot\022\'.google.pubsub.v1.DeleteSnap"
+ + "shotRequest\032\026.google.protobuf.Empty\"-\202\323\344"
+ + "\223\002\'*%/v1/{snapshot=projects/*/snapshots/"
+ + "*}\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekReque"
+ + "st\032\036.google.pubsub.v1.SeekResponse\"=\202\323\344\223"
+ + "\0027\"2/v1/{subscription=projects/*/subscri"
+ + "ptions/*}:seek:\001*\032p\312A\025pubsub.googleapis."
+ + "com\322AUhttps://www.googleapis.com/auth/cl"
+ + "oud-platform,https://www.googleapis.com/"
+ + "auth/pubsubB\256\001\n\024com.google.pubsub.v1B\013Pu"
+ + "bsubProtoP\001Z6google.golang.org/genproto/"
+ + "googleapis/pubsub/v1;pubsub\370\001\001\252\002\026Google."
+ + "Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1"
+ + "\352\002\031Google::Cloud::PubSub::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -737,6 +737,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"ModifyDeadlineSeconds",
"ModifyDeadlineAckIds",
"StreamAckDeadlineSeconds",
+ "ClientId",
});
internal_static_google_pubsub_v1_StreamingPullResponse_descriptor =
getDescriptor().getMessageTypes().get(30);
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java
index b2cacde5d..480253f70 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java
@@ -44,6 +44,7 @@ private StreamingPullRequest() {
ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
modifyDeadlineSeconds_ = emptyIntList();
modifyDeadlineAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ clientId_ = "";
}
@java.lang.Override
@@ -131,6 +132,13 @@ private StreamingPullRequest(
streamAckDeadlineSeconds_ = input.readInt32();
break;
}
+ case 50:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ clientId_ = s;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -479,6 +487,63 @@ public int getStreamAckDeadlineSeconds() {
return streamAckDeadlineSeconds_;
}
+ public static final int CLIENT_ID_FIELD_NUMBER = 6;
+ private volatile java.lang.Object clientId_;
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @return The clientId.
+ */
+ public java.lang.String getClientId() {
+ java.lang.Object ref = clientId_;
+ 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();
+ clientId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @return The bytes for clientId.
+ */
+ public com.google.protobuf.ByteString getClientIdBytes() {
+ java.lang.Object ref = clientId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ clientId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -514,6 +579,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (streamAckDeadlineSeconds_ != 0) {
output.writeInt32(5, streamAckDeadlineSeconds_);
}
+ if (!getClientIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, clientId_);
+ }
unknownFields.writeTo(output);
}
@@ -559,6 +627,9 @@ public int getSerializedSize() {
if (streamAckDeadlineSeconds_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, streamAckDeadlineSeconds_);
}
+ if (!getClientIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, clientId_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -580,6 +651,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getModifyDeadlineSecondsList().equals(other.getModifyDeadlineSecondsList())) return false;
if (!getModifyDeadlineAckIdsList().equals(other.getModifyDeadlineAckIdsList())) return false;
if (getStreamAckDeadlineSeconds() != other.getStreamAckDeadlineSeconds()) return false;
+ if (!getClientId().equals(other.getClientId())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -607,6 +679,8 @@ public int hashCode() {
}
hash = (37 * hash) + STREAM_ACK_DEADLINE_SECONDS_FIELD_NUMBER;
hash = (53 * hash) + getStreamAckDeadlineSeconds();
+ hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getClientId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -764,6 +838,8 @@ public Builder clear() {
bitField0_ = (bitField0_ & ~0x00000004);
streamAckDeadlineSeconds_ = 0;
+ clientId_ = "";
+
return this;
}
@@ -809,6 +885,7 @@ public com.google.pubsub.v1.StreamingPullRequest buildPartial() {
}
result.modifyDeadlineAckIds_ = modifyDeadlineAckIds_;
result.streamAckDeadlineSeconds_ = streamAckDeadlineSeconds_;
+ result.clientId_ = clientId_;
onBuilt();
return result;
}
@@ -895,6 +972,10 @@ public Builder mergeFrom(com.google.pubsub.v1.StreamingPullRequest other) {
if (other.getStreamAckDeadlineSeconds() != 0) {
setStreamAckDeadlineSeconds(other.getStreamAckDeadlineSeconds());
}
+ if (!other.getClientId().isEmpty()) {
+ clientId_ = other.clientId_;
+ onChanged();
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1712,6 +1793,137 @@ public Builder clearStreamAckDeadlineSeconds() {
return this;
}
+ private java.lang.Object clientId_ = "";
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @return The clientId.
+ */
+ public java.lang.String getClientId() {
+ java.lang.Object ref = clientId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clientId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @return The bytes for clientId.
+ */
+ public com.google.protobuf.ByteString getClientIdBytes() {
+ java.lang.Object ref = clientId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ clientId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @param value The clientId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClientId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ clientId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearClientId() {
+
+ clientId_ = getDefaultInstance().getClientId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @param value The bytes for clientId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClientIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ clientId_ = value;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java
index 1da8cde95..e9315a90f 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java
@@ -271,4 +271,39 @@ public interface StreamingPullRequestOrBuilder
* @return The streamAckDeadlineSeconds.
*/
int getStreamAckDeadlineSeconds();
+
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @return The clientId.
+ */
+ java.lang.String getClientId();
+ /**
+ *
+ *
+ *
+ * A unique identifier that is used to distinguish client instances from each
+ * other. Only needs to be provided on the initial request. When a stream
+ * disconnects and reconnects for the same stream, the client_id should be set
+ * to the same value so that state associated with the old stream can be
+ * transferred to the new stream. The same client_id should not be used for
+ * different client instances.
+ *
+ *
+ * string client_id = 6;
+ *
+ * @return The bytes for clientId.
+ */
+ com.google.protobuf.ByteString getClientIdBytes();
}
diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
index 3ad6355a8..da3801dfe 100644
--- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
+++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
@@ -164,7 +164,8 @@ message PubsubMessage {
// at least one attribute.
bytes data = 1;
- // Optional attributes for this message.
+ // Attributes for this message. If this field is empty, the message must
+ // contain non-empty data.
map attributes = 2;
// ID of this message, assigned by the server when the message is published.
@@ -178,10 +179,12 @@ message PubsubMessage {
// 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.
+ // If non-empty, 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 non-empty `ordering_key` value will be
+ // delivered to subscribers in the order in which they are received by the
+ // Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
+ // must specify the same `ordering_key` value.
// 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.
@@ -922,6 +925,14 @@ message StreamingPullRequest {
// requests from client to server. The minimum deadline you can specify is 10
// seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
int32 stream_ack_deadline_seconds = 5;
+
+ // A unique identifier that is used to distinguish client instances from each
+ // other. Only needs to be provided on the initial request. When a stream
+ // disconnects and reconnects for the same stream, the client_id should be set
+ // to the same value so that state associated with the old stream can be
+ // transferred to the new stream. The same client_id should not be used for
+ // different client instances.
+ string client_id = 6;
}
// Response for the `StreamingPull` method. This response is used to stream
@@ -933,13 +944,12 @@ message StreamingPullResponse {
// Request for the `CreateSnapshot` method.
message CreateSnapshotRequest {
- // Optional user-provided name for this snapshot.
- // If the name is not provided in the request, the server will assign a random
- // name for this snapshot on the same project as the subscription.
- // Note that for REST API requests, you must specify a name. See the
- //
- // resource name rules.
- // Format is `projects/{project}/snapshots/{snap}`.
+ // User-provided name for this snapshot. If the name is not provided in the
+ // request, the server will assign a random name for this snapshot on the same
+ // project as the subscription. Note that for REST API requests, you must
+ // specify a name. See the resource
+ // name rules. Format is `projects/{project}/snapshots/{snap}`.
string name = 1;
// The subscription whose backlog the snapshot retains.
diff --git a/renovate.json b/renovate.json
index a5cdff45c..268a4669a 100644
--- a/renovate.json
+++ b/renovate.json
@@ -22,7 +22,8 @@
"^com.google.api:gax",
"^com.google.auth:",
"^com.google.cloud:google-cloud-core",
- "^io.grpc:"
+ "^io.grpc:",
+ "^com.google.guava:"
],
"groupName": "core dependencies"
},
diff --git a/synth.metadata b/synth.metadata
index 24abf49c4..ef179407b 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,20 +1,20 @@
{
- "updateTime": "2020-01-23T08:56:37.849196Z",
+ "updateTime": "2020-01-31T08:56:58.976767Z",
"sources": [
{
"generator": {
"name": "artman",
- "version": "0.44.1",
- "dockerImage": "googleapis/artman@sha256:5599b61e56a372d21b671969ee915fbca0f6c3a0daaeb898d01f8f685f1bbc8b"
+ "version": "0.44.4",
+ "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "8d16f76de065f530d395a4c7eabbf766d6a120fd",
- "internalRef": "291008516",
- "log": "8d16f76de065f530d395a4c7eabbf766d6a120fd\nGenerate Memcache v1beta2 API protos and gRPC ServiceConfig files\n\nPiperOrigin-RevId: 291008516\n\n3af1dabd93df9a9f17bf3624d3b875c11235360b\ngrafeas: Add containeranalysis default_host to Grafeas service\n\nPiperOrigin-RevId: 290965849\n\nbe2663fa95e31cba67d0cd62611a6674db9f74b7\nfix(google/maps/roads): add missing opening bracket\n\nPiperOrigin-RevId: 290964086\n\nfacc26550a0af0696e0534bc9cae9df14275aa7c\nUpdating v2 protos with the latest inline documentation (in comments) and adding a per-service .yaml file.\n\nPiperOrigin-RevId: 290952261\n\ncda99c1f7dc5e4ca9b1caeae1dc330838cbc1461\nChange api_name to 'asset' for v1p1beta1\n\nPiperOrigin-RevId: 290800639\n\n94e9e90c303a820ce40643d9129e7f0d2054e8a1\nAdds Google Maps Road service\n\nPiperOrigin-RevId: 290795667\n\na3b23dcb2eaecce98c600c7d009451bdec52dbda\nrpc: new message ErrorInfo, other comment updates\n\nPiperOrigin-RevId: 290781668\n\n26420ef4e46c37f193c0fbe53d6ebac481de460e\nAdd proto definition for Org Policy v1.\n\nPiperOrigin-RevId: 290771923\n\n7f0dab8177cf371ae019a082e2512de7ac102888\nPublish Routes Preferred API v1 service definitions.\n\nPiperOrigin-RevId: 290326986\n\nad6e508d0728e1d1bca6e3f328cd562718cb772d\nFix: Qualify resource type references with \"jobs.googleapis.com/\"\n\nPiperOrigin-RevId: 290285762\n\n58e770d568a2b78168ddc19a874178fee8265a9d\ncts client library\n\nPiperOrigin-RevId: 290146169\n\naf9daa4c3b4c4a8b7133b81588dd9ffd37270af2\nAdd more programming language options to public proto\n\nPiperOrigin-RevId: 290144091\n\nd9f2bbf2df301ef84641d4cec7c828736a0bd907\ntalent: add missing resource.proto dep to Bazel build target\n\nPiperOrigin-RevId: 290143164\n\n3b3968237451d027b42471cd28884a5a1faed6c7\nAnnotate Talent API.\nAdd gRPC service config for retry.\nUpdate bazel file with google.api.resource dependency.\n\nPiperOrigin-RevId: 290125172\n\n"
+ "sha": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7",
+ "internalRef": "292450564",
+ "log": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\ne26cab8afd19d396b929039dac5d874cf0b5336c\nexpr: add default_host and method_signature annotations to CelService\n\nPiperOrigin-RevId: 291240093\n\n06093ae3952441c34ec176d1f7431b8765cec0be\nirm: fix v1alpha2 bazel build by adding missing proto imports\n\nPiperOrigin-RevId: 291227940\n\na8a2514af326e4673063f9a3c9d0ef1091c87e6c\nAdd proto annotation for cloud/irm API\n\nPiperOrigin-RevId: 291217859\n\n"
}
},
{
@@ -36,658 +36,5 @@
"config": "google/pubsub/artman_pubsub.yaml"
}
}
- ],
- "newFiles": [
- {
- "path": ".github/ISSUE_TEMPLATE/bug_report.md"
- },
- {
- "path": ".github/ISSUE_TEMPLATE/feature_request.md"
- },
- {
- "path": ".github/ISSUE_TEMPLATE/support_request.md"
- },
- {
- "path": ".github/PULL_REQUEST_TEMPLATE.md"
- },
- {
- "path": ".github/release-please.yml"
- },
- {
- "path": ".gitignore"
- },
- {
- "path": ".kokoro/build.bat"
- },
- {
- "path": ".kokoro/build.sh"
- },
- {
- "path": ".kokoro/coerce_logs.sh"
- },
- {
- "path": ".kokoro/common.cfg"
- },
- {
- "path": ".kokoro/continuous/common.cfg"
- },
- {
- "path": ".kokoro/continuous/dependencies.cfg"
- },
- {
- "path": ".kokoro/continuous/integration.cfg"
- },
- {
- "path": ".kokoro/continuous/java11.cfg"
- },
- {
- "path": ".kokoro/continuous/java7.cfg"
- },
- {
- "path": ".kokoro/continuous/java8-osx.cfg"
- },
- {
- "path": ".kokoro/continuous/java8-win.cfg"
- },
- {
- "path": ".kokoro/continuous/java8.cfg"
- },
- {
- "path": ".kokoro/continuous/lint.cfg"
- },
- {
- "path": ".kokoro/continuous/propose_release.cfg"
- },
- {
- "path": ".kokoro/continuous/propose_release.sh"
- },
- {
- "path": ".kokoro/continuous/samples.cfg"
- },
- {
- "path": ".kokoro/dependencies.sh"
- },
- {
- "path": ".kokoro/linkage-monitor.sh"
- },
- {
- "path": ".kokoro/nightly/common.cfg"
- },
- {
- "path": ".kokoro/nightly/dependencies.cfg"
- },
- {
- "path": ".kokoro/nightly/integration.cfg"
- },
- {
- "path": ".kokoro/nightly/java11.cfg"
- },
- {
- "path": ".kokoro/nightly/java7.cfg"
- },
- {
- "path": ".kokoro/nightly/java8-osx.cfg"
- },
- {
- "path": ".kokoro/nightly/java8-win.cfg"
- },
- {
- "path": ".kokoro/nightly/java8.cfg"
- },
- {
- "path": ".kokoro/nightly/lint.cfg"
- },
- {
- "path": ".kokoro/nightly/samples.cfg"
- },
- {
- "path": ".kokoro/presubmit/clirr.cfg"
- },
- {
- "path": ".kokoro/presubmit/common.cfg"
- },
- {
- "path": ".kokoro/presubmit/dependencies.cfg"
- },
- {
- "path": ".kokoro/presubmit/integration.cfg"
- },
- {
- "path": ".kokoro/presubmit/java11.cfg"
- },
- {
- "path": ".kokoro/presubmit/java7.cfg"
- },
- {
- "path": ".kokoro/presubmit/java8-osx.cfg"
- },
- {
- "path": ".kokoro/presubmit/java8-win.cfg"
- },
- {
- "path": ".kokoro/presubmit/java8.cfg"
- },
- {
- "path": ".kokoro/presubmit/linkage-monitor.cfg"
- },
- {
- "path": ".kokoro/presubmit/lint.cfg"
- },
- {
- "path": ".kokoro/presubmit/samples.cfg"
- },
- {
- "path": ".kokoro/release/bump_snapshot.cfg"
- },
- {
- "path": ".kokoro/release/bump_snapshot.sh"
- },
- {
- "path": ".kokoro/release/common.cfg"
- },
- {
- "path": ".kokoro/release/common.sh"
- },
- {
- "path": ".kokoro/release/drop.cfg"
- },
- {
- "path": ".kokoro/release/drop.sh"
- },
- {
- "path": ".kokoro/release/promote.cfg"
- },
- {
- "path": ".kokoro/release/promote.sh"
- },
- {
- "path": ".kokoro/release/publish_javadoc.cfg"
- },
- {
- "path": ".kokoro/release/publish_javadoc.sh"
- },
- {
- "path": ".kokoro/release/snapshot.cfg"
- },
- {
- "path": ".kokoro/release/snapshot.sh"
- },
- {
- "path": ".kokoro/release/stage.cfg"
- },
- {
- "path": ".kokoro/release/stage.sh"
- },
- {
- "path": ".kokoro/trampoline.sh"
- },
- {
- "path": ".repo-metadata.json"
- },
- {
- "path": "CHANGELOG.md"
- },
- {
- "path": "CODE_OF_CONDUCT.md"
- },
- {
- "path": "CONTRIBUTING.md"
- },
- {
- "path": "LICENSE"
- },
- {
- "path": "README.md"
- },
- {
- "path": "codecov.yaml"
- },
- {
- "path": "google-cloud-pubsub-bom/pom.xml"
- },
- {
- "path": "google-cloud-pubsub/pom.xml"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumer.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageReceiver.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageWaiter.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/OpenCensusUtil.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberStats.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherCallableFactory.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberCallableFactory.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java"
- },
- {
- "path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeClock.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeSubscriberServiceImpl.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageWaiterTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicy.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicyImpl.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisher.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriber.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/OpenCensusUtilTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SequentialExecutorServiceTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StatusUtilTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java"
- },
- {
- "path": "google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminSmokeTest.java"
- },
- {
- "path": "grpc-google-cloud-pubsub-v1/pom.xml"
- },
- {
- "path": "grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java"
- },
- {
- "path": "grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java"
- },
- {
- "path": "java.header"
- },
- {
- "path": "license-checks.xml"
- },
- {
- "path": "pom.xml"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/clirr-ignored-differences.xml"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/pom.xml"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeletedTopic.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicyOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectSnapshotName.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectSubscriptionName.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicNames.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UntypedTopicName.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java"
- },
- {
- "path": "proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto"
- },
- {
- "path": "renovate.json"
- },
- {
- "path": "synth.metadata"
- },
- {
- "path": "synth.py"
- },
- {
- "path": "versions.txt"
- }
]
}
\ No newline at end of file
From 9bcc433e6d167f68256e0ede2a521296dcbc7412 Mon Sep 17 00:00:00 2001
From: hannahrogers-google
<52459909+hannahrogers-google@users.noreply.github.com>
Date: Fri, 31 Jan 2020 12:35:09 -0500
Subject: [PATCH 14/24] fix: shutdown grpc stubs properly when a subscriber is
stopped (#74)
* Modifying Publish example in README to match other examples given, and
fix issue #6784
* fix: Modifying Publish example in README to match other examples, and
fix Issue #11
* feat: Adding support for DLQs
Adding delivery attempt count to PubsubMessages as a message attribute,
and creating helper function to allow users to get the count without
knowing implementation details.
* Fix formatting
* fix: making changes requested in pull request
* fix: creating fix to not populate delivery attempt attribute when dead
lettering is not enabled
* Adding unit test for case in which a received message has no delivery attempt
* Making MessageWaiter class more generic to also be used for outstanding
ack operations
* Waiting for acks to complete before shutting down a streaming subscriber
connection
* Fixing formatting error
---
.../cloud/pubsub/v1/MessageDispatcher.java | 12 ++++-----
.../com/google/cloud/pubsub/v1/Publisher.java | 10 +++----
.../v1/StreamingSubscriberConnection.java | 10 ++++++-
.../google/cloud/pubsub/v1/Subscriber.java | 1 +
.../v1/{MessageWaiter.java => Waiter.java} | 27 ++++++++++---------
...MessageWaiterTest.java => WaiterTest.java} | 14 +++++-----
6 files changed, 43 insertions(+), 31 deletions(-)
rename google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/{MessageWaiter.java => Waiter.java} (68%)
rename google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/{MessageWaiterTest.java => WaiterTest.java} (80%)
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
index 56fa8a3a9..c3f1a46cd 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java
@@ -72,7 +72,7 @@ class MessageDispatcher {
private final AckProcessor ackProcessor;
private final FlowController flowController;
- private final MessageWaiter messagesWaiter;
+ private final Waiter messagesWaiter;
// Maps ID to "total expiration time". If it takes longer than this, stop extending.
private final ConcurrentMap pendingMessages = new ConcurrentHashMap<>();
@@ -145,7 +145,7 @@ private void forget() {
return;
}
flowController.release(1, outstandingBytes);
- messagesWaiter.incrementPendingMessages(-1);
+ messagesWaiter.incrementPendingCount(-1);
}
@Override
@@ -205,7 +205,7 @@ void sendAckOperations(
// 601 buckets of 1s resolution from 0s to MAX_ACK_DEADLINE_SECONDS
this.ackLatencyDistribution = ackLatencyDistribution;
jobLock = new ReentrantLock();
- messagesWaiter = new MessageWaiter();
+ messagesWaiter = new Waiter();
this.clock = clock;
this.sequentialExecutor = new SequentialExecutorService.AutoExecutor(executor);
}
@@ -268,7 +268,7 @@ public void run() {
}
void stop() {
- messagesWaiter.waitNoMessages();
+ messagesWaiter.waitComplete();
jobLock.lock();
try {
if (backgroundJob != null) {
@@ -331,9 +331,9 @@ void processReceivedMessages(List messages) {
}
private void processBatch(List batch) {
- messagesWaiter.incrementPendingMessages(batch.size());
+ messagesWaiter.incrementPendingCount(batch.size());
for (OutstandingMessage message : batch) {
- // This is a blocking flow controller. We have already incremented MessageWaiter, so
+ // This is a blocking flow controller. We have already incremented messagesWaiter, so
// shutdown will block on processing of all these messages anyway.
try {
flowController.reserve(1, message.receivedMessage.getMessage().getSerializedSize());
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
index 093590bb9..9af734db2 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
@@ -104,7 +104,7 @@ public class Publisher {
private final AtomicBoolean shutdown;
private final BackgroundResource backgroundResources;
- private final MessageWaiter messagesWaiter;
+ private final Waiter messagesWaiter;
private ScheduledFuture> currentAlarmFuture;
private final ApiFunction messageTransform;
@@ -173,7 +173,7 @@ private Publisher(Builder builder) throws IOException {
backgroundResourceList.add(publisherStub);
backgroundResources = new BackgroundResourceAggregation(backgroundResourceList);
shutdown = new AtomicBoolean(false);
- messagesWaiter = new MessageWaiter();
+ messagesWaiter = new Waiter();
}
/** Topic which the publisher publishes to. */
@@ -249,7 +249,7 @@ public ApiFuture publish(PubsubMessage message) {
messagesBatchLock.unlock();
}
- messagesWaiter.incrementPendingMessages(1);
+ messagesWaiter.incrementPendingCount(1);
// For messages without ordering keys, it is okay to send batches without holding
// messagesBatchLock.
@@ -423,7 +423,7 @@ public void onSuccess(PublishResponse result) {
}
}
} finally {
- messagesWaiter.incrementPendingMessages(-outstandingBatch.size());
+ messagesWaiter.incrementPendingCount(-outstandingBatch.size());
}
}
@@ -432,7 +432,7 @@ public void onFailure(Throwable t) {
try {
outstandingBatch.onFailure(t);
} finally {
- messagesWaiter.incrementPendingMessages(-outstandingBatch.size());
+ messagesWaiter.incrementPendingCount(-outstandingBatch.size());
}
}
};
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
index ef3ce23d6..45f7fb90c 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
@@ -72,6 +72,7 @@ final class StreamingSubscriberConnection extends AbstractApiService implements
private final AtomicLong channelReconnectBackoffMillis =
new AtomicLong(INITIAL_CHANNEL_RECONNECT_BACKOFF.toMillis());
+ private final Waiter ackOperationsWaiter = new Waiter();
private final Lock lock = new ReentrantLock();
private ClientStream clientStream;
@@ -116,6 +117,7 @@ protected void doStart() {
@Override
protected void doStop() {
messageDispatcher.stop();
+ ackOperationsWaiter.waitComplete();
lock.lock();
try {
@@ -273,16 +275,18 @@ public void sendAckOperations(
new ApiFutureCallback() {
@Override
public void onSuccess(Empty empty) {
- // noop
+ ackOperationsWaiter.incrementPendingCount(-1);
}
@Override
public void onFailure(Throwable t) {
+ ackOperationsWaiter.incrementPendingCount(-1);
Level level = isAlive() ? Level.WARNING : Level.FINER;
logger.log(level, "failed to send operations", t);
}
};
+ int pendingOperations = 0;
for (PendingModifyAckDeadline modack : ackDeadlineExtensions) {
for (List idChunk : Lists.partition(modack.ackIds, MAX_PER_REQUEST_CHANGES)) {
ApiFuture future =
@@ -294,6 +298,7 @@ public void onFailure(Throwable t) {
.setAckDeadlineSeconds(modack.deadlineExtensionSeconds)
.build());
ApiFutures.addCallback(future, loggingCallback, directExecutor());
+ pendingOperations++;
}
}
@@ -306,6 +311,9 @@ public void onFailure(Throwable t) {
.addAllAckIds(idChunk)
.build());
ApiFutures.addCallback(future, loggingCallback, directExecutor());
+ pendingOperations++;
}
+
+ ackOperationsWaiter.incrementPendingCount(pendingOperations);
}
}
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java
index 2deafb2e7..9c84dea0a 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java
@@ -305,6 +305,7 @@ public void run() {
// stop connection is no-op if connections haven't been started.
stopAllStreamingConnections();
shutdownBackgroundResources();
+ subStub.shutdownNow();
notifyStopped();
} catch (Exception e) {
notifyFailed(e);
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageWaiter.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java
similarity index 68%
rename from google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageWaiter.java
rename to google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java
index cb238f3d3..e22125fee 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageWaiter.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java
@@ -18,25 +18,28 @@
import com.google.api.core.InternalApi;
-/** A barrier kind of object that helps to keep track and synchronously wait on pending messages. */
-class MessageWaiter {
- private int pendingMessages;
+/**
+ * A barrier kind of object that helps keep track of pending actions and synchronously wait until
+ * all have completed.
+ */
+class Waiter {
+ private int pendingCount;
- MessageWaiter() {
- pendingMessages = 0;
+ Waiter() {
+ pendingCount = 0;
}
- public synchronized void incrementPendingMessages(int messages) {
- this.pendingMessages += messages;
- if (pendingMessages == 0) {
+ public synchronized void incrementPendingCount(int delta) {
+ this.pendingCount += delta;
+ if (pendingCount == 0) {
notifyAll();
}
}
- public synchronized void waitNoMessages() {
+ public synchronized void waitComplete() {
boolean interrupted = false;
try {
- while (pendingMessages > 0) {
+ while (pendingCount > 0) {
try {
wait();
} catch (InterruptedException e) {
@@ -52,7 +55,7 @@ public synchronized void waitNoMessages() {
}
@InternalApi
- public int pendingMessages() {
- return pendingMessages;
+ public int pendingCount() {
+ return pendingCount;
}
}
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageWaiterTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java
similarity index 80%
rename from google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageWaiterTest.java
rename to google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java
index 5f8e19875..ca8618378 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageWaiterTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java
@@ -22,14 +22,14 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Tests for {@link MessageWaiter}. */
+/** Tests for {@link Waiter}. */
@RunWith(JUnit4.class)
-public class MessageWaiterTest {
+public class WaiterTest {
@Test
public void test() throws Exception {
- final MessageWaiter waiter = new MessageWaiter();
- waiter.incrementPendingMessages(1);
+ final Waiter waiter = new Waiter();
+ waiter.incrementPendingCount(1);
final Thread mainThread = Thread.currentThread();
Thread t =
@@ -40,14 +40,14 @@ public void run() {
while (mainThread.getState() != Thread.State.WAITING) {
Thread.yield();
}
- waiter.incrementPendingMessages(-1);
+ waiter.incrementPendingCount(-1);
}
});
t.start();
- waiter.waitNoMessages();
+ waiter.waitComplete();
t.join();
- assertEquals(0, waiter.pendingMessages());
+ assertEquals(0, waiter.pendingCount());
}
}
From d0ab52576c729091b4cdc72b378a305e102ca180 Mon Sep 17 00:00:00 2001
From: hannahrogers-google
<52459909+hannahrogers-google@users.noreply.github.com>
Date: Fri, 31 Jan 2020 15:10:39 -0500
Subject: [PATCH 15/24] fix: ensure all publishes complete before shutting down
publisher (#76)
* Modifying Publish example in README to match other examples given, and
fix issue #6784
* fix: Modifying Publish example in README to match other examples, and
fix Issue #11
* feat: Adding support for DLQs
Adding delivery attempt count to PubsubMessages as a message attribute,
and creating helper function to allow users to get the count without
knowing implementation details.
* Fix formatting
* fix: making changes requested in pull request
* fix: creating fix to not populate delivery attempt attribute when dead
lettering is not enabled
* Adding unit test for case in which a received message has no delivery attempt
* Making MessageWaiter class more generic to also be used for outstanding
ack operations
* Waiting for acks to complete before shutting down a streaming subscriber
connection
* Fixing formatting error
* fix: making sure all publishes complete before shutting down the
publisher
---
.../com/google/cloud/pubsub/v1/Publisher.java | 1 +
.../cloud/pubsub/v1/PublisherImplTest.java | 31 +++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
index 9af734db2..e28427eea 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
@@ -527,6 +527,7 @@ public void shutdown() {
currentAlarmFuture.cancel(false);
}
publishAllOutstanding();
+ messagesWaiter.waitComplete();
backgroundResources.shutdown();
}
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java
index 08fdee7b6..b1109c8fc 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java
@@ -195,6 +195,37 @@ public void testSinglePublishByNumBytes() throws Exception {
publisher.awaitTermination(1, TimeUnit.MINUTES);
}
+ @Test
+ public void testPublishByShutdown() throws Exception {
+ Publisher publisher =
+ getTestPublisherBuilder()
+ .setBatchingSettings(
+ Publisher.Builder.DEFAULT_BATCHING_SETTINGS
+ .toBuilder()
+ .setDelayThreshold(Duration.ofSeconds(100))
+ .setElementCountThreshold(10L)
+ .build())
+ .build();
+
+ testPublisherServiceImpl.addPublishResponse(
+ PublishResponse.newBuilder().addMessageIds("1").addMessageIds("2"));
+
+ ApiFuture publishFuture1 = sendTestMessage(publisher, "A");
+ ApiFuture publishFuture2 = sendTestMessage(publisher, "B");
+
+ // Note we are not advancing time or reaching the count threshold but messages should
+ // still get published by call to shutdown
+
+ publisher.shutdown();
+ publisher.awaitTermination(1, TimeUnit.MINUTES);
+
+ // Verify the publishes completed
+ assertTrue(publishFuture1.isDone());
+ assertTrue(publishFuture2.isDone());
+ assertEquals("1", publishFuture1.get());
+ assertEquals("2", publishFuture2.get());
+ }
+
@Test
public void testPublishMixedSizeAndDuration() throws Exception {
Publisher publisher =
From 08e77d428aa50bb53ed7d5b922e76c2da18ed6d1 Mon Sep 17 00:00:00 2001
From: Kamal Aboul-Hosn
Date: Fri, 31 Jan 2020 15:48:52 -0500
Subject: [PATCH 16/24] feat: add randomly generated UUID to outgoing initial
streaming pull requests (#77)
* google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java
* Ensure that if a batch is started and the timeout completes before the currently outstanding message has finished publishing with an ordering key that the last batch does in fact get published.
* add back in unit test
* feat: add randomly generated UUID to outgoing initial streaming pull requests for better ordering keys affinity
---
.../cloud/pubsub/v1/StreamingSubscriberConnection.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
index 45f7fb90c..047e1ba75 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
@@ -45,6 +45,7 @@
import com.google.pubsub.v1.StreamingPullResponse;
import io.grpc.Status;
import java.util.List;
+import java.util.UUID;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
@@ -77,6 +78,13 @@ final class StreamingSubscriberConnection extends AbstractApiService implements
private final Lock lock = new ReentrantLock();
private ClientStream clientStream;
+ /**
+ * The same clientId is used across all streaming pull connections that are created. This is
+ * intentional, as it indicates to the server that any guarantees made for a stream that
+ * disconnected will be made for the stream that is created to replace it.
+ */
+ private final String clientId = UUID.randomUUID().toString();
+
public StreamingSubscriberConnection(
String subscription,
MessageReceiver receiver,
@@ -200,6 +208,7 @@ private void initialize() {
StreamingPullRequest.newBuilder()
.setSubscription(subscription)
.setStreamAckDeadlineSeconds(60)
+ .setClientId(clientId)
.build());
/**
From f96fd288fb23b30b800edb438680539481017fae Mon Sep 17 00:00:00 2001
From: Yoshi Automation Bot
Date: Mon, 3 Feb 2020 10:12:31 -0800
Subject: [PATCH 17/24] chore: linkage monitor check should skipp clirr and
enforcer
---
.kokoro/linkage-monitor.sh | 7 ++++++-
synth.metadata | 8 ++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh
index dc2025194..088ded29a 100755
--- a/.kokoro/linkage-monitor.sh
+++ b/.kokoro/linkage-monitor.sh
@@ -23,7 +23,12 @@ cd github/java-pubsub/
java -version
echo ${JOB_TYPE}
-mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V
+mvn install -B -V \
+ -DskipTests=true \
+ -Dclirr.skip=true \
+ -Denforcer.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dgcloud.download.skip=true
# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR
JAR=linkage-monitor-latest-all-deps.jar
diff --git a/synth.metadata b/synth.metadata
index ef179407b..70d71c796 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,5 +1,5 @@
{
- "updateTime": "2020-01-31T08:56:58.976767Z",
+ "updateTime": "2020-02-01T08:56:26.588207Z",
"sources": [
{
"generator": {
@@ -12,9 +12,9 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7",
- "internalRef": "292450564",
- "log": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\ne26cab8afd19d396b929039dac5d874cf0b5336c\nexpr: add default_host and method_signature annotations to CelService\n\nPiperOrigin-RevId: 291240093\n\n06093ae3952441c34ec176d1f7431b8765cec0be\nirm: fix v1alpha2 bazel build by adding missing proto imports\n\nPiperOrigin-RevId: 291227940\n\na8a2514af326e4673063f9a3c9d0ef1091c87e6c\nAdd proto annotation for cloud/irm API\n\nPiperOrigin-RevId: 291217859\n\n"
+ "sha": "b5cbe4a4ba64ab19e6627573ff52057a1657773d",
+ "internalRef": "292647187",
+ "log": "b5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n"
}
},
{
From 0188a8a550d3aeb2626e7398a2802bf1756240d7 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Mon, 3 Feb 2020 21:09:04 +0100
Subject: [PATCH 18/24] deps: update core dependencies (#56)
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 9ec29e6ea..85c3e0fdb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,11 +63,11 @@
UTF-8
github
google-cloud-pubsub-parent
- 1.92.1
+ 1.92.4
1.8.1
1.17.0
- 1.52.0
- 1.26.0
+ 1.53.1
+ 1.27.0
3.11.1
4.13
3.6
From 0f77732e751a83f61fe3b6a7e4b745003fc87474 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Tue, 4 Feb 2020 00:16:23 +0100
Subject: [PATCH 19/24] deps: update dependency
com.google.protobuf:protobuf-java to v3.11.3 (#79)
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 85c3e0fdb..939d2241a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,7 @@
1.17.0
1.53.1
1.27.0
- 3.11.1
+ 3.11.3
4.13
3.6
28.2-android
From 8bc23bc3b68a2c3a2a7caa1d9859dfdd1b56c47d Mon Sep 17 00:00:00 2001
From: Yoshi Automation Bot
Date: Mon, 10 Feb 2020 09:07:38 -0800
Subject: [PATCH 20/24] docs(regen): update sample code to set total timeout,
add API client header test
---
.../pubsub/v1/SubscriptionAdminSettings.java | 8 +-
.../cloud/pubsub/v1/TopicAdminSettings.java | 8 +-
.../pubsub/v1/stub/PublisherStubSettings.java | 8 +-
.../v1/stub/SubscriberStubSettings.java | 8 +-
.../v1/SubscriptionAdminClientTest.java | 180 ++++++++++++++++++
.../cloud/pubsub/v1/TopicAdminClientTest.java | 50 +++++
synth.metadata | 14 +-
7 files changed, 261 insertions(+), 15 deletions(-)
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java
index fbc3f6b87..32e5a6c5c 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java
@@ -83,8 +83,12 @@
*
* SubscriptionAdminSettings.Builder subscriptionAdminSettingsBuilder =
* SubscriptionAdminSettings.newBuilder();
- * subscriptionAdminSettingsBuilder.createSubscriptionSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
+ * subscriptionAdminSettingsBuilder
+ * .createSubscriptionSettings()
+ * .setRetrySettings(
+ * subscriptionAdminSettingsBuilder.createSubscriptionSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
* SubscriptionAdminSettings subscriptionAdminSettings = subscriptionAdminSettingsBuilder.build();
*
*
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java
index 994e40868..9b125b8cc 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java
@@ -72,8 +72,12 @@
*
* TopicAdminSettings.Builder topicAdminSettingsBuilder =
* TopicAdminSettings.newBuilder();
- * topicAdminSettingsBuilder.createTopicSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
+ * topicAdminSettingsBuilder
+ * .createTopicSettings()
+ * .setRetrySettings(
+ * topicAdminSettingsBuilder.createTopicSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
* TopicAdminSettings topicAdminSettings = topicAdminSettingsBuilder.build();
*
*
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java
index 840f8b942..d47225785 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java
@@ -96,8 +96,12 @@
*
* PublisherStubSettings.Builder topicAdminSettingsBuilder =
* PublisherStubSettings.newBuilder();
- * topicAdminSettingsBuilder.createTopicSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
+ * topicAdminSettingsBuilder
+ * .createTopicSettings()
+ * .setRetrySettings(
+ * topicAdminSettingsBuilder.createTopicSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
* PublisherStubSettings topicAdminSettings = topicAdminSettingsBuilder.build();
*
*
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java
index 1a488045f..1bb1e63c5 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java
@@ -98,8 +98,12 @@
*
* SubscriberStubSettings.Builder subscriptionAdminSettingsBuilder =
* SubscriberStubSettings.newBuilder();
- * subscriptionAdminSettingsBuilder.createSubscriptionSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
+ * subscriptionAdminSettingsBuilder
+ * .createSubscriptionSettings()
+ * .setRetrySettings(
+ * subscriptionAdminSettingsBuilder.createSubscriptionSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
* SubscriberStubSettings subscriptionAdminSettings = subscriptionAdminSettingsBuilder.build();
*
*
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
index dbb7c06cf..cd9367837 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
@@ -38,6 +38,8 @@
import com.google.protobuf.AbstractMessage;
import com.google.protobuf.ByteString;
import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import com.google.protobuf.Timestamp;
import com.google.pubsub.v1.AcknowledgeRequest;
import com.google.pubsub.v1.CreateSnapshotRequest;
import com.google.pubsub.v1.DeleteSnapshotRequest;
@@ -57,11 +59,15 @@
import com.google.pubsub.v1.PullResponse;
import com.google.pubsub.v1.PushConfig;
import com.google.pubsub.v1.ReceivedMessage;
+import com.google.pubsub.v1.SeekRequest;
+import com.google.pubsub.v1.SeekResponse;
import com.google.pubsub.v1.Snapshot;
import com.google.pubsub.v1.StreamingPullRequest;
import com.google.pubsub.v1.StreamingPullResponse;
import com.google.pubsub.v1.Subscription;
import com.google.pubsub.v1.TopicName;
+import com.google.pubsub.v1.UpdateSnapshotRequest;
+import com.google.pubsub.v1.UpdateSubscriptionRequest;
import io.grpc.Status;
import io.grpc.StatusRuntimeException;
import java.io.IOException;
@@ -234,6 +240,77 @@ public void getSubscriptionExceptionTest() throws Exception {
}
}
+ @Test
+ @SuppressWarnings("all")
+ public void updateSubscriptionTest() {
+ ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ TopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+ int ackDeadlineSeconds2 = 921632575;
+ boolean retainAckedMessages = false;
+ boolean enableMessageOrdering = true;
+ Subscription expectedResponse =
+ Subscription.newBuilder()
+ .setName(name.toString())
+ .setTopic(topic.toString())
+ .setAckDeadlineSeconds(ackDeadlineSeconds2)
+ .setRetainAckedMessages(retainAckedMessages)
+ .setEnableMessageOrdering(enableMessageOrdering)
+ .build();
+ mockSubscriber.addResponse(expectedResponse);
+
+ int ackDeadlineSeconds = 42;
+ Subscription subscription =
+ Subscription.newBuilder().setAckDeadlineSeconds(ackDeadlineSeconds).build();
+ String pathsElement = "ack_deadline_seconds";
+ List paths = Arrays.asList(pathsElement);
+ FieldMask updateMask = FieldMask.newBuilder().addAllPaths(paths).build();
+ UpdateSubscriptionRequest request =
+ UpdateSubscriptionRequest.newBuilder()
+ .setSubscription(subscription)
+ .setUpdateMask(updateMask)
+ .build();
+
+ Subscription actualResponse = client.updateSubscription(request);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockSubscriber.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ UpdateSubscriptionRequest actualRequest = (UpdateSubscriptionRequest) actualRequests.get(0);
+
+ Assert.assertEquals(subscription, actualRequest.getSubscription());
+ Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void updateSubscriptionExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockSubscriber.addException(exception);
+
+ try {
+ int ackDeadlineSeconds = 42;
+ Subscription subscription =
+ Subscription.newBuilder().setAckDeadlineSeconds(ackDeadlineSeconds).build();
+ String pathsElement = "ack_deadline_seconds";
+ List paths = Arrays.asList(pathsElement);
+ FieldMask updateMask = FieldMask.newBuilder().addAllPaths(paths).build();
+ UpdateSubscriptionRequest request =
+ UpdateSubscriptionRequest.newBuilder()
+ .setSubscription(subscription)
+ .setUpdateMask(updateMask)
+ .build();
+
+ client.updateSubscription(request);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
+
@Test
@SuppressWarnings("all")
public void listSubscriptionsTest() {
@@ -661,6 +738,65 @@ public void createSnapshotExceptionTest() throws Exception {
}
}
+ @Test
+ @SuppressWarnings("all")
+ public void updateSnapshotTest() {
+ ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+ Snapshot expectedResponse =
+ Snapshot.newBuilder().setName(name.toString()).setTopic(topic.toString()).build();
+ mockSubscriber.addResponse(expectedResponse);
+
+ long seconds = 123456L;
+ Timestamp expireTime = Timestamp.newBuilder().setSeconds(seconds).build();
+ Snapshot snapshot = Snapshot.newBuilder().setExpireTime(expireTime).build();
+ String pathsElement = "expire_time";
+ List paths = Arrays.asList(pathsElement);
+ FieldMask updateMask = FieldMask.newBuilder().addAllPaths(paths).build();
+ UpdateSnapshotRequest request =
+ UpdateSnapshotRequest.newBuilder().setSnapshot(snapshot).setUpdateMask(updateMask).build();
+
+ Snapshot actualResponse = client.updateSnapshot(request);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockSubscriber.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ UpdateSnapshotRequest actualRequest = (UpdateSnapshotRequest) actualRequests.get(0);
+
+ Assert.assertEquals(snapshot, actualRequest.getSnapshot());
+ Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void updateSnapshotExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockSubscriber.addException(exception);
+
+ try {
+ long seconds = 123456L;
+ Timestamp expireTime = Timestamp.newBuilder().setSeconds(seconds).build();
+ Snapshot snapshot = Snapshot.newBuilder().setExpireTime(expireTime).build();
+ String pathsElement = "expire_time";
+ List paths = Arrays.asList(pathsElement);
+ FieldMask updateMask = FieldMask.newBuilder().addAllPaths(paths).build();
+ UpdateSnapshotRequest request =
+ UpdateSnapshotRequest.newBuilder()
+ .setSnapshot(snapshot)
+ .setUpdateMask(updateMask)
+ .build();
+
+ client.updateSnapshot(request);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
+
@Test
@SuppressWarnings("all")
public void deleteSnapshotTest() {
@@ -698,6 +834,50 @@ public void deleteSnapshotExceptionTest() throws Exception {
}
}
+ @Test
+ @SuppressWarnings("all")
+ public void seekTest() {
+ SeekResponse expectedResponse = SeekResponse.newBuilder().build();
+ mockSubscriber.addResponse(expectedResponse);
+
+ ProjectSubscriptionName subscription =
+ ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ SeekRequest request = SeekRequest.newBuilder().setSubscription(subscription.toString()).build();
+
+ SeekResponse actualResponse = client.seek(request);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockSubscriber.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ SeekRequest actualRequest = (SeekRequest) actualRequests.get(0);
+
+ Assert.assertEquals(
+ subscription, ProjectSubscriptionName.parse(actualRequest.getSubscription()));
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void seekExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockSubscriber.addException(exception);
+
+ try {
+ ProjectSubscriptionName subscription =
+ ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ SeekRequest request =
+ SeekRequest.newBuilder().setSubscription(subscription.toString()).build();
+
+ client.seek(request);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
+
@Test
@SuppressWarnings("all")
public void setIamPolicyTest() {
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
index 390bec084..72d7bf86c 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
@@ -34,6 +34,7 @@
import com.google.protobuf.AbstractMessage;
import com.google.protobuf.ByteString;
import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
import com.google.pubsub.v1.DeleteTopicRequest;
import com.google.pubsub.v1.GetTopicRequest;
import com.google.pubsub.v1.ListTopicSubscriptionsRequest;
@@ -47,6 +48,7 @@
import com.google.pubsub.v1.PublishResponse;
import com.google.pubsub.v1.PubsubMessage;
import com.google.pubsub.v1.Topic;
+import com.google.pubsub.v1.UpdateTopicRequest;
import io.grpc.Status;
import io.grpc.StatusRuntimeException;
import java.io.IOException;
@@ -145,6 +147,54 @@ public void createTopicExceptionTest() throws Exception {
}
}
+ @Test
+ @SuppressWarnings("all")
+ public void updateTopicTest() {
+ ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+ String kmsKeyName = "kmsKeyName2094986649";
+ Topic expectedResponse =
+ Topic.newBuilder().setName(name.toString()).setKmsKeyName(kmsKeyName).build();
+ mockPublisher.addResponse(expectedResponse);
+
+ Topic topic = Topic.newBuilder().build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+ UpdateTopicRequest request =
+ UpdateTopicRequest.newBuilder().setTopic(topic).setUpdateMask(updateMask).build();
+
+ Topic actualResponse = client.updateTopic(request);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockPublisher.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ UpdateTopicRequest actualRequest = (UpdateTopicRequest) actualRequests.get(0);
+
+ Assert.assertEquals(topic, actualRequest.getTopic());
+ Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void updateTopicExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockPublisher.addException(exception);
+
+ try {
+ Topic topic = Topic.newBuilder().build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+ UpdateTopicRequest request =
+ UpdateTopicRequest.newBuilder().setTopic(topic).setUpdateMask(updateMask).build();
+
+ client.updateTopic(request);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
+
@Test
@SuppressWarnings("all")
public void publishTest() {
diff --git a/synth.metadata b/synth.metadata
index 70d71c796..89f33cfa5 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,27 +1,27 @@
{
- "updateTime": "2020-02-01T08:56:26.588207Z",
+ "updateTime": "2020-02-08T10:00:19.164940Z",
"sources": [
{
"generator": {
"name": "artman",
- "version": "0.44.4",
- "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8"
+ "version": "0.45.0",
+ "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "b5cbe4a4ba64ab19e6627573ff52057a1657773d",
- "internalRef": "292647187",
- "log": "b5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n"
+ "sha": "e7d8a694f4559201e6913f6610069cb08b39274e",
+ "internalRef": "293903652",
+ "log": "e7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\ne46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\n"
}
},
{
"template": {
"name": "java_library",
"origin": "synthtool.gcp",
- "version": "2019.10.17"
+ "version": "2020.2.4"
}
}
],
From c296febe426dc9453b050cb21bcb188a4d09ad50 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Tue, 11 Feb 2020 18:07:55 +0100
Subject: [PATCH 21/24] deps: update dependency
com.google.cloud:google-cloud-core to v1.92.5
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 939d2241a..538bde602 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,7 +63,7 @@
UTF-8
github
google-cloud-pubsub-parent
- 1.92.4
+ 1.92.5
1.8.1
1.17.0
1.53.1
From 20293d1c984f17759f5bed527c9a5b1f74d47dc4 Mon Sep 17 00:00:00 2001
From: Jeff Ching
Date: Tue, 11 Feb 2020 12:17:28 -0800
Subject: [PATCH 22/24] chore: only allow renovate-bot for trusted-contribution
auto-labeling (#84)
---
.github/trusted-contribution.yml | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 .github/trusted-contribution.yml
diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml
new file mode 100644
index 000000000..f247d5c78
--- /dev/null
+++ b/.github/trusted-contribution.yml
@@ -0,0 +1,2 @@
+trustedContributors:
+- renovate-bot
\ No newline at end of file
From d702a5caa2a1da7a160a449fd91681e38c034afc Mon Sep 17 00:00:00 2001
From: hannahrogers-google
<52459909+hannahrogers-google@users.noreply.github.com>
Date: Thu, 20 Feb 2020 17:16:03 -0500
Subject: [PATCH 23/24] fix: retry streaming subscriber connections on unknown
(#92)
* Retrying unknown errors
---
.../src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java
index ab31f0320..a7b8e1faa 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java
@@ -36,6 +36,7 @@ static boolean isRetryable(Throwable error) {
case CANCELLED:
case RESOURCE_EXHAUSTED:
case ABORTED:
+ case UNKNOWN:
return true;
case UNAVAILABLE:
// TODO(pongad): check that ApiException propagate message properly.
From db64eaa17abe907dc92b275976de4992a6c9051a Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Thu, 20 Feb 2020 17:43:31 -0500
Subject: [PATCH 24/24] chore: release 1.103.0 (#73)
* updated CHANGELOG.md [ci skip]
* updated README.md [ci skip]
* updated versions.txt [ci skip]
* updated grpc-google-cloud-pubsub-v1/pom.xml [ci skip]
* updated proto-google-cloud-pubsub-v1/pom.xml [ci skip]
* updated google-cloud-pubsub/pom.xml [ci skip]
* updated google-cloud-pubsub-bom/pom.xml [ci skip]
* updated pom.xml [ci skip]
---
CHANGELOG.md | 30 ++++++++++++++++++++++++++++
README.md | 6 +++---
google-cloud-pubsub-bom/pom.xml | 8 ++++----
google-cloud-pubsub/pom.xml | 4 ++--
grpc-google-cloud-pubsub-v1/pom.xml | 4 ++--
pom.xml | 8 ++++----
proto-google-cloud-pubsub-v1/pom.xml | 4 ++--
versions.txt | 6 +++---
8 files changed, 50 insertions(+), 20 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d9a61823..6ecfc27b6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,35 @@
# Changelog
+## [1.103.0](https://www.github.com/googleapis/java-pubsub/compare/v1.102.1...v1.103.0) (2020-02-20)
+
+
+### Features
+
+* add randomly generated UUID to outgoing initial streaming pull requests ([#77](https://www.github.com/googleapis/java-pubsub/issues/77)) ([08e77d4](https://www.github.com/googleapis/java-pubsub/commit/08e77d428aa50bb53ed7d5b922e76c2da18ed6d1))
+* adding support for dead letter queues ([#60](https://www.github.com/googleapis/java-pubsub/issues/60)) ([f3c93fa](https://www.github.com/googleapis/java-pubsub/commit/f3c93fa8bf0eb8ebda6eea6c6c6a60a36dc69af2))
+
+
+### Bug Fixes
+
+* ensure all publishes complete before shutting down publisher ([#76](https://www.github.com/googleapis/java-pubsub/issues/76)) ([d0ab525](https://www.github.com/googleapis/java-pubsub/commit/d0ab52576c729091b4cdc72b378a305e102ca180)), closes [#6784](https://www.github.com/googleapis/java-pubsub/issues/6784) [#11](https://www.github.com/googleapis/java-pubsub/issues/11)
+* removing delivery attempt attribute when dead lettering is not enabled ([#72](https://www.github.com/googleapis/java-pubsub/issues/72)) ([535854d](https://www.github.com/googleapis/java-pubsub/commit/535854df64234fe491cae1e3db0c96d685ef0800))
+* retry streaming subscriber connections on unknown ([#92](https://www.github.com/googleapis/java-pubsub/issues/92)) ([d702a5c](https://www.github.com/googleapis/java-pubsub/commit/d702a5caa2a1da7a160a449fd91681e38c034afc))
+* shutdown grpc stubs properly when a subscriber is stopped ([#74](https://www.github.com/googleapis/java-pubsub/issues/74)) ([9bcc433](https://www.github.com/googleapis/java-pubsub/commit/9bcc433e6d167f68256e0ede2a521296dcbc7412)), closes [#6784](https://www.github.com/googleapis/java-pubsub/issues/6784) [#11](https://www.github.com/googleapis/java-pubsub/issues/11)
+
+
+### Dependencies
+
+* update core dependencies ([#56](https://www.github.com/googleapis/java-pubsub/issues/56)) ([0188a8a](https://www.github.com/googleapis/java-pubsub/commit/0188a8a550d3aeb2626e7398a2802bf1756240d7))
+* update dependency com.google.cloud:google-cloud-core to v1.92.5 ([c296feb](https://www.github.com/googleapis/java-pubsub/commit/c296febe426dc9453b050cb21bcb188a4d09ad50))
+* update dependency com.google.http-client:google-http-client-bom to v1.34.1 ([#71](https://www.github.com/googleapis/java-pubsub/issues/71)) ([69fc615](https://www.github.com/googleapis/java-pubsub/commit/69fc6155a4490dcad082abf7742b359c0a0ff885))
+* update dependency com.google.protobuf:protobuf-java to v3.11.3 ([#79](https://www.github.com/googleapis/java-pubsub/issues/79)) ([0f77732](https://www.github.com/googleapis/java-pubsub/commit/0f77732e751a83f61fe3b6a7e4b745003fc87474))
+* update dependency org.threeten:threetenbp to v1.4.1 ([4383d60](https://www.github.com/googleapis/java-pubsub/commit/4383d6064d8a3ef8d0dd9bc8c65e09b48d6f53dc))
+
+
+### Documentation
+
+* **regen:** update sample code to set total timeout, add API client header test ([8bc23bc](https://www.github.com/googleapis/java-pubsub/commit/8bc23bc3b68a2c3a2a7caa1d9859dfdd1b56c47d))
+
### [1.102.1](https://www.github.com/googleapis/java-pubsub/compare/v1.102.0...v1.102.1) (2020-01-07)
diff --git a/README.md b/README.md
index 8d433b89c..567467d9e 100644
--- a/README.md
+++ b/README.md
@@ -37,16 +37,16 @@ If you are using Maven without a BOM, add this to your pom.xml file
com.google.cloud
google-cloud-pubsub
- 1.102.1
+ 1.103.0
```
If you are using Gradle, add this to your dependencies
```Groovy
-compile 'com.google.cloud:google-cloud-pubsub:1.102.1'
+compile 'com.google.cloud:google-cloud-pubsub:1.103.0'
```
If you are using SBT, add this to your dependencies
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.102.1"
+libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.103.0"
```
[//]: # ({x-version-update-end})
diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml
index 0081b11f8..69cbb812e 100644
--- a/google-cloud-pubsub-bom/pom.xml
+++ b/google-cloud-pubsub-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-pubsub-bom
- 1.102.2-SNAPSHOT
+ 1.103.0
pom
com.google.cloud
@@ -64,17 +64,17 @@
com.google.api.grpc
proto-google-cloud-pubsub-v1
- 1.84.2-SNAPSHOT
+ 1.85.0
com.google.api.grpc
grpc-google-cloud-pubsub-v1
- 1.84.2-SNAPSHOT
+ 1.85.0
com.google.cloud
google-cloud-pubsub
- 1.102.2-SNAPSHOT
+ 1.103.0