{"id":15222144,"url":"https://github.com/googlecloudplatform/pulltop","last_synced_at":"2025-10-03T15:30:40.561Z","repository":{"id":65479826,"uuid":"310614612","full_name":"GoogleCloudPlatform/pulltop","owner":"GoogleCloudPlatform","description":"A CLI Pub/Sub subscriber and console message logger","archived":true,"fork":false,"pushed_at":"2020-11-24T13:36:46.000Z","size":28,"stargazers_count":7,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-18T08:41:16.667Z","etag":null,"topics":["asynchronous","cloud-computing","google-cloud","google-cloud-platform","messaging","pubsub","subscriber"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-06T14:09:41.000Z","updated_at":"2024-06-16T02:05:24.000Z","dependencies_parsed_at":"2023-01-25T18:31:25.647Z","dependency_job_id":null,"html_url":"https://github.com/GoogleCloudPlatform/pulltop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fpulltop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fpulltop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fpulltop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fpulltop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/pulltop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235146547,"owners_count":18943281,"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":["asynchronous","cloud-computing","google-cloud","google-cloud-platform","messaging","pubsub","subscriber"],"created_at":"2024-09-28T15:10:48.296Z","updated_at":"2025-10-03T15:30:34.256Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# `pulltop`\n\n`pulltop` is a CLI Pub/Sub subscriber and console logger for topics with text-based message payloads.\n\n## Synopsis\n\nUsage: `pulltop [-m \u003cmaxMessages\u003e] [-d \u003cackDeadline\u003e] \u003ctopic-name\u003e`\n\n```\n$ pulltop projects/pubsub-public-data/topics/taxirides-realtime\n{\"ride_id\":\"d3dc1ed1-da73-4ff7-b459-1d384a2c357b\",\"point_idx\":176,\"latitude\":40.748270000000005,\"longitude\":-74.00376,\"timestamp\":\"2020-10-19T20:41:55.23468-04:00\",\"meter_reading\":4.6102653,\"meter_increment\":0.02619469,\"ride_status\":\"enroute\",\"passenger_count\":1}\n{\"ride_id\":\"062364d6-89ab-450f-97cd-dffc0d26c20a\",\"point_idx\":749,\"latitude\":40.733830000000005,\"longitude\":-73.98851,\"timestamp\":\"2020-10-19T20:41:55.23515-04:00\",\"meter_reading\":15.112176,\"meter_increment\":0.02017647,\"ride_status\":\"enroute\",\"passenger_count\":1}\n{\"ride_id\":\"d1eb9b0b-7639-41bb-a8ef-e0d628bd828b\",\"point_idx\":113,\"latitude\":40.76498,\"longitude\":-73.98416,\"timestamp\":\"2020-10-19T20:41:55.23564-04:00\",\"meter_reading\":5.461667,\"meter_increment\":0.048333336,\"ride_status\":\"enroute\",\"passenger_count\":2}\n{\"ride_id\":\"9fe2f0b2-689c-4295-ae10-75f544a1d595\",\"point_idx\":1002,\"latitude\":40.759640000000005,\"longitude\":-73.95788,\"timestamp\":\"2020-10-19T20:41:55.23296-04:00\",\"meter_reading\":21.484406,\"meter_increment\":0.021441523,\"ride_status\":\"enroute\",\"passenger_count\":6}\n{\"ride_id\":\"478f0e32-ec35-4ef1-b407-7be1723492a2\",\"point_idx\":16,\"latitude\":40.76003,\"longitude\":-73.9915,\"timestamp\":\"2020-10-19T20:41:55.23319-04:00\",\"meter_reading\":0.7529412,\"meter_increment\":0.047058824,\"ride_status\":\"enroute\",\"passenger_count\":1}\n{\"ride_id\":\"486976c7-6b33-4285-86af-81acb9657fc2\",\"point_idx\":611,\"latitude\":40.73969,\"longitude\":-73.97296,\"timestamp\":\"2020-10-19T20:41:55.23328-04:00\",\"meter_reading\":16.896093,\"meter_increment\":0.02765318,\"ride_status\":\"enroute\",\"passenger_count\":2}\n{\"ride_id\":\"a926e22e-ade3-4fb8-8fa4-0fa16f0eae54\",\"point_idx\":72,\"latitude\":40.78539000000001,\"longitude\":-73.98363,\"timestamp\":\"2020-10-19T20:41:55.23599-04:00\",\"meter_reading\":1.7949579,\"meter_increment\":0.02492997,\"ride_status\":\"enroute\",\"passenger_count\":1}\n{\"ride_id\":\"40f87cac-9c9d-4e45-a8a8-9b69b6488ce2\",\"point_idx\":2015,\"latitude\":40.730290000000004,\"longitude\":-73.91291000000001,\"timestamp\":\"2020-10-19T20:41:55.23738-04:00\",\"meter_reading\":40.031425,\"meter_increment\":0.019866712,\"ride_status\":\"enroute\",\"passenger_count\":2}\n...\n```\n\nUse with other CLI tools:\n\n```\n$ pulltop projects/pubsub-public-data/topics/taxirides-realtime | jq .ride_id \u003e /var/tmp/ride_ids.log \n^C\n$ head /var/tmp/ride_ids.log \n\"894dee5a-f6ae-4611-835a-233f79605543\"\n\"4d1813d7-2656-49c8-8d7a-0a47ae33dc2c\"\n\"10a15463-2a53-4345-9d91-5b1e4856920b\"\n\"d10506fa-32ad-4366-af51-5002f247df02\"\n\"e5060472-d5c7-484d-b3e1-349c41714678\"\n\"e214f50e-5626-4df8-92ea-2aba709779d3\"\n\"f8dd1f8a-9d79-4447-9f6c-bd27ddf6b194\"\n\"9c5fc757-c531-4ce7-af06-9e8b8763880a\"\n\"2d8f1d3e-a131-493d-be56-782b22332045\"\n\"358a2f15-e52f-4420-8af0-5d08d487ec58\"\n```\n\nFormat for friendlier visual output:\n\n```\n$ pulltop projects/pubsub-public-data/topics/taxirides-realtime | jq\n{\n  \"ride_id\": \"aafbd11f-f257-48f9-8ade-da0f7a9e47a4\",\n  \"point_idx\": 356,\n  \"latitude\": 40.757600000000004,\n  \"longitude\": -73.99695000000001,\n  \"timestamp\": \"2020-11-05T15:06:30.88008-05:00\",\n  \"meter_reading\": 10.380789,\n  \"meter_increment\": 0.02915952,\n  \"ride_status\": \"enroute\",\n  \"passenger_count\": 1\n}\n{\n  \"ride_id\": \"951e69b5-2ad3-49b1-904d-ab7524e3b7a4\",\n  \"point_idx\": 1475,\n  \"latitude\": 40.742520000000006,\n  \"longitude\": -73.99952,\n  \"timestamp\": \"2020-11-05T15:06:32.02742-05:00\",\n  \"meter_reading\": 22.625082,\n  \"meter_increment\": 0.015339038,\n  \"ride_status\": \"enroute\",\n  \"passenger_count\": 1\n}\n{\n  \"ride_id\": \"bac66af3-8340-459d-a375-1c8dfed69883\",\n  \"point_idx\": 325,\n  \"latitude\": 40.766540000000006,\n  \"longitude\": -73.99683,\n  \"timestamp\": \"2020-11-05T15:06:31.77781-05:00\",\n  \"meter_reading\": 10.010292,\n  \"meter_increment\": 0.0308009,\n  \"ride_status\": \"enroute\",\n  \"passenger_count\": 1\n}\n...\n^C\n```\n\n## Installation\n\n`npm install -g pulltop`\n\n## Design\n\n`pulltop` creates a subscription as needed to receive messages from a topic. It aspires to delete the subscription upon termination of its CLI process, but if shutdown uncleanly it *will* leave orphaned subscriptions. Depending on how `pulltop` is employed, this could accumulate orphaned subscriptions that consume unnecessary quota if not periodically maintained.\n\n`pulltop` acknowledges messages it receives over the subscription,\nbut since a new subscription is created by pulltop upon instantiation,\nit cannot interfere with the acknowledgement of messages destined for\nother subscriptions on the specified topic.\n\n## See also\n\n`pulltop` is used (alongside `websocketd`) to [Stream Pub/Sub messages over Websockets](https://cloud.google.com/solutions/streaming-cloud-pub-sub-messages-over-websockets) and in the package [gke-pubsub-websocket-adapter](https://github.com/GoogleCloudPlatform/gke-pubsub-websocket-adapter).\n\n## Disclaimers\n\n_This is not an officially supported Google product._\n\n`pulltop` is under active development. Interfaces and functionality may change at any time.\n\n## License\n\nThis repository  is licensed under the Apache 2 license (see [LICENSE](LICENSE.txt)).\n\nContributions are welcome. See [CONTRIBUTING](CONTRIBUTING.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fpulltop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecloudplatform%2Fpulltop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fpulltop/lists"}