Reputation: 1009
I'm writing a software with C# language and I need to create a subscription to a Pub/Sub Lite in Google Cloud. I understood that I can't user the Google.Cloud.PubSub.V1 nuget package because it doesn't work with the Lite version. I found Google.Apis.PubsubLite.V1 nuget package but I haven't found an example of how I can create a subscription and read data from the Pub/Sub Lite. How I can do that?
Upvotes: 1
Views: 648
Reputation: 1780
Unfortunately C# language is not supported. You can create from console or terminal using the gcloud pubsub lite-subscriptions create command.
If you want to use the API, these languages are supported:
You can see this official documentation.
Upvotes: 2
Reputation: 769
You can create a Lite subscription with the Cloud Console, the Google Cloud CLI, or the Pub/Sub Lite API following these next couple of steps:
Also if you want to read from a subscription using a pull, you can try the example code in this asynchronous pull method, but note that it might need some changes as you are using the pubsublite library instead of the pubsub library and some things might change between libraries.
Upvotes: 0