{"id":22576964,"url":"https://github.com/unitvectory-labs/pubsubmsgrestforwarder","last_synced_at":"2025-10-09T02:21:17.943Z","repository":{"id":265357042,"uuid":"895833417","full_name":"UnitVectorY-Labs/pubsubmsgrestforwarder","owner":"UnitVectorY-Labs","description":"A Go command-line application for local testing, simulating the Cloud Run Push use case by consuming Pub/Sub messages and forwarding them as RESTful HTTP POST requests.","archived":false,"fork":false,"pushed_at":"2025-09-06T13:09:44.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T14:25:42.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UnitVectorY-Labs.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-29T02:16:24.000Z","updated_at":"2025-09-06T13:09:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7074127-1a51-4428-af60-55ccb727b456","html_url":"https://github.com/UnitVectorY-Labs/pubsubmsgrestforwarder","commit_stats":null,"previous_names":["unitvectory-labs/pubsubmsgrestforwarder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UnitVectorY-Labs/pubsubmsgrestforwarder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fpubsubmsgrestforwarder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fpubsubmsgrestforwarder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fpubsubmsgrestforwarder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fpubsubmsgrestforwarder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UnitVectorY-Labs","download_url":"https://codeload.github.com/UnitVectorY-Labs/pubsubmsgrestforwarder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fpubsubmsgrestforwarder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000781,"owners_count":26082906,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-08T04:10:32.052Z","updated_at":"2025-10-09T02:21:17.926Z","avatar_url":"https://github.com/UnitVectorY-Labs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/licenses/MIT) [![Work In Progress](https://img.shields.io/badge/Status-Work%20In%20Progress-yellow)](https://guide.unitvectorylabs.com/bestpractices/status/#work-in-progress) [![Go Report Card](https://goreportcard.com/badge/github.com/UnitVectorY-Labs/pubsubmsgrestforwarder)](https://goreportcard.com/report/github.com/UnitVectorY-Labs/pubsubmsgrestforwarder)\n\n# pubsubmsgrestforwarder\n\nA Go command-line application for local testing, simulating the Cloud Run Push use case by consuming Pub/Sub messages and forwarding them as RESTful HTTP POST requests.\n\n## Overview\n\nThis tool is intended for local testing and debugging of Pub/Sub integrations. It connects to a given Pub/Sub subscription, processes the messages, converts them into the format required by Cloud Run push subscriptions, and sends them to a specified RESTful HTTP endpoint.\n\nThe primary use case is to enable developers to simulate the behavior of Cloud Run push subscriptions locally with real Pub/Sub data.\n\n## Configuration\n\nThis application is run as a command-line tool and supports the following configuration options:\n\n### Command-Line Arguments\n\n- `--project` (string, required): The GCP project ID associated with the Pub/Sub subscription.\n- `--subscription` (string, required): The Pub/Sub subscription ID to consume messages from.\n- `--url` (string, optional): The URL to which the transformed messages will be POSTed. (default: `http://localhost:8080`)\n\n### Example Usage\n\n```bash\n./pubsubmsgrestforwarder --project=my-gcp-project --subscription=my-subscription-id --url=http://localhost:9090/webhook\n```\n\nThis command consumes messages from the specified Pub/Sub subscription and forwards them to `http://localhost:9090/webhook`.\n\n## Key Design\n\nThe application continuously consumes messages from the specified Pub/Sub subscription, transforms them into the following JSON format, and sends them to the configured URL:\n\n```json\n{\n  \"message\": {\n    \"attributes\": { \"key1\": \"value1\", \"key2\": \"value2\" },\n    \"data\": \"Base64EncodedData\",\n    \"messageId\": \"1234567890\",\n    \"orderingKey\": \"order-key\",\n    \"publishTime\": \"2024-01-01T00:00:00Z\"\n  },\n  \"subscription\": \"projects/my-project/subscriptions/my-subscription\"\n}\n```\n\n## Limitations\n\n- This application does not handle message retries on POST failures. Messages are Nacked and may be redelivered by Pub/Sub based on the subscription configuration.\n- Only a single message is processed at a time. The application does not support batch processing or high-throughput scenarios.\n- The tool is designed for local testing and does not include production-level security features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitvectory-labs%2Fpubsubmsgrestforwarder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funitvectory-labs%2Fpubsubmsgrestforwarder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitvectory-labs%2Fpubsubmsgrestforwarder/lists"}