{"id":25730926,"url":"https://github.com/nomisRev/kotlin-gcp-pubsub","last_synced_at":"2025-02-26T02:01:57.725Z","repository":{"id":103227921,"uuid":"577029437","full_name":"nomisRev/gcp-pubsub-kt","owner":"nomisRev","description":"Ktor Plugin and Kotlin(X) integrations for GCP PubSub","archived":false,"fork":false,"pushed_at":"2023-10-09T17:20:22.000Z","size":369,"stargazers_count":21,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T09:51:21.273Z","etag":null,"topics":["gcp","gcp-pubsub","google-cloud-platform","google-cloud-pubsub","kotlin","kotlin-coroutines","kotlin-serialization","kotlinx-coroutines","kotlinx-serialization","ktor","ktor-plugin","ktor-server","pubsub"],"latest_commit_sha":null,"homepage":"https://nomisrev.github.io/kotlin-gcp-pubsub/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomisRev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-11T18:55:43.000Z","updated_at":"2025-01-20T08:27:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5d329ef-f230-4a7f-8089-eb08cd07d49b","html_url":"https://github.com/nomisRev/gcp-pubsub-kt","commit_stats":null,"previous_names":["nomisrev/gcp-pubsub-kt","nomisrev/kotlin-gcp-pubsub"],"tags_count":1,"template":false,"template_full_name":"arrow-kt/Arrow-JVM-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomisRev%2Fgcp-pubsub-kt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomisRev%2Fgcp-pubsub-kt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomisRev%2Fgcp-pubsub-kt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomisRev%2Fgcp-pubsub-kt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomisRev","download_url":"https://codeload.github.com/nomisRev/gcp-pubsub-kt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240777532,"owners_count":19855859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcp","gcp-pubsub","google-cloud-platform","google-cloud-pubsub","kotlin","kotlin-coroutines","kotlin-serialization","kotlinx-coroutines","kotlinx-serialization","ktor","ktor-plugin","ktor-server","pubsub"],"created_at":"2025-02-26T02:01:39.785Z","updated_at":"2025-02-26T02:01:57.673Z","avatar_url":"https://github.com/nomisRev.png","language":"Kotlin","funding_links":[],"categories":["Ktor Projects"],"sub_categories":["Socials"],"readme":"# Kotlin GCP PubSub\n\nGoogle Cloud PubSub made easy! Kotlin GCP PubSub offers idiomatic KotlinX \u0026 Ktor integration for GCP.\n\n```kotlin\n@Serializable\ndata class Event(val key: String, val message: String)\n\nfun Application.pubSubApp() {\n  pubSub(ProjectId(\"my-project\")) {\n    subscribe\u003cEvent\u003e(SubscriptionId(\"my-subscription\")) { (event, record) -\u003e\n      println(\"event.key: ${event.key}, event.message: ${event.message}\")\n      record.ack()\n    }\n  }\n\n  routing {\n    post(\"/publish/{key}/{message}\") {\n      val event = Event(call.parameters[\"key\"]!!, call.parameters[\"message\"]!!)\n      \n      pubSub()\n        .publisher(ProjectId(\"my-project\"))\n        .publish(TopicId(\"my-topic\"), event)\n      \n      call.respond(HttpStatusCode.Accepted)\n    }\n  }\n}\n```\n\n## Modules\n\n- [PubSub Ktor plugin](pubsub-ktor/README.MD) to conveniently consume messages from GCP PubSub, and publish messages to\n  GCP PubSub\n- [PubSub Ktor KotlinX Serialization Json](pubsub-ktor-kotlinx-serialization-json/README.MD) to conveniently consume\n  messages from GCP PubSub, and publish messages to GCP PubSub using KotlinX Serialization Json\n- [PubSub test](pubsub-test/README.MD) one-line testing support powered by testcontainers\n- [GCP PubSub](pubsub/README.MD): KotlinX integration for `TopicAdminClient`, `SubscriptionAdminClient`, `Susbcriber`\n  and `Publisher`.\n- [PubSub Ktor KotlinX Serialization Json](pubsub-kotlinx-serialization-json/README.MD) to conveniently consume messages\n  from GCP PubSub, and publish messages to GCP PubSub\n- [Google Common API](api-core/README.MD): KotlinX integration for `ApiFuture`\n\n## Using in your projects\n\n### Gradle\n\nAdd dependencies (you can also add other modules that you need):\n\n```kotlin\ndependencies {\n  implementation(\"io.github.nomisrev:gcp-pubsub-ktor:1.0.0\")\n  implementation(\"io.github.nomisrev:gcp-pubsub-ktor-kotlinx-serialization-json:1.0.0\")\n  testImplementation(\"io.github.nomisrev:gcp-pubsub-test:1.0.0\")\n}\n```\n\n### Maven\n\nAdd dependencies (you can also add other modules that you need):\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.nomisrev\u003c/groupId\u003e\n    \u003cartifactId\u003egcp-pubsub-ktor\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FnomisRev%2Fkotlin-gcp-pubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FnomisRev%2Fkotlin-gcp-pubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FnomisRev%2Fkotlin-gcp-pubsub/lists"}