diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index d5500ef44..31c6fe5f1 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:46d2d262cd285c638656c8bde468011b723dc0c7ffd6a5ecc2650fe639c82e8f -# created: 2023-07-24T14:21:17.707234503Z + digest: sha256:11d59eabd49dc088f8339fb96e9da79ba4b3a73b3d49a8a4e0263e91edd053ba +# created: 2023-12-05T18:46:43.811070085Z diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index f5302bbe8..d9ed293ca 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -34,6 +34,7 @@ deep-preserve-regex: - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeSubscriberServiceImpl.java" +- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDataMatcher.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/OpenCensusUtilTest.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java" diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 2176b0543..44ab091e1 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -1,5 +1,9 @@ # Configuration for the Blunderbuss GitHub app. For more info see # https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss +assign_issues: + - maitrimangal +assign_prs: + - maitrimangal assign_prs_by: - labels: - samples diff --git a/.github/release-please.yml b/.github/release-please.yml index 2599810ac..c6976da6a 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -30,3 +30,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.121.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.123.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 5f005e32f..46e11116d 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -19,6 +19,7 @@ branchProtectionRules: - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' + - javadoc - pattern: 1.111.0-sp isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -135,6 +136,23 @@ branchProtectionRules: - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' + - pattern: 1.123.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (17) + - lint + - clirr + - units (8) + - units (11) + - 'Kokoro - Test: Integration' + - Kokoro - Against Pub/Sub Lite samples + - cla/google + - OwlBot Post Processor + - 'Kokoro - Test: Java GraalVM Native Image' + - 'Kokoro - Test: Java 17 GraalVM Native Image' permissionRules: - team: yoshi-admins permission: admin diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e27b2c575..ae66b1973 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - java: [11, 17] + java: [11, 17, 21] steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index 016279315..f1a27f81c 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -5,7 +5,7 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v1 with: java-version: 8 diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index a2907a257..5a95c6828 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -35,3 +35,4 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg index 58049cc38..6a6ef94ef 100644 --- a/.kokoro/nightly/java11-integration.cfg +++ b/.kokoro/nightly/java11-integration.cfg @@ -35,3 +35,4 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index f52533545..fb5bb678f 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.2" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.3" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index 44b100487..59efee340 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.2" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3" } env_vars: { diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg index dded67a9d..5864c603e 100644 --- a/.kokoro/presubmit/integration.cfg +++ b/.kokoro/presubmit/integration.cfg @@ -31,3 +31,4 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 32989051e..6a36ccab4 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -12,9 +12,9 @@ cachetools==5.3.1 \ --hash=sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590 \ --hash=sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b # via google-auth -certifi==2023.5.7 \ - --hash=sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7 \ - --hash=sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716 +certifi==2023.7.22 \ + --hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \ + --hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9 # via requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ @@ -170,30 +170,30 @@ colorlog==6.7.0 \ --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 # via gcp-docuploader -cryptography==41.0.2 \ - --hash=sha256:01f1d9e537f9a15b037d5d9ee442b8c22e3ae11ce65ea1f3316a41c78756b711 \ - --hash=sha256:079347de771f9282fbfe0e0236c716686950c19dee1b76240ab09ce1624d76d7 \ - --hash=sha256:182be4171f9332b6741ee818ec27daff9fb00349f706629f5cbf417bd50e66fd \ - --hash=sha256:192255f539d7a89f2102d07d7375b1e0a81f7478925b3bc2e0549ebf739dae0e \ - --hash=sha256:2a034bf7d9ca894720f2ec1d8b7b5832d7e363571828037f9e0c4f18c1b58a58 \ - --hash=sha256:342f3767e25876751e14f8459ad85e77e660537ca0a066e10e75df9c9e9099f0 \ - --hash=sha256:439c3cc4c0d42fa999b83ded80a9a1fb54d53c58d6e59234cfe97f241e6c781d \ - --hash=sha256:49c3222bb8f8e800aead2e376cbef687bc9e3cb9b58b29a261210456a7783d83 \ - --hash=sha256:674b669d5daa64206c38e507808aae49904c988fa0a71c935e7006a3e1e83831 \ - --hash=sha256:7a9a3bced53b7f09da251685224d6a260c3cb291768f54954e28f03ef14e3766 \ - --hash=sha256:7af244b012711a26196450d34f483357e42aeddb04128885d95a69bd8b14b69b \ - --hash=sha256:7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c \ - --hash=sha256:84609ade00a6ec59a89729e87a503c6e36af98ddcd566d5f3be52e29ba993182 \ - --hash=sha256:9a6673c1828db6270b76b22cc696f40cde9043eb90373da5c2f8f2158957f42f \ - --hash=sha256:9b6d717393dbae53d4e52684ef4f022444fc1cce3c48c38cb74fca29e1f08eaa \ - --hash=sha256:9c3fe6534d59d071ee82081ca3d71eed3210f76ebd0361798c74abc2bcf347d4 \ - --hash=sha256:a719399b99377b218dac6cf547b6ec54e6ef20207b6165126a280b0ce97e0d2a \ - --hash=sha256:b332cba64d99a70c1e0836902720887fb4529ea49ea7f5462cf6640e095e11d2 \ - --hash=sha256:d124682c7a23c9764e54ca9ab5b308b14b18eba02722b8659fb238546de83a76 \ - --hash=sha256:d73f419a56d74fef257955f51b18d046f3506270a5fd2ac5febbfa259d6c0fa5 \ - --hash=sha256:f0dc40e6f7aa37af01aba07277d3d64d5a03dc66d682097541ec4da03cc140ee \ - --hash=sha256:f14ad275364c8b4e525d018f6716537ae7b6d369c094805cae45300847e0894f \ - --hash=sha256:f772610fe364372de33d76edcd313636a25684edb94cee53fd790195f5989d14 +cryptography==41.0.3 \ + --hash=sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306 \ + --hash=sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84 \ + --hash=sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47 \ + --hash=sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d \ + --hash=sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116 \ + --hash=sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207 \ + --hash=sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81 \ + --hash=sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087 \ + --hash=sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd \ + --hash=sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507 \ + --hash=sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858 \ + --hash=sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae \ + --hash=sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34 \ + --hash=sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906 \ + --hash=sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd \ + --hash=sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922 \ + --hash=sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7 \ + --hash=sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4 \ + --hash=sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574 \ + --hash=sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1 \ + --hash=sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c \ + --hash=sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e \ + --hash=sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de # via # gcp-releasetool # secretstorage @@ -418,6 +418,7 @@ protobuf==3.20.3 \ # gcp-docuploader # gcp-releasetool # google-api-core + # googleapis-common-protos pyasn1==0.5.0 \ --hash=sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57 \ --hash=sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde @@ -469,9 +470,9 @@ typing-extensions==4.7.1 \ --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 # via -r requirements.in -urllib3==1.26.16 \ - --hash=sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f \ - --hash=sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14 +urllib3==1.26.18 \ + --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ + --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 # via # google-auth # requests diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fabb8d55..547b68d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,196 @@ # Changelog +## [1.125.13](https://github.com/googleapis/java-pubsub/compare/v1.125.12...v1.125.13) (2023-11-30) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-core to v2.28.0 ([#1830](https://github.com/googleapis/java-pubsub/issues/1830)) ([8990b7c](https://github.com/googleapis/java-pubsub/commit/8990b7ca7cfbb08cd117f59bbf18c67dd1e7fb18)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.20.0 ([#1831](https://github.com/googleapis/java-pubsub/issues/1831)) ([d188af8](https://github.com/googleapis/java-pubsub/commit/d188af8815927b409f72c968cbd6a8685976d08b)) +* Update dependency com.google.protobuf:protobuf-java-util to v3.25.1 ([#1816](https://github.com/googleapis/java-pubsub/issues/1816)) ([e4f2b26](https://github.com/googleapis/java-pubsub/commit/e4f2b2605b17024f983a8ccf50ed19d169c15d90)) + +## [1.125.12](https://github.com/googleapis/java-pubsub/compare/v1.125.11...v1.125.12) (2023-11-21) + + +### Bug Fixes + +* Concurrent modification of processing receievd messages ([#1807](https://github.com/googleapis/java-pubsub/issues/1807)) ([d162126](https://github.com/googleapis/java-pubsub/commit/d16212627b0d9b6616e0a9b20af2c430e2f6b36f)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.34.2 ([#1821](https://github.com/googleapis/java-pubsub/issues/1821)) ([c21ba1a](https://github.com/googleapis/java-pubsub/commit/c21ba1a51acf3411e7f9793f579a103ee1d36f38)) +* Update dependency com.google.cloud:google-cloud-storage to v2.29.1 ([#1817](https://github.com/googleapis/java-pubsub/issues/1817)) ([e179b94](https://github.com/googleapis/java-pubsub/commit/e179b94b7034fbb6c10775b0fe469ab129c0d6c8)) +* Update dependency org.junit.vintage:junit-vintage-engine to v5.10.1 ([#1819](https://github.com/googleapis/java-pubsub/issues/1819)) ([af84aa3](https://github.com/googleapis/java-pubsub/commit/af84aa3f5434d3e8ff2122b72cae0fc1c7323742)) + +## [1.125.11](https://github.com/googleapis/java-pubsub/compare/v1.125.10...v1.125.11) (2023-11-01) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-core to v2.27.0 ([#1810](https://github.com/googleapis/java-pubsub/issues/1810)) ([edd89f3](https://github.com/googleapis/java-pubsub/commit/edd89f36061cd1518f81eb7b33e42cf5c35c659d)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.19.0 ([#1811](https://github.com/googleapis/java-pubsub/issues/1811)) ([d671bcb](https://github.com/googleapis/java-pubsub/commit/d671bcb9b0e6c425eb33bdafea9c20b543020363)) + +## [1.125.10](https://github.com/googleapis/java-pubsub/compare/v1.125.9...v1.125.10) (2023-10-31) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-storage to v2.29.0 ([#1800](https://github.com/googleapis/java-pubsub/issues/1800)) ([8c43cc2](https://github.com/googleapis/java-pubsub/commit/8c43cc2443f333c646c27cee4ee70434167213ba)) + + +### Documentation + +* Adding a GCS subscription example ([#1762](https://github.com/googleapis/java-pubsub/issues/1762)) ([3ce824c](https://github.com/googleapis/java-pubsub/commit/3ce824c78c7eaf37fc3bc0ed2a4b3b1d952ed9bc)) +* Renaming the CreateUnwrappedPushSubscription File ([#1794](https://github.com/googleapis/java-pubsub/issues/1794)) ([3264290](https://github.com/googleapis/java-pubsub/commit/326429092ac73d184b5e887ce5107220f96199b7)) + +## [1.125.9](https://github.com/googleapis/java-pubsub/compare/v1.125.8...v1.125.9) (2023-10-27) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.34.0 ([#1795](https://github.com/googleapis/java-pubsub/issues/1795)) ([670daf1](https://github.com/googleapis/java-pubsub/commit/670daf1c74242dfa54e9747924d094cbcaac4d37)) + +## [1.125.8](https://github.com/googleapis/java-pubsub/compare/v1.125.7...v1.125.8) (2023-10-23) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-core to v2.26.0 ([#1780](https://github.com/googleapis/java-pubsub/issues/1780)) ([2d38175](https://github.com/googleapis/java-pubsub/commit/2d381751b51cb69b6ab248ee56fe9ce5bf7f5cd5)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#1781](https://github.com/googleapis/java-pubsub/issues/1781)) ([5b6cb15](https://github.com/googleapis/java-pubsub/commit/5b6cb15ce9f459061875329ba1fc6d4b84909666)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.28 ([#1782](https://github.com/googleapis/java-pubsub/issues/1782)) ([c9be478](https://github.com/googleapis/java-pubsub/commit/c9be478c3558928fc603c81fc07c4d8ba6d853b4)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.28 ([#1783](https://github.com/googleapis/java-pubsub/issues/1783)) ([5e39b79](https://github.com/googleapis/java-pubsub/commit/5e39b799d5d7b41325f9564a6044c0f0b4b05fdc)) + + +### Documentation + +* Modified some descriptions ([#1773](https://github.com/googleapis/java-pubsub/issues/1773)) ([17bd055](https://github.com/googleapis/java-pubsub/commit/17bd05512ba71083eb898a3ff8c5dc53c9bbb08d)) + +## [1.125.7](https://github.com/googleapis/java-pubsub/compare/v1.125.6...v1.125.7) (2023-10-17) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.33.2 ([#1770](https://github.com/googleapis/java-pubsub/issues/1770)) ([db73af7](https://github.com/googleapis/java-pubsub/commit/db73af7bca53faae2e135ec9a1899e36ac19025c)) + +## [1.125.6](https://github.com/googleapis/java-pubsub/compare/v1.125.5...v1.125.6) (2023-10-10) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.33.1 ([#1756](https://github.com/googleapis/java-pubsub/issues/1756)) ([239f474](https://github.com/googleapis/java-pubsub/commit/239f474fefd2313a6842c63c4202d835008647e3)) +* Update dependency com.google.cloud:google-cloud-core to v2.25.0 ([#1764](https://github.com/googleapis/java-pubsub/issues/1764)) ([72404ea](https://github.com/googleapis/java-pubsub/commit/72404eabcc3695b8072091587515562d852a6108)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.17.0 ([#1765](https://github.com/googleapis/java-pubsub/issues/1765)) ([a447292](https://github.com/googleapis/java-pubsub/commit/a447292d07ae1d9b03866dbdd9549c1b10564b28)) +* Update dependency com.google.protobuf:protobuf-java-util to v3.24.4 ([#1760](https://github.com/googleapis/java-pubsub/issues/1760)) ([10a64c6](https://github.com/googleapis/java-pubsub/commit/10a64c6b872a14decf3a799ebd985395358dc32c)) + +## [1.125.5](https://github.com/googleapis/java-pubsub/compare/v1.125.4...v1.125.5) (2023-09-28) + + +### Dependencies + +* Update gapic-generator-java to 2.26.0 ([935849c](https://github.com/googleapis/java-pubsub/commit/935849cedbb70a0821be56828dd0abeccbccc21c)) + +## [1.125.4](https://github.com/googleapis/java-pubsub/compare/v1.125.3...v1.125.4) (2023-09-28) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.33.0 ([#1750](https://github.com/googleapis/java-pubsub/issues/1750)) ([bcbfcd0](https://github.com/googleapis/java-pubsub/commit/bcbfcd0dd65c2ca0f20d3579109728737f1292bc)) + +## [1.125.3](https://github.com/googleapis/java-pubsub/compare/v1.125.2...v1.125.3) (2023-09-27) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-core to v2.24.1 ([#1737](https://github.com/googleapis/java-pubsub/issues/1737)) ([48a4432](https://github.com/googleapis/java-pubsub/commit/48a44321ad34edd8c297ccc57445ec36916171cb)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.16.1 ([#1738](https://github.com/googleapis/java-pubsub/issues/1738)) ([e2cf7c1](https://github.com/googleapis/java-pubsub/commit/e2cf7c110b72dff695a46a972687a595216934e6)) +* Update dependency org.apache.avro:avro to v1.11.3 ([#1740](https://github.com/googleapis/java-pubsub/issues/1740)) ([971b35f](https://github.com/googleapis/java-pubsub/commit/971b35f5d26263ef3c1d83b6282680ac1608c032)) +* Update dependency org.xerial.snappy:snappy-java to v1.1.10.4 [security] ([#1742](https://github.com/googleapis/java-pubsub/issues/1742)) ([70ba500](https://github.com/googleapis/java-pubsub/commit/70ba500cc014cb9d0e1799997aa0682239b97cde)) +* Update dependency org.xerial.snappy:snappy-java to v1.1.10.5 ([#1746](https://github.com/googleapis/java-pubsub/issues/1746)) ([a4b1994](https://github.com/googleapis/java-pubsub/commit/a4b199414cad5cb061330832b2bf2a8bbe76bcbd)) + +## [1.125.2](https://github.com/googleapis/java-pubsub/compare/v1.125.1...v1.125.2) (2023-09-18) + + +### Dependencies + +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.27 ([#1730](https://github.com/googleapis/java-pubsub/issues/1730)) ([687a855](https://github.com/googleapis/java-pubsub/commit/687a855580a9c8fe7f0d4a8952cb3ca46ff6f736)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.27 ([#1731](https://github.com/googleapis/java-pubsub/issues/1731)) ([403b7e7](https://github.com/googleapis/java-pubsub/commit/403b7e72c275464a67f6998bb975d95026a8480d)) + +## [1.125.1](https://github.com/googleapis/java-pubsub/compare/v1.125.0...v1.125.1) (2023-09-14) + + +### Dependencies + +* Update actions/checkout action to v4 - abandoned ([#1719](https://github.com/googleapis/java-pubsub/issues/1719)) ([b82f15a](https://github.com/googleapis/java-pubsub/commit/b82f15a099f3366620f5e22764b043911ebd88d1)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.32.0 ([#1725](https://github.com/googleapis/java-pubsub/issues/1725)) ([f40f09a](https://github.com/googleapis/java-pubsub/commit/f40f09a185c035cc03b6be6ec62f880da9f7b377)) + +## [1.125.0](https://github.com/googleapis/java-pubsub/compare/v1.124.2...v1.125.0) (2023-09-12) + + +### Features + +* Receipt modack ([#1540](https://github.com/googleapis/java-pubsub/issues/1540)) ([74d8da9](https://github.com/googleapis/java-pubsub/commit/74d8da97c42b672e3f9f26b9a535d6bac948a402)) + + +### Bug Fixes + +* Make retry policy back off more aggressively for RPCs that retry RESOURCE_EXHAUSTD ([#1704](https://github.com/googleapis/java-pubsub/issues/1704)) ([f61e7e0](https://github.com/googleapis/java-pubsub/commit/f61e7e0e2895a90e30ecf4dcbfa8c70022947d9e)) + + +### Dependencies + +* Update actions/checkout action to v4 ([#1712](https://github.com/googleapis/java-pubsub/issues/1712)) ([404c492](https://github.com/googleapis/java-pubsub/commit/404c492823306c1448c62383b9ea88cf9e43b970)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.31.2 ([#1713](https://github.com/googleapis/java-pubsub/issues/1713)) ([32cb43c](https://github.com/googleapis/java-pubsub/commit/32cb43cce40f7a39602eb7d9b39a88eb229fc4ef)) +* Update dependency com.google.cloud:google-cloud-core to v2.23.0 ([#1717](https://github.com/googleapis/java-pubsub/issues/1717)) ([929f778](https://github.com/googleapis/java-pubsub/commit/929f778e341aefe61206e55de828bf5a86e4efd3)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.15.0 ([#1718](https://github.com/googleapis/java-pubsub/issues/1718)) ([0eeaa19](https://github.com/googleapis/java-pubsub/commit/0eeaa19a640513e80d595ca7c4016e26fc30871b)) +* Update dependency com.google.protobuf:protobuf-java-util to v3.24.3 ([#1698](https://github.com/googleapis/java-pubsub/issues/1698)) ([1157fbf](https://github.com/googleapis/java-pubsub/commit/1157fbff92204eae55bb24ad803f0b8e1336ac10)) +* Update dependency org.easymock:easymock to v5.2.0 ([#1711](https://github.com/googleapis/java-pubsub/issues/1711)) ([313f6dd](https://github.com/googleapis/java-pubsub/commit/313f6dd8b82fbc57df066615e285325969b6d2e4)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.25 ([#1709](https://github.com/googleapis/java-pubsub/issues/1709)) ([1cc8a53](https://github.com/googleapis/java-pubsub/commit/1cc8a53a416acdd5f9cd4fc598f2f5f182a2ad44)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.26 ([#1715](https://github.com/googleapis/java-pubsub/issues/1715)) ([f2cc75f](https://github.com/googleapis/java-pubsub/commit/f2cc75f960521e8be50cf354e00024d66fb8f7fb)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.25 ([#1710](https://github.com/googleapis/java-pubsub/issues/1710)) ([9764c3f](https://github.com/googleapis/java-pubsub/commit/9764c3f740cd726ad09cef82039561bd145fbe0c)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.26 ([#1716](https://github.com/googleapis/java-pubsub/issues/1716)) ([6c9e949](https://github.com/googleapis/java-pubsub/commit/6c9e9493ec7aeaa0711ad2155fa6a549937284df)) + +## [1.124.2](https://github.com/googleapis/java-pubsub/compare/v1.124.1...v1.124.2) (2023-08-15) + + +### Bug Fixes + +* Update Publish retry backoff settings ([#1686](https://github.com/googleapis/java-pubsub/issues/1686)) ([63a74d9](https://github.com/googleapis/java-pubsub/commit/63a74d98fdee56a98819d135a676a67fcc24961a)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.31.1 ([#1697](https://github.com/googleapis/java-pubsub/issues/1697)) ([9e90790](https://github.com/googleapis/java-pubsub/commit/9e907901e0f5f78adfffb3e61974e9f8fd756f96)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.24 ([#1695](https://github.com/googleapis/java-pubsub/issues/1695)) ([ec64036](https://github.com/googleapis/java-pubsub/commit/ec640361a471111001f22667fa7e38123b731025)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.24 ([#1696](https://github.com/googleapis/java-pubsub/issues/1696)) ([cc9ae19](https://github.com/googleapis/java-pubsub/commit/cc9ae19865c0ece3789a8c2fa22afb5fbd306dc9)) + +## [1.124.1](https://github.com/googleapis/java-pubsub/compare/v1.124.0...v1.124.1) (2023-08-03) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-core to v2.22.0 ([#1687](https://github.com/googleapis/java-pubsub/issues/1687)) ([220f318](https://github.com/googleapis/java-pubsub/commit/220f3181562a848cd786cc0126e8e3ad382787c7)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.14.0 ([#1688](https://github.com/googleapis/java-pubsub/issues/1688)) ([0ded9f1](https://github.com/googleapis/java-pubsub/commit/0ded9f172af637db5d4302b146a24ecdd5b1bde2)) + +## [1.124.0](https://github.com/googleapis/java-pubsub/compare/v1.123.20...v1.124.0) (2023-07-27) + + +### Features + +* Setup 1.123.x lts branch ([#1676](https://github.com/googleapis/java-pubsub/issues/1676)) ([a60b887](https://github.com/googleapis/java-pubsub/commit/a60b88772d69d367f90bbe61bc4e157338193b0f)) + + +### Documentation + +* Clarified where ordering_key will be written if write_metadata is set ([#1675](https://github.com/googleapis/java-pubsub/issues/1675)) ([462746c](https://github.com/googleapis/java-pubsub/commit/462746cfbf9b712118b67349f2f4f4cebf45932a)) + +## [1.123.20](https://github.com/googleapis/java-pubsub/compare/v1.123.19...v1.123.20) (2023-07-25) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.31.0 ([#1671](https://github.com/googleapis/java-pubsub/issues/1671)) ([c51d396](https://github.com/googleapis/java-pubsub/commit/c51d39688464c51ffdb046368b4f8e926360d72e)) + ## [1.123.19](https://github.com/googleapis/java-pubsub/compare/v1.123.18...v1.123.19) (2023-07-25) diff --git a/README.md b/README.md index 2c8d63df4..6edc0987f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.19.0 + 26.28.0 pom import @@ -44,7 +44,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.123.18 + 1.125.13 ``` @@ -52,20 +52,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.25.0') +implementation platform('com.google.cloud:libraries-bom:26.28.0') implementation 'com.google.cloud:google-cloud-pubsub' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-pubsub:1.125.7' +implementation 'com.google.cloud:google-cloud-pubsub:1.125.13' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.125.7" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.125.13" ``` @@ -248,9 +248,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m | Commit Proto Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CommitProtoSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CommitProtoSchemaExample.java) | | Create Avro Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateAvroSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateAvroSchemaExample.java) | | Create Big Query Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateBigQuerySubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateBigQuerySubscriptionExample.java) | +| Create Cloud Storage Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateCloudStorageSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateCloudStorageSubscriptionExample.java) | | Create Proto Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateProtoSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateProtoSchemaExample.java) | | Create Pull Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreatePullSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreatePullSubscriptionExample.java) | -| Create Push No Wrapper Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreatePushNoWrapperSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreatePushNoWrapperSubscriptionExample.java) | | Create Push Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreatePushSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreatePushSubscriptionExample.java) | | Create Subscription With Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java) | | Create Subscription With Exactly Once Delivery | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithExactlyOnceDelivery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithExactlyOnceDelivery.java) | @@ -259,6 +259,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m | Create Topic Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicExample.java) | | Create Topic With Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaExample.java) | | Create Topic With Schema Revisions Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaRevisionsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaRevisionsExample.java) | +| Create Unwrapped Push Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java) | | Delete Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/DeleteSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/DeleteSchemaExample.java) | | Delete Schema Revision Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/DeleteSchemaRevisionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/DeleteSchemaRevisionExample.java) | | Delete Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/DeleteSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/DeleteSubscriptionExample.java) | @@ -408,7 +409,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-pubsub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.125.7 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.125.13 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index c2f716f5b..fa186be44 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT pom com.google.cloud google-cloud-shared-config - 1.5.7 + 1.6.1 Google Cloud pubsub BOM @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.105.20-SNAPSHOT + 1.107.14-SNAPSHOT com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.105.20-SNAPSHOT + 1.107.14-SNAPSHOT diff --git a/google-cloud-pubsub/EnableAutoValue.txt b/google-cloud-pubsub/EnableAutoValue.txt new file mode 100644 index 000000000..e69de29bb diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 3bb63bbe0..5310f092a 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT google-cloud-pubsub @@ -84,7 +84,7 @@ io.grpc - grpc-core + grpc-inprocess runtime @@ -180,24 +180,6 @@ - - maven-compiler-plugin - 3.11.0 - - 1.8 - 1.8 - UTF-8 - -Xlint:unchecked - - - com.google.auto.value - auto-value - ${auto-value-annotation.version} - - - - - org.codehaus.mojo flatten-maven-plugin 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 3c772819a..b257594ea 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 @@ -30,8 +30,10 @@ import com.google.pubsub.v1.ReceivedMessage; import java.util.ArrayList; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; @@ -89,7 +91,8 @@ class MessageDispatcher { private final LinkedBlockingQueue pendingAcks = new LinkedBlockingQueue<>(); private final LinkedBlockingQueue pendingNacks = new LinkedBlockingQueue<>(); private final LinkedBlockingQueue pendingReceipts = new LinkedBlockingQueue<>(); - + private final ConcurrentMap outstandingReceipts = + new ConcurrentHashMap(); private final AtomicInteger messageDeadlineSeconds = new AtomicInteger(); private final AtomicBoolean extendDeadline = new AtomicBoolean(true); private final Lock jobLock; @@ -350,6 +353,28 @@ private OutstandingMessage(ReceivedMessage receivedMessage, AckHandler ackHandle } } + private static class ReceiptCompleteData { + private OutstandingMessage outstandingMessage; + private Boolean receiptComplete; + + private ReceiptCompleteData(OutstandingMessage outstandingMessage) { + this.outstandingMessage = outstandingMessage; + this.receiptComplete = false; + } + + private OutstandingMessage getOutstandingMessage() { + return this.outstandingMessage; + } + + private Boolean isReceiptComplete() { + return this.receiptComplete; + } + + private void notifyReceiptComplete() { + this.receiptComplete = true; + } + } + void processReceivedMessages(List messages) { Instant totalExpiration = now().plus(maxAckExtensionPeriod); List outstandingBatch = new ArrayList<>(messages.size()); @@ -361,7 +386,13 @@ void processReceivedMessages(List messages) { AckRequestData ackRequestData = builder.build(); AckHandler ackHandler = new AckHandler(ackRequestData, message.getMessage().getSerializedSize(), totalExpiration); - if (pendingMessages.putIfAbsent(message.getAckId(), ackHandler) != null) { + OutstandingMessage outstandingMessage = new OutstandingMessage(message, ackHandler); + + if (this.exactlyOnceDeliveryEnabled.get()) { + // For exactly once deliveries we don't add to outstanding batch because we first + // process the receipt modack. If that is successful then we process the message. + outstandingReceipts.put(message.getAckId(), new ReceiptCompleteData(outstandingMessage)); + } else if (pendingMessages.putIfAbsent(message.getAckId(), ackHandler) != null) { // putIfAbsent puts ackHandler if ackID isn't previously mapped, then return the // previously-mapped element. // If the previous element is not null, we already have the message and the new one is @@ -371,14 +402,44 @@ void processReceivedMessages(List messages) { // we want to eventually // totally expire so that pubsub service sends us the message again. continue; + } else { + outstandingBatch.add(outstandingMessage); } - outstandingBatch.add(new OutstandingMessage(message, ackHandler)); pendingReceipts.add(ackRequestData); } - processBatch(outstandingBatch); } + void notifyAckSuccess(AckRequestData ackRequestData) { + + if (outstandingReceipts.containsKey(ackRequestData.getAckId())) { + outstandingReceipts.get(ackRequestData.getAckId()).notifyReceiptComplete(); + List outstandingBatch = new ArrayList<>(); + + for (Iterator> it = + outstandingReceipts.entrySet().iterator(); + it.hasNext(); ) { + Map.Entry receipt = it.next(); + // If receipt is complete then add to outstandingBatch to process the batch + if (receipt.getValue().isReceiptComplete()) { + it.remove(); + if (pendingMessages.putIfAbsent( + receipt.getKey(), receipt.getValue().getOutstandingMessage().ackHandler) + == null) { + outstandingBatch.add(receipt.getValue().getOutstandingMessage()); + } + } else { + break; + } + } + processBatch(outstandingBatch); + } + } + + void notifyAckFailed(AckRequestData ackRequestData) { + outstandingReceipts.remove(ackRequestData.getAckId()); + } + private void processBatch(List batch) { messagesWaiter.incrementPendingCount(batch.size()); for (OutstandingMessage message : batch) { @@ -519,6 +580,7 @@ void extendDeadlines() { @InternalApi void processOutstandingOperations() { + List modackRequestData = new ArrayList(); // Nacks are modacks with an expiration of 0 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 6803e5a43..d0437cb58 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 @@ -686,7 +686,7 @@ public static final class Builder { private static final Duration DEFAULT_TOTAL_TIMEOUT = Duration.ofSeconds(600); private static final Duration DEFAULT_INITIAL_RETRY_DELAY = Duration.ofMillis(100); private static final Duration DEFAULT_MAX_RETRY_DELAY = Duration.ofSeconds(60); - private static final double DEFAULT_MULTIPLIER = 1.3; + private static final double DEFAULT_MULTIPLIER = 4; static final BatchingSettings DEFAULT_BATCHING_SETTINGS = BatchingSettings.newBuilder() .setDelayThreshold(DEFAULT_DELAY_THRESHOLD) 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 160032c7a..014771f2a 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 @@ -527,6 +527,7 @@ public void onSuccess(Empty empty) { for (AckRequestData ackRequestData : ackRequestDataList) { // This will check if a response is needed, and if it has already been set ackRequestData.setResponse(AckResponse.SUCCESSFUL, setResponseOnSuccess); + messageDispatcher.notifyAckSuccess(ackRequestData); // Remove from our pending operations pendingRequests.remove(ackRequestData); } @@ -564,12 +565,15 @@ public void onFailure(Throwable t) { "Permanent error invalid ack id message, will not resend", errorMessage); ackRequestData.setResponse(AckResponse.INVALID, setResponseOnSuccess); + messageDispatcher.notifyAckFailed(ackRequestData); } else { logger.log(Level.INFO, "Unknown error message, will not resend", errorMessage); ackRequestData.setResponse(AckResponse.OTHER, setResponseOnSuccess); + messageDispatcher.notifyAckFailed(ackRequestData); } } else { ackRequestData.setResponse(AckResponse.SUCCESSFUL, setResponseOnSuccess); + messageDispatcher.notifyAckSuccess(ackRequestData); } // Remove from our pending pendingRequests.remove(ackRequestData); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index e040337a4..068970f64 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -222,15 +222,15 @@ public SubscriberStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription + * already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns * `NOT_FOUND`. * *

If the name is not provided in the request, the server will assign a random name for this * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is + * populated in the returned Subscription object. Note that for REST API requests, you must + * specify a name in the request. * *

Sample code: * @@ -292,15 +292,15 @@ public final Subscription createSubscription( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription + * already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns * `NOT_FOUND`. * *

If the name is not provided in the request, the server will assign a random name for this * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is + * populated in the returned Subscription object. Note that for REST API requests, you must + * specify a name in the request. * *

Sample code: * @@ -362,15 +362,15 @@ public final Subscription createSubscription( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription + * already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns * `NOT_FOUND`. * *

If the name is not provided in the request, the server will assign a random name for this * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is + * populated in the returned Subscription object. Note that for REST API requests, you must + * specify a name in the request. * *

Sample code: * @@ -432,15 +432,15 @@ public final Subscription createSubscription( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription + * already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns * `NOT_FOUND`. * *

If the name is not provided in the request, the server will assign a random name for this * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is + * populated in the returned Subscription object. Note that for REST API requests, you must + * specify a name in the request. * *

Sample code: * @@ -502,15 +502,15 @@ public final Subscription createSubscription( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription + * already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns * `NOT_FOUND`. * *

If the name is not provided in the request, the server will assign a random name for this * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is + * populated in the returned Subscription object. Note that for REST API requests, you must + * specify a name in the request. * *

Sample code: * @@ -765,15 +765,15 @@ public final Subscription createSubscription( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription + * already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns * `NOT_FOUND`. * *

If the name is not provided in the request, the server will assign a random name for this * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is + * populated in the returned Subscription object. Note that for REST API requests, you must + * specify a name in the request. * *

Sample code: * @@ -2609,9 +2609,9 @@ public final UnaryCallable listSnap * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the * `Snapshot.expire_time` field. 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, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. + * the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * The generated name is populated in the returned Snapshot object. Note that for REST API + * requests, you must specify a name in the request. * *

Sample code: * @@ -2631,7 +2631,7 @@ public final UnaryCallable listSnap * @param name Required. 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is + * name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). Format is * `projects/{project}/snapshots/{snap}`. * @param subscription Required. The subscription whose backlog the snapshot retains. * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the @@ -2662,9 +2662,9 @@ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscri * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the * `Snapshot.expire_time` field. 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, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. + * the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * The generated name is populated in the returned Snapshot object. Note that for REST API + * requests, you must specify a name in the request. * *

Sample code: * @@ -2684,7 +2684,7 @@ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscri * @param name Required. 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is + * name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). Format is * `projects/{project}/snapshots/{snap}`. * @param subscription Required. The subscription whose backlog the snapshot retains. * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the @@ -2715,9 +2715,9 @@ public final Snapshot createSnapshot(SnapshotName name, String subscription) { * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the * `Snapshot.expire_time` field. 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, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. + * the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * The generated name is populated in the returned Snapshot object. Note that for REST API + * requests, you must specify a name in the request. * *

Sample code: * @@ -2737,7 +2737,7 @@ public final Snapshot createSnapshot(SnapshotName name, String subscription) { * @param name Required. 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is + * name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). Format is * `projects/{project}/snapshots/{snap}`. * @param subscription Required. The subscription whose backlog the snapshot retains. * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the @@ -2768,9 +2768,9 @@ public final Snapshot createSnapshot(String name, SubscriptionName subscription) * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the * `Snapshot.expire_time` field. 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, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. + * the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * The generated name is populated in the returned Snapshot object. Note that for REST API + * requests, you must specify a name in the request. * *

Sample code: * @@ -2790,7 +2790,7 @@ public final Snapshot createSnapshot(String name, SubscriptionName subscription) * @param name Required. 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is + * name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). Format is * `projects/{project}/snapshots/{snap}`. * @param subscription Required. The subscription whose backlog the snapshot retains. * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the @@ -2818,9 +2818,9 @@ public final Snapshot createSnapshot(String name, String subscription) { * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the * `Snapshot.expire_time` field. 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, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. + * the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * The generated name is populated in the returned Snapshot object. Note that for REST API + * requests, you must specify a name in the request. * *

Sample code: * @@ -3010,9 +3010,9 @@ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscripti * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the * `Snapshot.expire_time` field. 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, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. + * the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * The generated name is populated in the returned Snapshot object. Note that for REST API + * requests, you must specify a name in the request. * *

Sample code: * diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java index 80a3b3fa4..b1f0dc35f 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -197,7 +197,7 @@ public PublisherStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates the given topic with the given name. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). * *

Sample code: * @@ -228,7 +228,7 @@ public final Topic createTopic(TopicName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates the given topic with the given name. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). * *

Sample code: * @@ -288,7 +288,7 @@ public final Topic createTopic(ProjectTopicName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates the given topic with the given name. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). * *

Sample code: * @@ -323,7 +323,7 @@ public final Topic createTopic(Topic request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates the given topic with the given name. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). * *

Sample code: * 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 16cdef839..73510eee0 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 @@ -654,7 +654,7 @@ public static class Builder extends StubSettings.Builder { + + private ByteString expectedData; + + public MessageDataMatcher(ByteString expectedData) { + this.expectedData = expectedData; + } + + @Override + public boolean matches(PubsubMessage message2) { + return (expectedData.equals(message2.getData())); + } +} diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java index 0b48e0991..9321272b4 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java @@ -139,6 +139,100 @@ public void testReceiptMessageReceiver() { .receiveMessage(eq(TEST_MESSAGE.getMessage()), any(AckReplyConsumer.class)); } + @Test + public void testReceiptModackWithOrderingForExactlyOnceDelivered() { + + MessageReceiverWithAckResponse mockMessageReceiverWithAckResponse = + mock(MessageReceiverWithAckResponse.class); + MessageDispatcher messageDispatcher = getMessageDispatcher(mockMessageReceiverWithAckResponse); + messageDispatcher.setExactlyOnceDeliveryEnabled(true); + + ReceivedMessage TEST_MESSAGE1 = + ReceivedMessage.newBuilder() + .setAckId("ACK_ID1") + .setMessage( + PubsubMessage.newBuilder() + .setData(ByteString.copyFromUtf8("message-data1")) + .build()) + .setDeliveryAttempt(DELIVERY_INFO_COUNT) + .build(); + ReceivedMessage TEST_MESSAGE2 = + ReceivedMessage.newBuilder() + .setAckId("ACK_ID2") + .setMessage( + PubsubMessage.newBuilder() + .setData(ByteString.copyFromUtf8("message-data2")) + .build()) + .setDeliveryAttempt(DELIVERY_INFO_COUNT) + .build(); + ReceivedMessage TEST_MESSAGE3 = + ReceivedMessage.newBuilder() + .setAckId("ACK_ID3") + .setMessage( + PubsubMessage.newBuilder() + .setData(ByteString.copyFromUtf8("message-data3")) + .build()) + .setDeliveryAttempt(DELIVERY_INFO_COUNT) + .build(); + + messageDispatcher.processReceivedMessages( + Arrays.asList(TEST_MESSAGE3, TEST_MESSAGE2, TEST_MESSAGE1)); + + messageDispatcher.processOutstandingOperations(); + verify(mockMessageReceiverWithAckResponse, never()) + .receiveMessage(eq(TEST_MESSAGE.getMessage()), any(AckReplyConsumerWithResponse.class)); + + AckRequestData ackRequestData1 = AckRequestData.newBuilder(TEST_MESSAGE1.getAckId()).build(); + AckRequestData ackRequestData2 = AckRequestData.newBuilder(TEST_MESSAGE2.getAckId()).build(); + AckRequestData ackRequestData3 = AckRequestData.newBuilder(TEST_MESSAGE3.getAckId()).build(); + messageDispatcher.notifyAckSuccess(ackRequestData2); + messageDispatcher.processOutstandingOperations(); + + messageDispatcher.notifyAckSuccess(ackRequestData1); + messageDispatcher.notifyAckSuccess(ackRequestData3); + messageDispatcher.processOutstandingOperations(); + + verify(mockMessageReceiverWithAckResponse, times(1)) + .receiveMessage( + argThat(new MessageDataMatcher(TEST_MESSAGE3.getMessage().getData())), + any(AckReplyConsumerWithResponse.class)); + verify(mockMessageReceiverWithAckResponse, times(1)) + .receiveMessage( + argThat(new MessageDataMatcher(TEST_MESSAGE2.getMessage().getData())), + any(AckReplyConsumerWithResponse.class)); + verify(mockMessageReceiverWithAckResponse, times(1)) + .receiveMessage( + argThat(new MessageDataMatcher(TEST_MESSAGE1.getMessage().getData())), + any(AckReplyConsumerWithResponse.class)); + } + + @Test + public void testReceiptModackForExactlyOnceDelivered() { + + MessageReceiverWithAckResponse mockMessageReceiverWithAckResponse = + mock(MessageReceiverWithAckResponse.class); + MessageDispatcher messageDispatcher = getMessageDispatcher(mockMessageReceiverWithAckResponse); + messageDispatcher.setExactlyOnceDeliveryEnabled(true); + + messageDispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE)); + + messageDispatcher.processOutstandingOperations(); + verify(mockMessageReceiverWithAckResponse, never()) + .receiveMessage(eq(TEST_MESSAGE.getMessage()), any(AckReplyConsumerWithResponse.class)); + + AckRequestData ackRequestData = AckRequestData.newBuilder(TEST_MESSAGE.getAckId()).build(); + messageDispatcher.notifyAckSuccess(ackRequestData); + messageDispatcher.processOutstandingOperations(); + + List modackRequestDataList = new ArrayList(); + modackRequestDataList.add(new ModackRequestData(MIN_ACK_DEADLINE_SECONDS, ackRequestData)); + + verify(mockMessageReceiverWithAckResponse, times(1)) + .receiveMessage( + argThat(new MessageDataMatcher(TEST_MESSAGE.getMessage().getData())), + any(AckReplyConsumerWithResponse.class)); + } + @Test public void testReceiptMessageReceiverWithAckResponse() { MessageReceiverWithAckResponse mockMessageReceiverWithAckResponse = diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index 73ab117a0..a3a9782dd 100644 --- a/grpc-google-cloud-pubsub-v1/pom.xml +++ b/grpc-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.105.20-SNAPSHOT + 1.107.14-SNAPSHOT grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java index 0b28b656f..020bf6f9d 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java @@ -33,7 +33,7 @@ public final class PublisherGrpc { private PublisherGrpc() {} - public static final String SERVICE_NAME = "google.pubsub.v1.Publisher"; + public static final java.lang.String SERVICE_NAME = "google.pubsub.v1.Publisher"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< @@ -465,7 +465,7 @@ public interface AsyncService { * *

      * Creates the given topic with the given name. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * 
*/ default void createTopic( @@ -640,7 +640,7 @@ protected PublisherStub build(io.grpc.Channel channel, io.grpc.CallOptions callO * *
      * Creates the given topic with the given name. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * 
*/ public void createTopic( @@ -816,7 +816,7 @@ protected PublisherBlockingStub build( * *
      * Creates the given topic with the given name. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * 
*/ public com.google.pubsub.v1.Topic createTopic(com.google.pubsub.v1.Topic request) { @@ -963,7 +963,7 @@ protected PublisherFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * *
      * Creates the given topic with the given name. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1271,9 +1271,9 @@ private static final class PublisherFileDescriptorSupplier private static final class PublisherMethodDescriptorSupplier extends PublisherBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - PublisherMethodDescriptorSupplier(String methodName) { + PublisherMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java index de291b4f6..3b11ea3dc 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java @@ -32,7 +32,7 @@ public final class SchemaServiceGrpc { private SchemaServiceGrpc() {} - public static final String SERVICE_NAME = "google.pubsub.v1.SchemaService"; + public static final java.lang.String SERVICE_NAME = "google.pubsub.v1.SchemaService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< @@ -1334,9 +1334,9 @@ private static final class SchemaServiceFileDescriptorSupplier private static final class SchemaServiceMethodDescriptorSupplier extends SchemaServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - SchemaServiceMethodDescriptorSupplier(String methodName) { + SchemaServiceMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java index db35d0a08..c90e438e8 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java @@ -34,7 +34,7 @@ public final class SubscriberGrpc { private SubscriberGrpc() {} - public static final String SERVICE_NAME = "google.pubsub.v1.Subscriber"; + public static final java.lang.String SERVICE_NAME = "google.pubsub.v1.Subscriber"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< @@ -742,15 +742,15 @@ public interface AsyncService { * *
      * Creates a subscription to a given topic. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * If the subscription already exists, returns `ALREADY_EXISTS`.
      * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
      * If the name is not provided in the request, the server will assign a random
      * name for this subscription on the same project as the topic, conforming
      * to the [resource name format]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
-     * name is populated in the returned Subscription object. Note that for REST
-     * API requests, you must specify a name in the request.
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
+     * generated name is populated in the returned Subscription object. Note that
+     * for REST API requests, you must specify a name in the request.
      * 
*/ default void createSubscription( @@ -962,7 +962,7 @@ default void listSnapshots( * the request, the server will assign a random * name for this snapshot on the same project as the subscription, conforming * to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The * generated name is populated in the returned Snapshot object. Note that for * REST API requests, you must specify a name in the request. * @@ -1075,15 +1075,15 @@ protected SubscriberStub build(io.grpc.Channel channel, io.grpc.CallOptions call * *
      * Creates a subscription to a given topic. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * If the subscription already exists, returns `ALREADY_EXISTS`.
      * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
      * If the name is not provided in the request, the server will assign a random
      * name for this subscription on the same project as the topic, conforming
      * to the [resource name format]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
-     * name is populated in the returned Subscription object. Note that for REST
-     * API requests, you must specify a name in the request.
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
+     * generated name is populated in the returned Subscription object. Note that
+     * for REST API requests, you must specify a name in the request.
      * 
*/ public void createSubscription( @@ -1316,7 +1316,7 @@ public void listSnapshots( * the request, the server will assign a random * name for this snapshot on the same project as the subscription, conforming * to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The * generated name is populated in the returned Snapshot object. Note that for * REST API requests, you must specify a name in the request. * @@ -1421,15 +1421,15 @@ protected SubscriberBlockingStub build( * *
      * Creates a subscription to a given topic. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * If the subscription already exists, returns `ALREADY_EXISTS`.
      * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
      * If the name is not provided in the request, the server will assign a random
      * name for this subscription on the same project as the topic, conforming
      * to the [resource name format]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
-     * name is populated in the returned Subscription object. Note that for REST
-     * API requests, you must specify a name in the request.
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
+     * generated name is populated in the returned Subscription object. Note that
+     * for REST API requests, you must specify a name in the request.
      * 
*/ public com.google.pubsub.v1.Subscription createSubscription( @@ -1609,7 +1609,7 @@ public com.google.pubsub.v1.ListSnapshotsResponse listSnapshots( * the request, the server will assign a random * name for this snapshot on the same project as the subscription, conforming * to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The * generated name is populated in the returned Snapshot object. Note that for * REST API requests, you must specify a name in the request. * @@ -1702,15 +1702,15 @@ protected SubscriberFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * *
      * Creates a subscription to a given topic. See the [resource name rules]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
      * If the subscription already exists, returns `ALREADY_EXISTS`.
      * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
      * If the name is not provided in the request, the server will assign a random
      * name for this subscription on the same project as the topic, conforming
      * to the [resource name format]
-     * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
-     * name is populated in the returned Subscription object. Note that for REST
-     * API requests, you must specify a name in the request.
+     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
+     * generated name is populated in the returned Subscription object. Note that
+     * for REST API requests, you must specify a name in the request.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1894,7 +1894,7 @@ protected SubscriberFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * the request, the server will assign a random * name for this snapshot on the same project as the subscription, conforming * to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The * generated name is populated in the returned Snapshot object. Note that for * REST API requests, you must specify a name in the request. * @@ -2221,9 +2221,9 @@ private static final class SubscriberFileDescriptorSupplier private static final class SubscriberMethodDescriptorSupplier extends SubscriberBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - SubscriberMethodDescriptorSupplier(String methodName) { + SubscriberMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/owlbot.py b/owlbot.py index 0d280ad71..69cab5df9 100644 --- a/owlbot.py +++ b/owlbot.py @@ -1209,5 +1209,6 @@ ".github/workflows/samples.yaml", ".kokoro/build.sh", ".github/sync-repo-settings.yaml", + ".github/blunderbuss.yml", ] ) diff --git a/pom.xml b/pom.xml index 86915bf1b..f6022a64f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.7 + 1.6.1 @@ -61,7 +61,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.13.1 + 3.20.0 pom import @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.105.20-SNAPSHOT + 1.107.14-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.105.20-SNAPSHOT + 1.107.14-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT @@ -98,7 +98,7 @@ org.easymock easymock - 5.1.0 + 5.2.0 test @@ -172,7 +172,6 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 html diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index 07fd5a36d..4dff24db3 100644 --- a/proto-google-cloud-pubsub-v1/pom.xml +++ b/proto-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.105.20-SNAPSHOT + 1.107.14-SNAPSHOT proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java index 536ed0caf..2683f75df 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java @@ -333,11 +333,12 @@ public com.google.protobuf.ByteString getTableBytes() { * * *
-   * When true, use the topic's schema as the columns to write to in BigQuery,
-   * if it exists.
+   * Optional. When true, use the topic's schema as the columns to write to in
+   * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
+   * enabled at the same time.
    * 
* - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @@ -431,6 +432,26 @@ public com.google.pubsub.v1.BigQueryConfig.State getState() { return result == null ? com.google.pubsub.v1.BigQueryConfig.State.UNRECOGNIZED : result; } + public static final int USE_TABLE_SCHEMA_FIELD_NUMBER = 6; + private boolean useTableSchema_ = false; + /** + * + * + *
+   * Optional. When true, use the BigQuery table's schema as the columns to
+   * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
+   * enabled at the same time.
+   * 
+ * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useTableSchema. + */ + @java.lang.Override + public boolean getUseTableSchema() { + return useTableSchema_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -460,6 +481,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (state_ != com.google.pubsub.v1.BigQueryConfig.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(5, state_); } + if (useTableSchema_ != false) { + output.writeBool(6, useTableSchema_); + } getUnknownFields().writeTo(output); } @@ -484,6 +508,9 @@ public int getSerializedSize() { if (state_ != com.google.pubsub.v1.BigQueryConfig.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); } + if (useTableSchema_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, useTableSchema_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -504,6 +531,7 @@ public boolean equals(final java.lang.Object obj) { if (getWriteMetadata() != other.getWriteMetadata()) return false; if (getDropUnknownFields() != other.getDropUnknownFields()) return false; if (state_ != other.state_) return false; + if (getUseTableSchema() != other.getUseTableSchema()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -525,6 +553,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDropUnknownFields()); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; + hash = (37 * hash) + USE_TABLE_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseTableSchema()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -668,6 +698,7 @@ public Builder clear() { writeMetadata_ = false; dropUnknownFields_ = false; state_ = 0; + useTableSchema_ = false; return this; } @@ -718,6 +749,9 @@ private void buildPartial0(com.google.pubsub.v1.BigQueryConfig result) { if (((from_bitField0_ & 0x00000010) != 0)) { result.state_ = state_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.useTableSchema_ = useTableSchema_; + } } @java.lang.Override @@ -782,6 +816,9 @@ public Builder mergeFrom(com.google.pubsub.v1.BigQueryConfig other) { if (other.state_ != 0) { setStateValue(other.getStateValue()); } + if (other.getUseTableSchema() != false) { + setUseTableSchema(other.getUseTableSchema()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -838,6 +875,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 40 + case 48: + { + useTableSchema_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -973,11 +1016,12 @@ public Builder setTableBytes(com.google.protobuf.ByteString value) { * * *
-     * When true, use the topic's schema as the columns to write to in BigQuery,
-     * if it exists.
+     * Optional. When true, use the topic's schema as the columns to write to in
+     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
+     * enabled at the same time.
      * 
* - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @@ -989,11 +1033,12 @@ public boolean getUseTopicSchema() { * * *
-     * When true, use the topic's schema as the columns to write to in BigQuery,
-     * if it exists.
+     * Optional. When true, use the topic's schema as the columns to write to in
+     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
+     * enabled at the same time.
      * 
* - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The useTopicSchema to set. * @return This builder for chaining. @@ -1009,11 +1054,12 @@ public Builder setUseTopicSchema(boolean value) { * * *
-     * When true, use the topic's schema as the columns to write to in BigQuery,
-     * if it exists.
+     * Optional. When true, use the topic's schema as the columns to write to in
+     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
+     * enabled at the same time.
      * 
* - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1259,6 +1305,65 @@ public Builder clearState() { return this; } + private boolean useTableSchema_; + /** + * + * + *
+     * Optional. When true, use the BigQuery table's schema as the columns to
+     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
+     * enabled at the same time.
+     * 
+ * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useTableSchema. + */ + @java.lang.Override + public boolean getUseTableSchema() { + return useTableSchema_; + } + /** + * + * + *
+     * Optional. When true, use the BigQuery table's schema as the columns to
+     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
+     * enabled at the same time.
+     * 
+ * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The useTableSchema to set. + * @return This builder for chaining. + */ + public Builder setUseTableSchema(boolean value) { + + useTableSchema_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When true, use the BigQuery table's schema as the columns to
+     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
+     * enabled at the same time.
+     * 
+ * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUseTableSchema() { + bitField0_ = (bitField0_ & ~0x00000020); + useTableSchema_ = false; + 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/BigQueryConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java index a498ded18..bc805214f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java @@ -54,11 +54,12 @@ public interface BigQueryConfigOrBuilder * * *
-   * When true, use the topic's schema as the columns to write to in BigQuery,
-   * if it exists.
+   * Optional. When true, use the topic's schema as the columns to write to in
+   * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
+   * enabled at the same time.
    * 
* - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @@ -128,4 +129,19 @@ public interface BigQueryConfigOrBuilder * @return The state. */ com.google.pubsub.v1.BigQueryConfig.State getState(); + + /** + * + * + *
+   * Optional. When true, use the BigQuery table's schema as the columns to
+   * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
+   * enabled at the same time.
+   * 
+ * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useTableSchema. + */ + boolean getUseTableSchema(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java index 8fb85ab64..a4532a62f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java @@ -682,7 +682,11 @@ public interface AvroConfigOrBuilder * *
      * When true, write the subscription name, message_id, publish_time,
-     * attributes, and ordering_key as additional fields in the output.
+     * attributes, and ordering_key as additional fields in the output. The
+     * subscription name, message_id, and publish_time fields are put in their
+     * own fields while all other message properties other than data (for
+     * example, an ordering_key, if present) are added as entries in the
+     * attributes map.
      * 
* * bool write_metadata = 1; @@ -741,7 +745,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
      * When true, write the subscription name, message_id, publish_time,
-     * attributes, and ordering_key as additional fields in the output.
+     * attributes, and ordering_key as additional fields in the output. The
+     * subscription name, message_id, and publish_time fields are put in their
+     * own fields while all other message properties other than data (for
+     * example, an ordering_key, if present) are added as entries in the
+     * attributes map.
      * 
* * bool write_metadata = 1; @@ -1104,7 +1112,11 @@ public Builder mergeFrom( * *
        * When true, write the subscription name, message_id, publish_time,
-       * attributes, and ordering_key as additional fields in the output.
+       * attributes, and ordering_key as additional fields in the output. The
+       * subscription name, message_id, and publish_time fields are put in their
+       * own fields while all other message properties other than data (for
+       * example, an ordering_key, if present) are added as entries in the
+       * attributes map.
        * 
* * bool write_metadata = 1; @@ -1120,7 +1132,11 @@ public boolean getWriteMetadata() { * *
        * When true, write the subscription name, message_id, publish_time,
-       * attributes, and ordering_key as additional fields in the output.
+       * attributes, and ordering_key as additional fields in the output. The
+       * subscription name, message_id, and publish_time fields are put in their
+       * own fields while all other message properties other than data (for
+       * example, an ordering_key, if present) are added as entries in the
+       * attributes map.
        * 
* * bool write_metadata = 1; @@ -1140,7 +1156,11 @@ public Builder setWriteMetadata(boolean value) { * *
        * When true, write the subscription name, message_id, publish_time,
-       * attributes, and ordering_key as additional fields in the output.
+       * attributes, and ordering_key as additional fields in the output. The
+       * subscription name, message_id, and publish_time fields are put in their
+       * own fields while all other message properties other than data (for
+       * example, an ordering_key, if present) are added as entries in the
+       * attributes map.
        * 
* * bool write_metadata = 1; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java index 58c4a1896..3918f5ca6 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java @@ -86,8 +86,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * @@ -116,8 +116,8 @@ public java.lang.String getName() { * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * @@ -746,8 +746,8 @@ public Builder mergeFrom( * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * @@ -775,8 +775,8 @@ public java.lang.String getName() { * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * @@ -804,8 +804,8 @@ public com.google.protobuf.ByteString getNameBytes() { * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * @@ -832,8 +832,8 @@ public Builder setName(java.lang.String value) { * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * @@ -856,8 +856,8 @@ public Builder clearName() { * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java index 2f24bc123..ee4a6d68f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java @@ -31,8 +31,8 @@ public interface CreateSnapshotRequestOrBuilder * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * @@ -50,8 +50,8 @@ public interface CreateSnapshotRequestOrBuilder * 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java index afec846d7..06c6e9aba 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java @@ -71,11 +71,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; @@ -89,11 +90,12 @@ public com.google.protobuf.ProtocolStringList getAllowedPersistenceRegionsList() * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; @@ -107,11 +109,12 @@ public int getAllowedPersistenceRegionsCount() { * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; @@ -126,11 +129,12 @@ public java.lang.String getAllowedPersistenceRegions(int index) { * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; @@ -513,11 +517,12 @@ private void ensureAllowedPersistenceRegionsIsMutable() { * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; @@ -532,11 +537,12 @@ public com.google.protobuf.ProtocolStringList getAllowedPersistenceRegionsList() * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; @@ -550,11 +556,12 @@ public int getAllowedPersistenceRegionsCount() { * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; @@ -569,11 +576,12 @@ public java.lang.String getAllowedPersistenceRegions(int index) { * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; @@ -588,11 +596,12 @@ public com.google.protobuf.ByteString getAllowedPersistenceRegionsBytes(int inde * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; @@ -615,11 +624,12 @@ public Builder setAllowedPersistenceRegions(int index, java.lang.String value) { * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; @@ -641,11 +651,12 @@ public Builder addAllowedPersistenceRegions(java.lang.String value) { * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; @@ -664,11 +675,12 @@ public Builder addAllAllowedPersistenceRegions(java.lang.Iterable - * A list of IDs of GCP regions where messages that are published to the topic - * may be persisted in storage. Messages published by publishers running in - * non-allowed GCP regions (or running outside of GCP altogether) will be - * routed for storage in one of the allowed regions. An empty list means that - * no regions are allowed, and is not a valid configuration. + * A list of IDs of Google Cloud regions where messages that are published + * to the topic may be persisted in storage. Messages published by publishers + * running in non-allowed Google Cloud regions (or running outside of Google + * Cloud altogether) are routed for storage in one of the allowed regions. + * An empty list means that no regions are allowed, and is not a valid + * configuration. * * * repeated string allowed_persistence_regions = 1; @@ -686,11 +698,12 @@ public Builder clearAllowedPersistenceRegions() { * * *
-     * A list of IDs of GCP regions where messages that are published to the topic
-     * may be persisted in storage. Messages published by publishers running in
-     * non-allowed GCP regions (or running outside of GCP altogether) will be
-     * routed for storage in one of the allowed regions. An empty list means that
-     * no regions are allowed, and is not a valid configuration.
+     * A list of IDs of Google Cloud regions where messages that are published
+     * to the topic may be persisted in storage. Messages published by publishers
+     * running in non-allowed Google Cloud regions (or running outside of Google
+     * Cloud altogether) are routed for storage in one of the allowed regions.
+     * An empty list means that no regions are allowed, and is not a valid
+     * configuration.
      * 
* * repeated string allowed_persistence_regions = 1; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java index 8edf41faa..5f075aca0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java @@ -27,11 +27,12 @@ public interface MessageStoragePolicyOrBuilder * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; @@ -43,11 +44,12 @@ public interface MessageStoragePolicyOrBuilder * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; @@ -59,11 +61,12 @@ public interface MessageStoragePolicyOrBuilder * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; @@ -76,11 +79,12 @@ public interface MessageStoragePolicyOrBuilder * * *
-   * A list of IDs of GCP regions where messages that are published to the topic
-   * may be persisted in storage. Messages published by publishers running in
-   * non-allowed GCP regions (or running outside of GCP altogether) will be
-   * routed for storage in one of the allowed regions. An empty list means that
-   * no regions are allowed, and is not a valid configuration.
+   * A list of IDs of Google Cloud regions where messages that are published
+   * to the topic may be persisted in storage. Messages published by publishers
+   * running in non-allowed Google Cloud regions (or running outside of Google
+   * Cloud altogether) are routed for storage in one of the allowed regions.
+   * An empty list means that no regions are allowed, and is not a valid
+   * configuration.
    * 
* * repeated string allowed_persistence_regions = 1; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java index 2db62c0e7..d04475ab0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java @@ -127,7 +127,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { ProjectName that = ((ProjectName) o); return Objects.equals(this.project, that.project); } 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 fcb75b41f..b680117a0 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 @@ -383,230 +383,231 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "dience\030\002 \001(\t\032\017\n\rPubsubWrapper\032#\n\tNoWrapp" + "er\022\026\n\016write_metadata\030\001 \001(\010\0321\n\017Attributes" + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n" - + "\025authentication_methodB\t\n\007wrapper\"\222\002\n\016Bi" - + "gQueryConfig\022\r\n\005table\030\001 \001(\t\022\030\n\020use_topic" - + "_schema\030\002 \001(\010\022\026\n\016write_metadata\030\003 \001(\010\022\033\n" - + "\023drop_unknown_fields\030\004 \001(\010\022;\n\005state\030\005 \001(" - + "\0162&.google.pubsub.v1.BigQueryConfig.Stat" - + "eB\004\342A\001\003\"e\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" - + "\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r\n\tNO" - + "T_FOUND\020\003\022\023\n\017SCHEMA_MISMATCH\020\004\"\210\004\n\022Cloud" - + "StorageConfig\022\024\n\006bucket\030\001 \001(\tB\004\342A\001\002\022\027\n\017f" - + "ilename_prefix\030\002 \001(\t\022\027\n\017filename_suffix\030" - + "\003 \001(\t\022F\n\013text_config\030\004 \001(\0132/.google.pubs" - + "ub.v1.CloudStorageConfig.TextConfigH\000\022F\n" - + "\013avro_config\030\005 \001(\0132/.google.pubsub.v1.Cl" - + "oudStorageConfig.AvroConfigH\000\022/\n\014max_dur" - + "ation\030\006 \001(\0132\031.google.protobuf.Duration\022\021" - + "\n\tmax_bytes\030\007 \001(\003\022?\n\005state\030\t \001(\0162*.googl" - + "e.pubsub.v1.CloudStorageConfig.StateB\004\342A" - + "\001\003\032\014\n\nTextConfig\032$\n\nAvroConfig\022\026\n\016write_" - + "metadata\030\001 \001(\010\"P\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020" - + "\002\022\r\n\tNOT_FOUND\020\003B\017\n\routput_format\"m\n\017Rec" - + "eivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030" - + "\002 \001(\0132\037.google.pubsub.v1.PubsubMessage\022\030" - + "\n\020delivery_attempt\030\003 \001(\005\"[\n\026GetSubscript" - + "ionRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A" - + "$\n\"pubsub.googleapis.com/Subscription\"\216\001" - + "\n\031UpdateSubscriptionRequest\022:\n\014subscript" - + "ion\030\001 \001(\0132\036.google.pubsub.v1.Subscriptio" - + "nB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.pr" - + "otobuf.FieldMaskB\004\342A\001\002\"\210\001\n\030ListSubscript" - + "ionsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002\372A-\n+c" - + "loudresourcemanager.googleapis.com/Proje" - + "ct\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\"k\n\031ListSubscriptionsResponse\0225\n\rsubscr" - + "iptions\030\001 \003(\0132\036.google.pubsub.v1.Subscri" - + "ption\022\027\n\017next_page_token\030\002 \001(\t\"^\n\031Delete" - + "SubscriptionRequest\022A\n\014subscription\030\001 \001(" - + "\tB+\342A\001\002\372A$\n\"pubsub.googleapis.com/Subscr" - + "iption\"\225\001\n\027ModifyPushConfigRequest\022A\n\014su" - + "bscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.google" - + "apis.com/Subscription\0227\n\013push_config\030\002 \001" - + "(\0132\034.google.pubsub.v1.PushConfigB\004\342A\001\002\"\220" - + "\001\n\013PullRequest\022A\n\014subscription\030\001 \001(\tB+\342A" - + "\001\002\372A$\n\"pubsub.googleapis.com/Subscriptio" - + "n\022\"\n\022return_immediately\030\002 \001(\010B\006\030\001\342A\001\001\022\032\n" - + "\014max_messages\030\003 \001(\005B\004\342A\001\002\"L\n\014PullRespons" - + "e\022<\n\021received_messages\030\001 \003(\0132!.google.pu" - + "bsub.v1.ReceivedMessage\"\230\001\n\030ModifyAckDea" - + "dlineRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002" + + "\025authentication_methodB\t\n\007wrapper\"\270\002\n\016Bi" + + "gQueryConfig\022\r\n\005table\030\001 \001(\t\022\036\n\020use_topic" + + "_schema\030\002 \001(\010B\004\342A\001\001\022\026\n\016write_metadata\030\003 " + + "\001(\010\022\033\n\023drop_unknown_fields\030\004 \001(\010\022;\n\005stat" + + "e\030\005 \001(\0162&.google.pubsub.v1.BigQueryConfi" + + "g.StateB\004\342A\001\003\022\036\n\020use_table_schema\030\006 \001(\010B" + + "\004\342A\001\001\"e\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r\n\tNOT_" + + "FOUND\020\003\022\023\n\017SCHEMA_MISMATCH\020\004\"\210\004\n\022CloudSt" + + "orageConfig\022\024\n\006bucket\030\001 \001(\tB\004\342A\001\002\022\027\n\017fil" + + "ename_prefix\030\002 \001(\t\022\027\n\017filename_suffix\030\003 " + + "\001(\t\022F\n\013text_config\030\004 \001(\0132/.google.pubsub" + + ".v1.CloudStorageConfig.TextConfigH\000\022F\n\013a" + + "vro_config\030\005 \001(\0132/.google.pubsub.v1.Clou" + + "dStorageConfig.AvroConfigH\000\022/\n\014max_durat" + + "ion\030\006 \001(\0132\031.google.protobuf.Duration\022\021\n\t" + + "max_bytes\030\007 \001(\003\022?\n\005state\030\t \001(\0162*.google." + + "pubsub.v1.CloudStorageConfig.StateB\004\342A\001\003" + + "\032\014\n\nTextConfig\032$\n\nAvroConfig\022\026\n\016write_me" + + "tadata\030\001 \001(\010\"P\n\005State\022\025\n\021STATE_UNSPECIFI" + + "ED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022" + + "\r\n\tNOT_FOUND\020\003B\017\n\routput_format\"m\n\017Recei" + + "vedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030\002 " + + "\001(\0132\037.google.pubsub.v1.PubsubMessage\022\030\n\020" + + "delivery_attempt\030\003 \001(\005\"[\n\026GetSubscriptio" + + "nRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\"\216\001\n\031" + + "UpdateSubscriptionRequest\022:\n\014subscriptio" + + "n\030\001 \001(\0132\036.google.pubsub.v1.SubscriptionB" + + "\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.prot" + + "obuf.FieldMaskB\004\342A\001\002\"\210\001\n\030ListSubscriptio" + + "nsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002\372A-\n+clo" + + "udresourcemanager.googleapis.com/Project" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"" + + "k\n\031ListSubscriptionsResponse\0225\n\rsubscrip" + + "tions\030\001 \003(\0132\036.google.pubsub.v1.Subscript" + + "ion\022\027\n\017next_page_token\030\002 \001(\t\"^\n\031DeleteSu" + + "bscriptionRequest\022A\n\014subscription\030\001 \001(\tB" + + "+\342A\001\002\372A$\n\"pubsub.googleapis.com/Subscrip" + + "tion\"\225\001\n\027ModifyPushConfigRequest\022A\n\014subs" + + "cription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.googleap" + + "is.com/Subscription\0227\n\013push_config\030\002 \001(\013" + + "2\034.google.pubsub.v1.PushConfigB\004\342A\001\002\"\220\001\n" + + "\013PullRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002" + "\372A$\n\"pubsub.googleapis.com/Subscription\022" - + "\025\n\007ack_ids\030\004 \003(\tB\004\342A\001\002\022\"\n\024ack_deadline_s" - + "econds\030\003 \001(\005B\004\342A\001\002\"n\n\022AcknowledgeRequest" - + "\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub." - + "googleapis.com/Subscription\022\025\n\007ack_ids\030\002" - + " \003(\tB\004\342A\001\002\"\253\002\n\024StreamingPullRequest\022A\n\014s" - + "ubscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.googl" - + "eapis.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022" - + "\037\n\027modify_deadline_seconds\030\003 \003(\005\022\037\n\027modi" - + "fy_deadline_ack_ids\030\004 \003(\t\022)\n\033stream_ack_" - + "deadline_seconds\030\005 \001(\005B\004\342A\001\002\022\021\n\tclient_i" - + "d\030\006 \001(\t\022 \n\030max_outstanding_messages\030\007 \001(" - + "\003\022\035\n\025max_outstanding_bytes\030\010 \001(\003\"\335\005\n\025Str" - + "eamingPullResponse\022<\n\021received_messages\030" - + "\001 \003(\0132!.google.pubsub.v1.ReceivedMessage" - + "\022a\n\030acknowledge_confirmation\030\005 \001(\0132?.goo" - + "gle.pubsub.v1.StreamingPullResponse.Ackn" - + "owledgeConfirmation\022o\n modify_ack_deadli" - + "ne_confirmation\030\003 \001(\0132E.google.pubsub.v1" - + ".StreamingPullResponse.ModifyAckDeadline" - + "Confirmation\022_\n\027subscription_properties\030" - + "\004 \001(\0132>.google.pubsub.v1.StreamingPullRe" - + "sponse.SubscriptionProperties\032\200\001\n\027Acknow" - + "ledgeConfirmation\022\017\n\007ack_ids\030\001 \003(\t\022\027\n\017in" - + "valid_ack_ids\030\002 \003(\t\022\031\n\021unordered_ack_ids" - + "\030\003 \003(\t\022 \n\030temporary_failed_ack_ids\030\004 \003(\t" - + "\032k\n\035ModifyAckDeadlineConfirmation\022\017\n\007ack" - + "_ids\030\001 \003(\t\022\027\n\017invalid_ack_ids\030\002 \003(\t\022 \n\030t" - + "emporary_failed_ack_ids\030\003 \003(\t\032a\n\026Subscri" - + "ptionProperties\022%\n\035exactly_once_delivery" - + "_enabled\030\001 \001(\010\022 \n\030message_ordering_enabl" - + "ed\030\002 \001(\010\"\205\002\n\025CreateSnapshotRequest\0225\n\004na" - + "me\030\001 \001(\tB\'\342A\001\002\372A \n\036pubsub.googleapis.com" - + "/Snapshot\022A\n\014subscription\030\002 \001(\tB+\342A\001\002\372A$" - + "\n\"pubsub.googleapis.com/Subscription\022C\n\006" - + "labels\030\003 \003(\01323.google.pubsub.v1.CreateSn" - + "apshotRequest.LabelsEntry\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\202\001\n\025Upd" - + "ateSnapshotRequest\0222\n\010snapshot\030\001 \001(\0132\032.g" - + "oogle.pubsub.v1.SnapshotB\004\342A\001\002\0225\n\013update" - + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB" - + "\004\342A\001\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topi" - + "c\030\002 \001(\tB \372A\035\n\033pubsub.googleapis.com/Topi" - + "c\022/\n\013expire_time\030\003 \001(\0132\032.google.protobuf" - + ".Timestamp\0226\n\006labels\030\004 \003(\0132&.google.pubs" - + "ub.v1.Snapshot.LabelsEntry\032-\n\013LabelsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036" - + "pubsub.googleapis.com/Snapshot\022\'projects" - + "/{project}/snapshots/{snapshot}\"O\n\022GetSn" - + "apshotRequest\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A " - + "\n\036pubsub.googleapis.com/Snapshot\"\204\001\n\024Lis" - + "tSnapshotsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002" - + "\372A-\n+cloudresourcemanager.googleapis.com" - + "/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" - + "n\030\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnap" - + "shots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022" - + "\027\n\017next_page_token\030\002 \001(\t\"R\n\025DeleteSnapsh" - + "otRequest\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A \n\036pu" - + "bsub.googleapis.com/Snapshot\"\277\001\n\013SeekReq" - + "uest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pub" - + "sub.googleapis.com/Subscription\022*\n\004time\030" - + "\002 \001(\0132\032.google.protobuf.TimestampH\000\0227\n\010s" - + "napshot\030\003 \001(\tB#\372A \n\036pubsub.googleapis.co" - + "m/SnapshotH\000B\010\n\006target\"\016\n\014SeekResponse2\270" - + "\013\n\tPublisher\022q\n\013CreateTopic\022\027.google.pub" - + "sub.v1.Topic\032\027.google.pubsub.v1.Topic\"0\332" - + "A\004name\202\323\344\223\002#\032\036/v1/{name=projects/*/topic" - + "s/*}:\001*\022\221\001\n\013UpdateTopic\022$.google.pubsub." - + "v1.UpdateTopicRequest\032\027.google.pubsub.v1" - + ".Topic\"C\332A\021topic,update_mask\202\323\344\223\002)2$/v1/" - + "{topic.name=projects/*/topics/*}:\001*\022\223\001\n\007" - + "Publish\022 .google.pubsub.v1.PublishReques" - + "t\032!.google.pubsub.v1.PublishResponse\"C\332A" - + "\016topic,messages\202\323\344\223\002,\"\'/v1/{topic=projec" - + "ts/*/topics/*}:publish:\001*\022w\n\010GetTopic\022!." - + "google.pubsub.v1.GetTopicRequest\032\027.googl" - + "e.pubsub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{" - + "topic=projects/*/topics/*}\022\212\001\n\nListTopic" - + "s\022#.google.pubsub.v1.ListTopicsRequest\032$" - + ".google.pubsub.v1.ListTopicsResponse\"1\332A" - + "\007project\202\323\344\223\002!\022\037/v1/{project=projects/*}" - + "/topics\022\272\001\n\026ListTopicSubscriptions\022/.goo" - + "gle.pubsub.v1.ListTopicSubscriptionsRequ" - + "est\0320.google.pubsub.v1.ListTopicSubscrip" - + "tionsResponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topi" - + "c=projects/*/topics/*}/subscriptions\022\252\001\n" - + "\022ListTopicSnapshots\022+.google.pubsub.v1.L" - + "istTopicSnapshotsRequest\032,.google.pubsub" - + ".v1.ListTopicSnapshotsResponse\"9\332A\005topic" - + "\202\323\344\223\002+\022)/v1/{topic=projects/*/topics/*}/" - + "snapshots\022|\n\013DeleteTopic\022$.google.pubsub" - + ".v1.DeleteTopicRequest\032\026.google.protobuf" - + ".Empty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=proje" - + "cts/*/topics/*}\022\255\001\n\022DetachSubscription\022+" - + ".google.pubsub.v1.DetachSubscriptionRequ" - + "est\032,.google.pubsub.v1.DetachSubscriptio" - + "nResponse\"<\202\323\344\223\0026\"4/v1/{subscription=pro" - + "jects/*/subscriptions/*}:detach\032p\312A\025pubs" - + "ub.googleapis.com\322AUhttps://www.googleap" - + "is.com/auth/cloud-platform,https://www.g" - + "oogleapis.com/auth/pubsub2\322\025\n\nSubscriber" - + "\022\264\001\n\022CreateSubscription\022\036.google.pubsub." - + "v1.Subscription\032\036.google.pubsub.v1.Subsc" - + "ription\"^\332A+name,topic,push_config,ack_d" - + "eadline_seconds\202\323\344\223\002*\032%/v1/{name=project" - + "s/*/subscriptions/*}:\001*\022\241\001\n\017GetSubscript" - + "ion\022(.google.pubsub.v1.GetSubscriptionRe" - + "quest\032\036.google.pubsub.v1.Subscription\"D\332" - + "A\014subscription\202\323\344\223\002/\022-/v1/{subscription=" - + "projects/*/subscriptions/*}\022\273\001\n\022UpdateSu" - + "bscription\022+.google.pubsub.v1.UpdateSubs" - + "criptionRequest\032\036.google.pubsub.v1.Subsc" - + "ription\"X\332A\030subscription,update_mask\202\323\344\223" - + "\002722/v1/{subscription.name=projects/*/su" - + "bscriptions/*}:\001*\022\246\001\n\021ListSubscriptions\022" - + "*.google.pubsub.v1.ListSubscriptionsRequ" - + "est\032+.google.pubsub.v1.ListSubscriptions" - + "Response\"8\332A\007project\202\323\344\223\002(\022&/v1/{project" - + "=projects/*}/subscriptions\022\237\001\n\022DeleteSub" - + "scription\022+.google.pubsub.v1.DeleteSubsc" - + "riptionRequest\032\026.google.protobuf.Empty\"D" - + "\332A\014subscription\202\323\344\223\002/*-/v1/{subscription" - + "=projects/*/subscriptions/*}\022\317\001\n\021ModifyA" - + "ckDeadline\022*.google.pubsub.v1.ModifyAckD" - + "eadlineRequest\032\026.google.protobuf.Empty\"v" - + "\332A)subscription,ack_ids,ack_deadline_sec" - + "onds\202\323\344\223\002D\"?/v1/{subscription=projects/*" - + "/subscriptions/*}:modifyAckDeadline:\001*\022\250" - + "\001\n\013Acknowledge\022$.google.pubsub.v1.Acknow" - + "ledgeRequest\032\026.google.protobuf.Empty\"[\332A" - + "\024subscription,ack_ids\202\323\344\223\002>\"9/v1/{subscr" - + "iption=projects/*/subscriptions/*}:ackno" - + "wledge:\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.Pu" - + "llRequest\032\036.google.pubsub.v1.PullRespons" - + "e\"\210\001\332A,subscription,return_immediately,m" - + "ax_messages\332A\031subscription,max_messages\202" - + "\323\344\223\0027\"2/v1/{subscription=projects/*/subs" - + "criptions/*}:pull:\001*\022f\n\rStreamingPull\022&." - + "google.pubsub.v1.StreamingPullRequest\032\'." - + "google.pubsub.v1.StreamingPullResponse\"\000" - + "(\0010\001\022\273\001\n\020ModifyPushConfig\022).google.pubsu" - + "b.v1.ModifyPushConfigRequest\032\026.google.pr" - + "otobuf.Empty\"d\332A\030subscription,push_confi" - + "g\202\323\344\223\002C\">/v1/{subscription=projects/*/su" - + "bscriptions/*}:modifyPushConfig:\001*\022\211\001\n\013G" - + "etSnapshot\022$.google.pubsub.v1.GetSnapsho" - + "tRequest\032\032.google.pubsub.v1.Snapshot\"8\332A" - + "\010snapshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/" - + "*/snapshots/*}\022\226\001\n\rListSnapshots\022&.googl" - + "e.pubsub.v1.ListSnapshotsRequest\032\'.googl" - + "e.pubsub.v1.ListSnapshotsResponse\"4\332A\007pr" - + "oject\202\323\344\223\002$\022\"/v1/{project=projects/*}/sn" - + "apshots\022\227\001\n\016CreateSnapshot\022\'.google.pubs" - + "ub.v1.CreateSnapshotRequest\032\032.google.pub" - + "sub.v1.Snapshot\"@\332A\021name,subscription\202\323\344" - + "\223\002&\032!/v1/{name=projects/*/snapshots/*}:\001" - + "*\022\243\001\n\016UpdateSnapshot\022\'.google.pubsub.v1." - + "UpdateSnapshotRequest\032\032.google.pubsub.v1" - + ".Snapshot\"L\332A\024snapshot,update_mask\202\323\344\223\002/" - + "2*/v1/{snapshot.name=projects/*/snapshot" - + "s/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubs" - + "ub.v1.DeleteSnapshotRequest\032\026.google.pro" - + "tobuf.Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{sna" - + "pshot=projects/*/snapshots/*}\022\204\001\n\004Seek\022\035" - + ".google.pubsub.v1.SeekRequest\032\036.google.p" - + "ubsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subs" - + "cription=projects/*/subscriptions/*}:see" - + "k:\001*\032p\312A\025pubsub.googleapis.com\322AUhttps:/" - + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/pubsubB\252" - + "\001\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z2" - + "cloud.google.com/go/pubsub/apiv1/pubsubp" - + "b;pubsubpb\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002" - + "\026Google\\Cloud\\PubSub\\V1\352\002\031Google::Cloud:" - + ":PubSub::V1b\006proto3" + + "\"\n\022return_immediately\030\002 \001(\010B\006\030\001\342A\001\001\022\032\n\014m" + + "ax_messages\030\003 \001(\005B\004\342A\001\002\"L\n\014PullResponse\022" + + "<\n\021received_messages\030\001 \003(\0132!.google.pubs" + + "ub.v1.ReceivedMessage\"\230\001\n\030ModifyAckDeadl" + + "ineRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A" + + "$\n\"pubsub.googleapis.com/Subscription\022\025\n" + + "\007ack_ids\030\004 \003(\tB\004\342A\001\002\022\"\n\024ack_deadline_sec" + + "onds\030\003 \001(\005B\004\342A\001\002\"n\n\022AcknowledgeRequest\022A" + + "\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.go" + + "ogleapis.com/Subscription\022\025\n\007ack_ids\030\002 \003" + + "(\tB\004\342A\001\002\"\253\002\n\024StreamingPullRequest\022A\n\014sub" + + "scription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.googlea" + + "pis.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n" + + "\027modify_deadline_seconds\030\003 \003(\005\022\037\n\027modify" + + "_deadline_ack_ids\030\004 \003(\t\022)\n\033stream_ack_de" + + "adline_seconds\030\005 \001(\005B\004\342A\001\002\022\021\n\tclient_id\030" + + "\006 \001(\t\022 \n\030max_outstanding_messages\030\007 \001(\003\022" + + "\035\n\025max_outstanding_bytes\030\010 \001(\003\"\335\005\n\025Strea" + + "mingPullResponse\022<\n\021received_messages\030\001 " + + "\003(\0132!.google.pubsub.v1.ReceivedMessage\022a" + + "\n\030acknowledge_confirmation\030\005 \001(\0132?.googl" + + "e.pubsub.v1.StreamingPullResponse.Acknow" + + "ledgeConfirmation\022o\n modify_ack_deadline" + + "_confirmation\030\003 \001(\0132E.google.pubsub.v1.S" + + "treamingPullResponse.ModifyAckDeadlineCo" + + "nfirmation\022_\n\027subscription_properties\030\004 " + + "\001(\0132>.google.pubsub.v1.StreamingPullResp" + + "onse.SubscriptionProperties\032\200\001\n\027Acknowle" + + "dgeConfirmation\022\017\n\007ack_ids\030\001 \003(\t\022\027\n\017inva" + + "lid_ack_ids\030\002 \003(\t\022\031\n\021unordered_ack_ids\030\003" + + " \003(\t\022 \n\030temporary_failed_ack_ids\030\004 \003(\t\032k" + + "\n\035ModifyAckDeadlineConfirmation\022\017\n\007ack_i" + + "ds\030\001 \003(\t\022\027\n\017invalid_ack_ids\030\002 \003(\t\022 \n\030tem" + + "porary_failed_ack_ids\030\003 \003(\t\032a\n\026Subscript" + + "ionProperties\022%\n\035exactly_once_delivery_e" + + "nabled\030\001 \001(\010\022 \n\030message_ordering_enabled" + + "\030\002 \001(\010\"\205\002\n\025CreateSnapshotRequest\0225\n\004name" + + "\030\001 \001(\tB\'\342A\001\002\372A \n\036pubsub.googleapis.com/S" + + "napshot\022A\n\014subscription\030\002 \001(\tB+\342A\001\002\372A$\n\"" + + "pubsub.googleapis.com/Subscription\022C\n\006la" + + "bels\030\003 \003(\01323.google.pubsub.v1.CreateSnap" + + "shotRequest.LabelsEntry\032-\n\013LabelsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\202\001\n\025Updat" + + "eSnapshotRequest\0222\n\010snapshot\030\001 \001(\0132\032.goo" + + "gle.pubsub.v1.SnapshotB\004\342A\001\002\0225\n\013update_m" + + "ask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\004\342" + + "A\001\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topic\030" + + "\002 \001(\tB \372A\035\n\033pubsub.googleapis.com/Topic\022" + + "/\n\013expire_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestamp\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:L\352AI\n\036pu" + + "bsub.googleapis.com/Snapshot\022\'projects/{" + + "project}/snapshots/{snapshot}\"O\n\022GetSnap" + + "shotRequest\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A \n\036" + + "pubsub.googleapis.com/Snapshot\"\204\001\n\024ListS" + + "napshotsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002\372A" + + "-\n+cloudresourcemanager.googleapis.com/P" + + "roject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" + + "\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapsh" + + "ots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n" + + "\017next_page_token\030\002 \001(\t\"R\n\025DeleteSnapshot" + + "Request\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A \n\036pubs" + + "ub.googleapis.com/Snapshot\"\277\001\n\013SeekReque" + + "st\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsu" + + "b.googleapis.com/Subscription\022*\n\004time\030\002 " + + "\001(\0132\032.google.protobuf.TimestampH\000\0227\n\010sna" + + "pshot\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/" + + "SnapshotH\000B\010\n\006target\"\016\n\014SeekResponse2\270\013\n" + + "\tPublisher\022q\n\013CreateTopic\022\027.google.pubsu" + + "b.v1.Topic\032\027.google.pubsub.v1.Topic\"0\332A\004" + + "name\202\323\344\223\002#\032\036/v1/{name=projects/*/topics/" + + "*}:\001*\022\221\001\n\013UpdateTopic\022$.google.pubsub.v1" + + ".UpdateTopicRequest\032\027.google.pubsub.v1.T" + + "opic\"C\332A\021topic,update_mask\202\323\344\223\002)2$/v1/{t" + + "opic.name=projects/*/topics/*}:\001*\022\223\001\n\007Pu" + + "blish\022 .google.pubsub.v1.PublishRequest\032" + + "!.google.pubsub.v1.PublishResponse\"C\332A\016t" + + "opic,messages\202\323\344\223\002,\"\'/v1/{topic=projects" + + "/*/topics/*}:publish:\001*\022w\n\010GetTopic\022!.go" + + "ogle.pubsub.v1.GetTopicRequest\032\027.google." + + "pubsub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{to" + + "pic=projects/*/topics/*}\022\212\001\n\nListTopics\022" + + "#.google.pubsub.v1.ListTopicsRequest\032$.g" + + "oogle.pubsub.v1.ListTopicsResponse\"1\332A\007p" + + "roject\202\323\344\223\002!\022\037/v1/{project=projects/*}/t" + + "opics\022\272\001\n\026ListTopicSubscriptions\022/.googl" + + "e.pubsub.v1.ListTopicSubscriptionsReques" + + "t\0320.google.pubsub.v1.ListTopicSubscripti" + + "onsResponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topic=" + + "projects/*/topics/*}/subscriptions\022\252\001\n\022L" + + "istTopicSnapshots\022+.google.pubsub.v1.Lis" + + "tTopicSnapshotsRequest\032,.google.pubsub.v" + + "1.ListTopicSnapshotsResponse\"9\332A\005topic\202\323" + + "\344\223\002+\022)/v1/{topic=projects/*/topics/*}/sn" + + "apshots\022|\n\013DeleteTopic\022$.google.pubsub.v" + + "1.DeleteTopicRequest\032\026.google.protobuf.E" + + "mpty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=project" + + "s/*/topics/*}\022\255\001\n\022DetachSubscription\022+.g" + + "oogle.pubsub.v1.DetachSubscriptionReques" + + "t\032,.google.pubsub.v1.DetachSubscriptionR" + + "esponse\"<\202\323\344\223\0026\"4/v1/{subscription=proje" + + "cts/*/subscriptions/*}:detach\032p\312A\025pubsub" + + ".googleapis.com\322AUhttps://www.googleapis" + + ".com/auth/cloud-platform,https://www.goo" + + "gleapis.com/auth/pubsub2\322\025\n\nSubscriber\022\264" + + "\001\n\022CreateSubscription\022\036.google.pubsub.v1" + + ".Subscription\032\036.google.pubsub.v1.Subscri" + + "ption\"^\332A+name,topic,push_config,ack_dea" + + "dline_seconds\202\323\344\223\002*\032%/v1/{name=projects/" + + "*/subscriptions/*}:\001*\022\241\001\n\017GetSubscriptio" + + "n\022(.google.pubsub.v1.GetSubscriptionRequ" + + "est\032\036.google.pubsub.v1.Subscription\"D\332A\014" + + "subscription\202\323\344\223\002/\022-/v1/{subscription=pr" + + "ojects/*/subscriptions/*}\022\273\001\n\022UpdateSubs" + + "cription\022+.google.pubsub.v1.UpdateSubscr" + + "iptionRequest\032\036.google.pubsub.v1.Subscri" + + "ption\"X\332A\030subscription,update_mask\202\323\344\223\0027" + + "22/v1/{subscription.name=projects/*/subs" + + "criptions/*}:\001*\022\246\001\n\021ListSubscriptions\022*." + + "google.pubsub.v1.ListSubscriptionsReques" + + "t\032+.google.pubsub.v1.ListSubscriptionsRe" + + "sponse\"8\332A\007project\202\323\344\223\002(\022&/v1/{project=p" + + "rojects/*}/subscriptions\022\237\001\n\022DeleteSubsc" + + "ription\022+.google.pubsub.v1.DeleteSubscri" + + "ptionRequest\032\026.google.protobuf.Empty\"D\332A" + + "\014subscription\202\323\344\223\002/*-/v1/{subscription=p" + + "rojects/*/subscriptions/*}\022\317\001\n\021ModifyAck" + + "Deadline\022*.google.pubsub.v1.ModifyAckDea" + + "dlineRequest\032\026.google.protobuf.Empty\"v\332A" + + ")subscription,ack_ids,ack_deadline_secon" + + "ds\202\323\344\223\002D\"?/v1/{subscription=projects/*/s" + + "ubscriptions/*}:modifyAckDeadline:\001*\022\250\001\n" + + "\013Acknowledge\022$.google.pubsub.v1.Acknowle" + + "dgeRequest\032\026.google.protobuf.Empty\"[\332A\024s" + + "ubscription,ack_ids\202\323\344\223\002>\"9/v1/{subscrip" + + "tion=projects/*/subscriptions/*}:acknowl" + + "edge:\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.Pull" + + "Request\032\036.google.pubsub.v1.PullResponse\"" + + "\210\001\332A,subscription,return_immediately,max" + + "_messages\332A\031subscription,max_messages\202\323\344" + + "\223\0027\"2/v1/{subscription=projects/*/subscr" + + "iptions/*}:pull:\001*\022f\n\rStreamingPull\022&.go" + + "ogle.pubsub.v1.StreamingPullRequest\032\'.go" + + "ogle.pubsub.v1.StreamingPullResponse\"\000(\001" + + "0\001\022\273\001\n\020ModifyPushConfig\022).google.pubsub." + + "v1.ModifyPushConfigRequest\032\026.google.prot" + + "obuf.Empty\"d\332A\030subscription,push_config\202" + + "\323\344\223\002C\">/v1/{subscription=projects/*/subs" + + "criptions/*}:modifyPushConfig:\001*\022\211\001\n\013Get" + + "Snapshot\022$.google.pubsub.v1.GetSnapshotR" + + "equest\032\032.google.pubsub.v1.Snapshot\"8\332A\010s" + + "napshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/" + + "snapshots/*}\022\226\001\n\rListSnapshots\022&.google." + + "pubsub.v1.ListSnapshotsRequest\032\'.google." + + "pubsub.v1.ListSnapshotsResponse\"4\332A\007proj" + + "ect\202\323\344\223\002$\022\"/v1/{project=projects/*}/snap" + + "shots\022\227\001\n\016CreateSnapshot\022\'.google.pubsub" + + ".v1.CreateSnapshotRequest\032\032.google.pubsu" + + "b.v1.Snapshot\"@\332A\021name,subscription\202\323\344\223\002" + + "&\032!/v1/{name=projects/*/snapshots/*}:\001*\022" + + "\243\001\n\016UpdateSnapshot\022\'.google.pubsub.v1.Up" + + "dateSnapshotRequest\032\032.google.pubsub.v1.S" + + "napshot\"L\332A\024snapshot,update_mask\202\323\344\223\002/2*" + + "/v1/{snapshot.name=projects/*/snapshots/" + + "*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubsub" + + ".v1.DeleteSnapshotRequest\032\026.google.proto" + + "buf.Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{snaps" + + "hot=projects/*/snapshots/*}\022\204\001\n\004Seek\022\035.g" + + "oogle.pubsub.v1.SeekRequest\032\036.google.pub" + + "sub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subscr" + + "iption=projects/*/subscriptions/*}:seek:" + + "\001*\032p\312A\025pubsub.googleapis.com\322AUhttps://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/pubsubB\252\001\n" + + "\024com.google.pubsub.v1B\013PubsubProtoP\001Z2cl" + + "oud.google.com/go/pubsub/apiv1/pubsubpb;" + + "pubsubpb\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026G" + + "oogle\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::P" + + "ubSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -884,7 +885,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_BigQueryConfig_descriptor, new java.lang.String[] { - "Table", "UseTopicSchema", "WriteMetadata", "DropUnknownFields", "State", + "Table", + "UseTopicSchema", + "WriteMetadata", + "DropUnknownFields", + "State", + "UseTableSchema", }); internal_static_google_pubsub_v1_CloudStorageConfig_descriptor = getDescriptor().getMessageTypes().get(23); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java index fac062007..30c5431b8 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java @@ -136,7 +136,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { *
* * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1222 + * google/pubsub/v1/pubsub.proto;l=1233 * @return The returnImmediately. */ @java.lang.Override @@ -687,7 +687,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { *
* * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1222 + * google/pubsub/v1/pubsub.proto;l=1233 * @return The returnImmediately. */ @java.lang.Override @@ -713,7 +713,7 @@ public boolean getReturnImmediately() { *
* * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1222 + * google/pubsub/v1/pubsub.proto;l=1233 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -743,7 +743,7 @@ public Builder setReturnImmediately(boolean value) { *
* * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1222 + * google/pubsub/v1/pubsub.proto;l=1233 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java index 5cb9c98a3..9f9ccf387 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java @@ -71,7 +71,7 @@ public interface PullRequestOrBuilder *
* * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1222 + * google/pubsub/v1/pubsub.proto;l=1233 * @return The returnImmediately. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java index 1b2c9a908..2d8968ddf 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SchemaName that = ((SchemaName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.schema, that.schema); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java index 2aba349b3..4642f2323 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SnapshotName that = ((SnapshotName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.snapshot, that.snapshot); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java index 8ed44f614..ad49b90dd 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SubscriptionName that = ((SubscriptionName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.subscription, that.subscription); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java index 8af73d814..6fc356a2b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java @@ -178,7 +178,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { TopicName that = ((TopicName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.topic, that.topic); } 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 9ff80f2f6..393893b10 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 @@ -44,7 +44,7 @@ service Publisher { "https://www.googleapis.com/auth/pubsub"; // Creates the given topic with the given name. See the [resource name rules] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). rpc CreateTopic(Topic) returns (Topic) { option (google.api.http) = { put: "/v1/{name=projects/*/topics/*}" @@ -137,11 +137,12 @@ service Publisher { // A policy constraining the storage of messages published to the topic. message MessageStoragePolicy { - // A list of IDs of GCP regions where messages that are published to the topic - // may be persisted in storage. Messages published by publishers running in - // non-allowed GCP regions (or running outside of GCP altogether) will be - // routed for storage in one of the allowed regions. An empty list means that - // no regions are allowed, and is not a valid configuration. + // A list of IDs of Google Cloud regions where messages that are published + // to the topic may be persisted in storage. Messages published by publishers + // running in non-allowed Google Cloud regions (or running outside of Google + // Cloud altogether) are routed for storage in one of the allowed regions. + // An empty list means that no regions are allowed, and is not a valid + // configuration. repeated string allowed_persistence_regions = 1; } @@ -430,16 +431,16 @@ service Subscriber { "https://www.googleapis.com/auth/pubsub"; // Creates a subscription to a given topic. See the [resource name rules] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). // If the subscription already exists, returns `ALREADY_EXISTS`. // If the corresponding topic doesn't exist, returns `NOT_FOUND`. // // If the name is not provided in the request, the server will assign a random // name for this subscription on the same project as the topic, conforming // to the [resource name format] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated - // name is populated in the returned Subscription object. Note that for REST - // API requests, you must specify a name in the request. + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The + // generated name is populated in the returned Subscription object. Note that + // for REST API requests, you must specify a name in the request. rpc CreateSubscription(Subscription) returns (Subscription) { option (google.api.http) = { put: "/v1/{name=projects/*/subscriptions/*}" @@ -592,7 +593,7 @@ service Subscriber { // the request, the server will assign a random // name for this snapshot on the same project as the subscription, conforming // to the [resource name format] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). The + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The // generated name is populated in the returned Snapshot object. Note that for // REST API requests, you must specify a name in the request. rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) { @@ -996,9 +997,10 @@ message BigQueryConfig { // {projectId}.{datasetId}.{tableId} string table = 1; - // When true, use the topic's schema as the columns to write to in BigQuery, - // if it exists. - bool use_topic_schema = 2; + // Optional. When true, use the topic's schema as the columns to write to in + // BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be + // enabled at the same time. + bool use_topic_schema = 2 [(google.api.field_behavior) = OPTIONAL]; // When true, write the subscription name, message_id, publish_time, // attributes, and ordering_key to additional columns in the table. The @@ -1017,6 +1019,11 @@ message BigQueryConfig { // Output only. An output-only field that indicates whether or not the // subscription can receive messages. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. When true, use the BigQuery table's schema as the columns to + // write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be + // enabled at the same time. + bool use_table_schema = 6 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for a Cloud Storage subscription. @@ -1030,7 +1037,11 @@ message CloudStorageConfig { // Message payloads and metadata will be written to files as an Avro binary. message AvroConfig { // When true, write the subscription name, message_id, publish_time, - // attributes, and ordering_key as additional fields in the output. + // attributes, and ordering_key as additional fields in the output. The + // subscription name, message_id, and publish_time fields are put in their + // own fields while all other message properties other than data (for + // example, an ordering_key, if present) are added as entries in the + // attributes map. bool write_metadata = 1; } @@ -1425,8 +1436,8 @@ message CreateSnapshotRequest { // 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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - // is `projects/{project}/snapshots/{snap}`. + // rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + // Format is `projects/{project}/snapshots/{snap}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } diff --git a/renovate.json b/renovate.json index 6686189a1..977082821 100644 --- a/renovate.json +++ b/renovate.json @@ -10,7 +10,10 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], - "ignorePaths": [".kokoro/requirements.txt"], + "ignorePaths": [ + ".kokoro/requirements.txt", + ".github/workflows/**" + ], "packageRules": [ { "packagePatterns": [ diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d99e15929..5c1280ed1 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -44,20 +44,20 @@ com.google.cloud google-cloud-pubsub - 1.123.18 + 1.125.13 org.apache.avro avro - 1.11.2 + 1.11.3 compile org.xerial.snappy snappy-java - 1.1.10.3 + 1.1.10.5 @@ -75,17 +75,22 @@ com.google.protobuf protobuf-java-util - 3.23.4 + 3.25.1 com.google.cloud google-cloud-core - 2.21.1 + 2.28.0 tests com.google.cloud google-cloud-bigquery + 2.34.2 + + + com.google.cloud + google-cloud-storage 2.30.1
@@ -96,7 +101,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.4.0 + 3.5.0 add-snippets-source diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 40bd15b83..ee24544d0 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -30,7 +30,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.google.cloud libraries-bom - 26.19.0 + 26.28.0 pom import @@ -79,7 +79,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.maven.plugins maven-dependency-plugin - 3.6.0 + 3.6.1 copy-dependencies @@ -107,13 +107,13 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.junit.vintage junit-vintage-engine - 5.10.0 + 5.10.1 test org.graalvm.buildtools junit-platform-native - 0.9.23 + 0.9.28 test @@ -124,7 +124,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.maven.plugins maven-surefire-plugin - 3.1.2 + 3.2.2 **/*IT @@ -134,7 +134,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.graalvm.buildtools native-maven-plugin - 0.9.23 + 0.9.28 true pubsub.NativeImagePubSubSample diff --git a/samples/pom.xml b/samples/pom.xml index 10a43a507..678328275 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -75,7 +75,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.0 + 3.3.1 checkstyle-suppressions.xml diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f1cf6fafc..7d10cee54 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,25 +43,25 @@ com.google.cloud google-cloud-pubsub - 1.123.20-SNAPSHOT + 1.125.14-SNAPSHOT org.apache.avro avro - 1.11.2 + 1.11.3 compile org.xerial.snappy snappy-java - 1.1.10.3 + 1.1.10.5 com.google.protobuf protobuf-java-util - 3.23.4 + 3.25.1 @@ -79,12 +79,17 @@ com.google.cloud google-cloud-core - 2.21.1 + 2.28.0 tests com.google.cloud google-cloud-bigquery + 2.34.2 + + + com.google.cloud + google-cloud-storage 2.30.1 @@ -95,7 +100,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.4.0 + 3.5.0 add-snippets-source diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 2c4261707..75d493623 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 26.19.0 + 26.28.0 pom import @@ -63,20 +63,24 @@ com.google.cloud google-cloud-bigquery + + com.google.cloud + google-cloud-storage + org.apache.avro avro - 1.11.2 + 1.11.3 org.xerial.snappy snappy-java - 1.1.10.3 + 1.1.10.5 com.google.protobuf protobuf-java-util - 3.23.4 + 3.25.1 @@ -94,7 +98,7 @@ com.google.cloud google-cloud-core - 2.21.1 + 2.28.0 tests diff --git a/samples/snippets/src/main/java/pubsub/CreateCloudStorageSubscriptionExample.java b/samples/snippets/src/main/java/pubsub/CreateCloudStorageSubscriptionExample.java new file mode 100644 index 000000000..654ba3857 --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/CreateCloudStorageSubscriptionExample.java @@ -0,0 +1,78 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_create_cloud_storage_subscription] +import com.google.cloud.pubsub.v1.SubscriptionAdminClient; +import com.google.protobuf.Duration; +import com.google.pubsub.v1.CloudStorageConfig; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.Subscription; +import java.io.IOException; + +public class CreateCloudStorageSubscriptionExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + String subscriptionId = "your-subscription-id"; + String bucket = "your-bucket"; + String filenamePrefix = "log_events_"; + String filenameSuffix = ".text"; + Duration maxDuration = Duration.newBuilder().setSeconds(300).build(); + + createCloudStorageSubscription( + projectId, topicId, subscriptionId, bucket, filenamePrefix, filenameSuffix, maxDuration); + } + + public static void createCloudStorageSubscription( + String projectId, + String topicId, + String subscriptionId, + String bucket, + String filenamePrefix, + String filenameSuffix, + Duration maxDuration) + throws IOException { + try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { + + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + CloudStorageConfig cloudStorageConfig = + CloudStorageConfig.newBuilder() + .setBucket(bucket) + .setFilenamePrefix(filenamePrefix) + .setFilenameSuffix(filenameSuffix) + .setMaxDuration(maxDuration) + .build(); + + Subscription subscription = + subscriptionAdminClient.createSubscription( + Subscription.newBuilder() + .setName(subscriptionName.toString()) + .setTopic(topicName.toString()) + .setCloudStorageConfig(cloudStorageConfig) + .build()); + + System.out.println("Created a CloudStorage subscription: " + subscription.getAllFields()); + } + } +} +// [END pubsub_create_cloud_storage_subscription] diff --git a/samples/snippets/src/main/java/pubsub/CreatePushNoWrapperSubscriptionExample.java b/samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java similarity index 94% rename from samples/snippets/src/main/java/pubsub/CreatePushNoWrapperSubscriptionExample.java rename to samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java index 39e364ae6..d2fef4382 100644 --- a/samples/snippets/src/main/java/pubsub/CreatePushNoWrapperSubscriptionExample.java +++ b/samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java @@ -16,7 +16,7 @@ package pubsub; -// [START pubsub_create_push_no_wrapper_subscription] +// [START pubsub_create_unwrapped_push_subscription] import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.pubsub.v1.PushConfig; @@ -26,7 +26,7 @@ import com.google.pubsub.v1.TopicName; import java.io.IOException; -public class CreatePushNoWrapperSubscriptionExample { +public class CreateUnwrappedPushSubscriptionExample { public static void main(String... args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; @@ -60,4 +60,4 @@ public static void createPushSubscriptionExample( } } } -// [END pubsub_create_push_no_wrapper_subscription] +// [END pubsub_create_unwrapped_push_subscription] diff --git a/versions.txt b/versions.txt index cda983d01..7dbf465fd 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.123.19:1.123.20-SNAPSHOT -grpc-google-cloud-pubsub-v1:1.105.19:1.105.20-SNAPSHOT -proto-google-cloud-pubsub-v1:1.105.19:1.105.20-SNAPSHOT +google-cloud-pubsub:1.125.13:1.125.14-SNAPSHOT +grpc-google-cloud-pubsub-v1:1.107.13:1.107.14-SNAPSHOT +proto-google-cloud-pubsub-v1:1.107.13:1.107.14-SNAPSHOT