-
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
Allow specifying a custom subscription as a consumer endpoint #262
Conversation
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.
Refdoc also needs to be updated accordingly.
...n/java/com/google/cloud/spring/stream/binder/pubsub/properties/PubSubConsumerProperties.java
Outdated
Show resolved
Hide resolved
...java/com/google/cloud/spring/stream/binder/pubsub/provisioning/PubSubChannelProvisioner.java
Outdated
Show resolved
Hide resolved
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.
Looking good! I am just not sure about what fully qualified subscription behavior will be in a different project. Did you try it?
...java/com/google/cloud/spring/stream/binder/pubsub/provisioning/PubSubChannelProvisioner.java
Show resolved
Hide resolved
...java/com/google/cloud/spring/stream/binder/pubsub/provisioning/PubSubChannelProvisioner.java
Outdated
Show resolved
Hide resolved
...java/com/google/cloud/spring/stream/binder/pubsub/provisioning/PubSubChannelProvisioner.java
Outdated
Show resolved
Hide resolved
...com/google/cloud/spring/stream/binder/pubsub/provisioning/PubSubChannelProvisionerTests.java
Show resolved
Hide resolved
@elefeint I think we were reviewing in parallel :) |
Yup. I went through my mailbox in reverse chronological order, and you moved in chronological order, and @ttomsu PR is where the two workflows intersected. |
68106ef
to
c306630
Compare
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.
Some clarifications in the doc
@@ -75,13 +75,24 @@ spring.cloud.stream.gcp.pubsub.bindings.{CONSUMER_NAME}.consumer.ack-mode=AUTO_A | |||
If automatic resource creation is turned ON and the subscription and/or the topic do not exist for a consumer, a subscription and potentially a topic will be created. | |||
The topic name will be the same as the destination name, and the subscription name will be the destination name followed by the consumer group name. | |||
|
|||
Regardless of the `auto-create-resources` setting, if the consumer group is not specified, an anonymous one will be created with the name `anonymous.<destinationName>.<randomUUID>`. | |||
Regardless of the `auto-create-resources` setting, you can control the subscriber with the following options (in order of precedence): |
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.
Regardless of the `auto-create-resources` setting, you can control the subscriber with the following options (in order of precedence): | |
Regardless of the `auto-create-resources` setting, the subscription name will be determined as follows (in order of precedence): |
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.
Ended up removing this text block
Regardless of the `auto-create-resources` setting, if the consumer group is not specified, an anonymous one will be created with the name `anonymous.<destinationName>.<randomUUID>`. | ||
Regardless of the `auto-create-resources` setting, you can control the subscriber with the following options (in order of precedence): | ||
|
||
* A pre-existing subscription (use `spring.cloud.stream.gcp.pubsub.bindings.{CONSUMER_NAME}.consumer.subscriptionName`) |
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.
* A pre-existing subscription (use `spring.cloud.stream.gcp.pubsub.bindings.{CONSUMER_NAME}.consumer.subscriptionName`) | |
* If specified, `spring.cloud.stream.gcp.pubsub.bindings.{CONSUMER_NAME}.consumer.subscriptionName` property |
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.
With the "in order of precedence" above, I don't think it's necessary to have to say "if specified"
Regardless of the `auto-create-resources` setting, you can control the subscriber with the following options (in order of precedence): | ||
|
||
* A pre-existing subscription (use `spring.cloud.stream.gcp.pubsub.bindings.{CONSUMER_NAME}.consumer.subscriptionName`) | ||
* A consumer group that uses the topic name (use `spring.cloud.stream.bindings.events.group` to create a subscription named `<topicName>.<group>`) |
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.
* A consumer group that uses the topic name (use `spring.cloud.stream.bindings.events.group` to create a subscription named `<topicName>.<group>`) | |
* If specified, `spring.cloud.stream.bindings.events.group` property that results in a subscription named `<topicName>.<group>` |
@@ -75,13 +75,24 @@ spring.cloud.stream.gcp.pubsub.bindings.{CONSUMER_NAME}.consumer.ack-mode=AUTO_A | |||
If automatic resource creation is turned ON and the subscription and/or the topic do not exist for a consumer, a subscription and potentially a topic will be created. |
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.
I think we should add a note here that, only anonymous subscriptions will be cleaned up.
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.
It's mentioned twice below this.
Kudos, SonarCloud Quality Gate passed! |
…CloudPlatform#262) * Allow specifying a custom subscription as a consumer endpoint
Introduce a parallel implementation of the driver based on the client library, with the goal of providing consistent behavior for JDBC and R2DBC Cloud Spanner drivers. For now, gRPC implementation remains primary; switching to the client library implementation requires providing .option(Option.valueOf("client-implementation"), "client-library") when creating a connection factory. Query with parameter binding DML with transactions DDL temporarily falls back on gRPC implementation.
Fixes #181