Skip to content
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

Added support for GCP PubSub and Google Spanner database #1154

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jhakp
Copy link

@jhakp jhakp commented Jun 13, 2022

Extended the code and added support for GCP Pub/sub (message broker) and Google Spanner database.
Added a sample application "Sample.GcpPubSub.GoogleSpanner" to validate the changes. Open appsettings.json of "Sample.GcpPubSub.GoogleSpanner" and change the PubSub details and also change the spanner connection string to try out the changes.

@yang-xiaodong
Copy link
Member

Hello,

As far as I know, Pub/Sub does not support multiple topics attached to one subscription, so we can't provide support for CAP group, Are you try to solve this?

@jhakp
Copy link
Author

jhakp commented Jun 15, 2022

yes, Pub/Sub does not support multiple topics to one subscription. CAP group would not be supported but we can work without that.

@yang-xiaodong
Copy link
Member

yang-xiaodong commented Jun 15, 2022

Since this is a core feature, it would be difficult for us to merge it into our main repository without support group feature, I would suggest that this could be written into our docs as a community supported extension and you as the maintainer, what do you think?

Community supported list docs:
https://cap.dotnetcore.xyz/user-guide/en/transport/general/#community-supported-transport-extensions

Thank you.

@jhakp
Copy link
Author

jhakp commented Jun 20, 2022

I Yang, Google Pub/Sub would never support subscription group but that doesn't mean CAP cannot support GCP Pub/Sub. What Google recommends is to have only one subscription per Topic.
If you look at the code, we are registering only one subscriber. I don't think this would break any existing CAP implementation as the changes are local to the GCP Pub/Sub package.
I would sincerely like this change to be merged to master.

@praveenkrjha
Copy link

Any thoughts on merging this pull request to master?

/// </summary>
/// <param name="options">CAP configuration options</param>
/// <param name="projectId">The GCP <c>Project</c> ID.</param>
public static CapOptions UseGooglePubSub(this CapOptions options,string projectId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static CapOptions UseGooglePubSub(this CapOptions options,string projectId)
public static CapOptions UseGooglePubSub(this CapOptions options, string projectId)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants