GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp
Option to disable topic existence verification in the Spring Cloud GCP Pub/Sub Binder
- 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
Assessment
This issue has not been assessed yet.