We will use the pubsub Golang library - https://pkg.go.dev/cloud.google.com/go/pubsub which uses a persistent TCP connection under the covers.
A new table for adding PubSub connection details and topics: google_pubsub
name
- string column PK
system_key
- string column
credentials
- string column (encrypted. Will contain the credentials JSON file)
topics
- string column (comma separated PubSub topics)
There will be endpoints for CRUD. (Details will be added later)
The topics entered during PubSub connection creation will be added as subscribers to the topic tree. The PubSub connection will implement the client
interface in core_messaging/broker/client_manager.go. We will use the Publish
func to forward messages to Google.