Google Cloud Pub/Sub Delphi Component

· Components

From sgcWebSockets 4.3.6, Google Cloud Pub/Sub API is supported.

Pub/Sub brings the flexibility and reliability of enterprise message-oriented middleware to the cloud. At the same time, Pub/Sub is a scalable, durable event ingestion and delivery system that serves as a foundation for modern stream analytics pipelines. By providing many-to-many, asynchronous messaging that decouples senders and receivers, it allows for secure and highly available communication among independently written applications. Pub/Sub delivers low-latency, durable messaging that helps developers quickly integrate systems hosted on the Google Cloud Platform and externally.

Common use cases


Delphi / CBuilder component 

sgcWebSockets Google Cloud Pub/Sub component uses Rest API to connect to Google API. Find below an example of how create a new topic.

//Create a new topic for project with id: pubsub-270909 and topic name topic-1. 
oPubSub := TsgcHTTPGoogleCloud_PubSub_Client.Create(nil);
oPubSub.GoogleCloudOptions.OAuth2.ClientId := '... your google client id...';
oPubSub.GoogleCloudOptions.OAuth2.ClientSecret := '... your google client secret...';
oPubSub.CreateTopic('pubsub-270909', 'topic-1');
//Response from Server
{
  "name": "projects/pubsub-270909/topics/topic-1"
} 

Google Cloud Pub/Sub Documentation

Read more about client component and find more examples how to use. https://www.esegece.com/help/sgcWebSockets/#t=Components%2FHTTP%2FGoogle%2FGoogle_Cloud_Pub_Sub.htm