{"id":50612,"library":"go-pubsub","title":"Google Cloud Pub/Sub","description":"Package pubsub provides an easy way to publish and receive Google Cloud Pub/Sub messages, hiding the details of the underlying server RPCs.","status":"active","version":"1.50.2","language":"go","source_language":null,"source_url":null,"tags":["google-cloud","pubsub","messaging","cloud"],"install":[{"cmd":"go get cloud.google.com/go/pubsub","lang":"bash","label":"Install cloud.google.com/go/pubsub"}],"dependencies":[],"imports":[{"symbol":"pubsub","correct":"cloud.google.com/go/pubsub"}],"quickstart":{"code":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"cloud.google.com/go/pubsub\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclient, err := pubsub.NewClient(ctx, \"my-project\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer client.Close()\n\ttopic := client.Topic(\"my-topic\")\n\tresult := topic.Publish(ctx, &pubsub.Message{Data: []byte(\"hello\")})\n\tid, _ := result.Get(ctx)\n\tfmt.Printf(\"Published message with ID: %s\\n\", id)\n}","lang":"go","description":"Publishes a message to a Google Cloud Pub/Sub topic."},"warnings":[{"fix":"Set up application default credentials or use a service account key.","message":"Requires Google Cloud authentication and billing setup.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'cloud':2,15,28,31 'detail':20 'easi':8 'googl':1,14,27 'google-cloud':26 'hide':18 'messag':17,30 'packag':4 'provid':6 'pub/sub':3,16 'publish':11 'pubsub':5,29 'receiv':13 'rpcs':25 'server':24 'under':23 'way':9","created_at":"2026-06-15T05:01:04.552414+00:00","updated_at":"2026-06-15T05:01:04.552414+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/googleapis/google-cloud-go","github":null,"docs":"https://pkg.go.dev/cloud.google.com/go/pubsub#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging","cloud"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}