GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp

Option to disable topic existence verification in the Spring Cloud GCP Pub/Sub Binder

Open
#3,098 1 comment 0 reactions 0 assignees View on GitHub
priority: p2 type: enhancement
Dominant language
Java
Stars
551
Forks
349
Avg merge
1d 13h
Merged PRs (30d)
14

Description

When Spring Cloud Stream calls `provisionConsumerDestination` and `provisionProducerDestination` on the Spring Cloud GCP `PubSubChannelProvisioner`, the method `ensureTopicExists` is called and [invokes `pubsubAdmin.getTopic`](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blame/v5.4.1/spring-cloud-gcp-pubsub-stream-binder/src/main/java/com/google/cloud/spring/stream/binder/pubsub/provisioning/PubSubChannelProvisioner.java#L124). This can cause GCP quota issues if it occurs too often.

**Workaround**: Increase `spring.cloud.stream.dynamic-destination-cache-size`. ([Add'l documentation](https://docs.spring.io/spring-cloud-stream/reference/spring-cloud-stream/producing-and-consuming-messages.html#sending-arbitrary-data-to-an-output-e-g-foreign-event-driven-sources:~:text=spring.cloud.stream.dynamic%2Ddestination%2Dcache%2Dsize))

**Feature Request**: As an alternative, Spring Cloud GCP could provide some mechanism to optionally disable topic existence verification in the Spring Cloud GCP Pub/Sub Binder implementation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.