Stay organized with collections
Save and categorize content based on your preferences.
Pub/Sub Lite client libraries
This page shows how to get started with the Cloud Client Libraries for the
Pub/Sub Lite API. Client libraries make it easier to access
Google Cloud APIs from a supported language. Although you can use
Google Cloud APIs directly by making raw requests to the server, client
libraries provide simplifications that significantly reduce the amount of code
you need to write.
Read more about the Cloud Client Libraries
and the older Google API Client Libraries in
Client libraries explained.
To authenticate calls to Google Cloud APIs, client libraries support
Application Default Credentials (ADC);
the libraries look for credentials in a set of defined locations and use those credentials
to authenticate requests to the API. With ADC, you can make
credentials available to your application in a variety of environments, such as local
development or production, without needing to modify your application code.
For production environments, the way you set up ADC depends on the service
and context. For more information, see Set up Application Default Credentials.
For a local development environment, you can set up ADC with the credentials
that are associated with your Google Account:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["| **Note:** Pub/Sub Lite is deprecated. Effective March 18, 2026, Pub/Sub Lite will be turned down. \n|\n| - Current customers: Pub/Sub Lite remains functional until March 18, 2026. \n| If you have not used Pub/Sub Lite within the 90-day period preceding July 15, 2025 (April 15, 2025 - July 15, 2025), you won't be able to access Pub/Sub Lite starting on July 15, 2025.\n| - New customers: Pub/Sub Lite is no longer available for new customers after September 24, 2024.\n|\n| You can migrate your Pub/Sub Lite service to\n| [Google Cloud Managed Service for Apache Kafka](/pubsub/lite/docs/migrate-pubsub-lite-to-managed-service-for-apache-kafka)\n| or [Pub/Sub](/pubsub/lite/docs/migrate-pubsub-lite-to-pubsub).\n\n\u003cbr /\u003e\n\nPub/Sub Lite client libraries\n\nThis page shows how to get started with the Cloud Client Libraries for the\nPub/Sub Lite API. Client libraries make it easier to access\nGoogle Cloud APIs from a supported language. Although you can use\nGoogle Cloud APIs directly by making raw requests to the server, client\nlibraries provide simplifications that significantly reduce the amount of code\nyou need to write.\n\nRead more about the Cloud Client Libraries\nand the older Google API Client Libraries in\n[Client libraries explained](/apis/docs/client-libraries-explained).\n\nInstall the client library\n--------------------------\n\n### Go\n\n```\ngo get cloud.google.com/go/pubsublite\n```\n\nFor more information, see [Setting Up a Go Development Environment](/go/docs/setup).\n\n### Java\n\nIf you are using [Maven](https://maven.apache.org/), add\nthe following to your `pom.xml` file. For more information about\nBOMs, see [The Google Cloud Platform Libraries BOM](https://cloud.google.com/java/docs/bom). \n\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n \u003cartifactId\u003egoogle-cloud-pubsublite\u003c/artifactId\u003e\n \u003cversion\u003e1.15.6\u003c/version\u003e\n \u003c/dependency\u003e\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n \u003cartifactId\u003egoogle-cloud-pubsub\u003c/artifactId\u003e\n \u003cversion\u003e1.141.3\u003c/version\u003e\n \u003c/dependency\u003e\n\nIf you are using [Gradle](https://gradle.org/),\nadd the following to your dependencies: \n\n implementation 'com.google.cloud:google-cloud-pubsublite:1.15.14'\n\nIf you are using [sbt](https://www.scala-sbt.org/), add\nthe following to your dependencies: \n\n libraryDependencies += \"com.google.cloud\" % \"google-cloud-pubsublite\" % \"1.15.14\"\n\nIf you're using Visual Studio Code, IntelliJ, or Eclipse, you can add client libraries to your\nproject using the following IDE plugins:\n\n- [Cloud Code for VS Code](/code/docs/vscode/client-libraries)\n- [Cloud Code for IntelliJ](/code/docs/intellij/client-libraries)\n- [Cloud Tools for Eclipse](/eclipse/docs/libraries)\n\nThe plugins provide additional functionality, such as key management for service accounts. Refer\nto each plugin's documentation for details.\n| **Note:** Cloud Java client libraries do not currently support Android.\n\nFor more information, see [Setting Up a Java Development Environment](/java/docs/setup).\n\n### Python\n\n```\npip install --upgrade google-cloud-pubsublite\n```\n\nFor more information, see [Setting Up a Python Development Environment](/python/docs/setup).\n\n\u003cbr /\u003e\n\nSet up authentication\n---------------------\n\nTo authenticate calls to Google Cloud APIs, client libraries support [Application Default Credentials (ADC)](/docs/authentication/application-default-credentials); the libraries look for credentials in a set of defined locations and use those credentials to authenticate requests to the API. With ADC, you can make credentials available to your application in a variety of environments, such as local development or production, without needing to modify your application code.\n\nFor production environments, the way you set up ADC depends on the service\nand context. For more information, see [Set up Application Default Credentials](/docs/authentication/provide-credentials-adc).\n\nFor a local development environment, you can set up ADC with the credentials\nthat are associated with your Google Account:\n\n1.\n [Install](/sdk/docs/install) the Google Cloud CLI, and then\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n After signing in,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n2.\n\n Create local authentication credentials for your user account:\n\n ```bash\n gcloud auth application-default login\n ```\n\n\n If an authentication error is returned, and you are using an external identity provider\n (IdP), confirm that you have\n [signed in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\n A sign-in screen appears. After you sign in, your credentials are stored in the\n [local credential file used by ADC](/docs/authentication/application-default-credentials#personal).\n\nAdditional resources\n--------------------\n\n### Go\n\n- [API Reference Documentation](/go/docs/reference/cloud.google.com/go/pubsublite/latest)\n- [Source Code](https://github.com/googleapis/google-cloud-go/tree/main/pubsublite)\n- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-go/issues?q=is%3Aissue+api%3A+pubsublite+)\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-cloud-pubsublite+go)\n\n### Java\n\nThe following list contains links to more resources related to the\nclient library for Java:\n\n- [API reference](/java/docs/reference/google-cloud-pubsublite/latest/overview)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/java-pubsublite/issues)\n- [`google-cloud-pubsublite` on Stack Overflow](https://stackoverflow.com/search?q=%5Bgoogle-cloud-pubsublite%5D+%5Bjava%5D)\n- [Source code](https://github.com/googleapis/java-pubsublite)\n\n### Python\n\n- [API Reference Documentation](/python/docs/reference/pubsublite/latest)\n- [Source Code](https://github.com/googleapis/python-pubsublite)\n- [GitHub Issue Tracker](https://github.com/googleapis/python-pubsublite/issues)\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-cloud-pubsublite+python)\n\n\u003cbr /\u003e\n\n\nAdditional Pub/Sub Lite API libraries\n-------------------------------------\n\n\u003cbr /\u003e"]]