-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully qualified subscription configuration support + immutable configuration in Pub/Sub #1110
Merged
elefeint
merged 16 commits into
main
from
pubsub-per-subscription-maps-store-config-in-pubsubconfig-like-before
May 24, 2022
Merged
Fully qualified subscription configuration support + immutable configuration in Pub/Sub #1110
elefeint
merged 16 commits into
main
from
pubsub-per-subscription-maps-store-config-in-pubsubconfig-like-before
May 24, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elefeint
changed the title
WIP: fully qualified subscription configuration support in Pub/Sub
Fully qualified subscription configuration support + immutable configuration in Pub/Sub
May 9, 2022
mpeddada1
reviewed
May 13, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! This is a really nice fix.
...e/src/main/java/com/google/cloud/spring/autoconfigure/pubsub/GcpPubSubAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/com/google/cloud/spring/autoconfigure/pubsub/GcpPubSubAutoConfiguration.java
Show resolved
Hide resolved
...-cloud-gcp-pubsub/src/main/java/com/google/cloud/spring/pubsub/core/PubSubConfiguration.java
Outdated
Show resolved
Hide resolved
...-cloud-gcp-pubsub/src/main/java/com/google/cloud/spring/pubsub/core/PubSubConfiguration.java
Show resolved
Hide resolved
...-cloud-gcp-pubsub/src/main/java/com/google/cloud/spring/pubsub/core/PubSubConfiguration.java
Outdated
Show resolved
Hide resolved
...-cloud-gcp-pubsub/src/main/java/com/google/cloud/spring/pubsub/core/PubSubConfiguration.java
Show resolved
Hide resolved
...-cloud-gcp-pubsub/src/main/java/com/google/cloud/spring/pubsub/core/PubSubConfiguration.java
Outdated
Show resolved
Hide resolved
...d-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/core/PubSubConfigurationTests.java
Outdated
Show resolved
Hide resolved
...com/google/cloud/spring/autoconfigure/pubsub/it/PubSubAutoConfigurationIntegrationTests.java
Outdated
Show resolved
Hide resolved
...d-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/core/PubSubConfigurationTests.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
mpeddada1
approved these changes
May 23, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
elefeint
deleted the
pubsub-per-subscription-maps-store-config-in-pubsubconfig-like-before
branch
May 24, 2022 02:06
kateryna216
added a commit
to kateryna216/spring-cloud-gcp
that referenced
this pull request
Oct 20, 2022
…uration in Pub/Sub (GoogleCloudPlatform#1110) * immutable maps * type-safe and unambiguous ProjectSubscriptionName map keys * switched map types to generic Map interface
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR:
ProjectSubscriptionName
map keysMap
interfaceDetails:
PubSubConfiguration
effectively can't be used until.initialize()
is called, allowing tying settings to fully qualified subscription names, using the passed-in project ID as a default.PubSubConfiguration
no longer allows retrieval of user-provided properties in thesubscription
map. Instead, an immutable map containing equivalent fully-qualified subscription keys can be retrieved with.getFullyQualifiedSubscriberProperties()
. Both Spring bean wiring and our unit tests now use thesetSubscription()
setter to inject "user provided" properties.spring.cloud.gcp.pubsub.subscription.fake-short-name.fully-qualified-name
property.What did not change?
compute*
methods to accept a fully qualifiedProjectSubscriptionName
because they are called from a place where only a string subscription name (either short or fully qualified) is available.Fixes #1005.