Skip to content

About

Pulls GCP Pub/Sub messages and replays them as HTTP webhook requests.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

License Work In Progress

pubsub2webhook

Pulls GCP Pub/Sub messages and replays them as HTTP webhook requests.

Overview

pubsub2webhook is a stateless Go service that consumes messages from a Google Cloud Pub/Sub subscription and replays them as HTTP webhook requests to a configured target URL. It supports optional payload decompression (gzip, zstd), attribute-to-header mapping, static headers, HMAC request signing, custom CA bundles, bounded concurrency, and HTTP health/readiness probes.

Key features:

  • Consumes messages from a single GCP Pub/Sub pull subscription and forwards them via HTTP/HTTPS
  • Transparent payload decompression (gzip, zstd, none) driven by a configurable Pub/Sub message attribute with strict decompressed size limits
  • Maps Pub/Sub message attributes to outgoing HTTP headers and supports static headers
  • Optional HMAC request signing (sha256, sha1, sha512) over the outgoing request body with secret value or mounted secret file support
  • Explicit Ack/Nack semantics: Acks 2xx (and non-retryable 4xx by default), Nacks 408, 429, 5xx, and network/timeout errors for retry
  • Optional custom CA certificate bundle for internal HTTPS endpoints
  • Built-in /healthz and /readyz endpoints and structured JSON logging with log/slog
  • Configuration via environment variables or CLI flags, with --check-config offline validation

Documentation

See the documentation site or browse the guides directly:

Related projects

  • ghook2pubsub receives GitHub webhooks, verifies signatures, and publishes events to Google Cloud Pub/Sub; pubsub2webhook can replay those events to downstream webhook receivers such as Argo CD.
  • pubsub2postgresaudit consumes Pub/Sub messages and stores an audit history in PostgreSQL.
  • ghook4action consumes GitHub webhook events from Pub/Sub and automates GitHub organization Projects and cross-repository workflow dispatches.

Use separate subscriptions on the same topic so webhook replay, auditing, and GitHub automation operate independently.

License

This project is licensed under the MIT License.

About

Pulls GCP Pub/Sub messages and replays them as HTTP webhook requests.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages