fernandoteixxeira/stark-bank-challenge/gcp-pubsub

Claude Code and agent skill by fernandoteixxeira/stark-bank-challenge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when implementing Google Cloud Pub/Sub publishers, subscribers, push endpoints, message contracts, retries, dead-letter topics and dead-letter queues, reprocessing failed messages, idempotency, ordering, and Spring Boot integration.

Install

npx vskill@latest install fernandoteixxeira/stark-bank-challenge/gcp-pubsub

SKILL.md

The same SKILL.md was published earlier as fernandoteixxeira/stark-bank-challenge/gcp-pubsub.

GCP Pub/Sub

Use Pub/Sub to decouple webhook ingestion from slower or retryable processing. Treat message delivery as at-least-once.

On Cloud Run specifically, the pull-versus-push choice is constrained rather than free: a pull subscriber works on a background thread, which has no VPC egress path there. See gcp-serverless-egress.

This skill is the design side — contracts, delivery semantics, dead-letter, idempotency. For the Spring Boot wiring (the autoconfigured PubSubTemplate, message converters, the emulator, BOM/version alignment), see spring-cloud-gcp-pubsub.

Message Design

  • Keep messages small and explicit.
  • Include stable identifiers: event ID, aggregate ID, subscription, source, occurred-at timestamp.
  • Version message payloads when the contract may evolve.
  • Avoid putting secrets or large raw payloads in messages.
  • Store large payloads externally and publish references when needed.

Publishing

  • Publish only after the inbound request has been validated.
  • For webhooks, persist idempotency state before or atomically with publishing when possible.
  • Add attributes for routing and observability, such as eventType, source, and schemaVersion.

Subscribing

  • Assume duplicate and out-of-order delivery unless ordering is explicitly enabled and required.
  • Make consumers idempotent.
  • Acknowledge only after successful processing.
  • Use dead-letter topics for messages that keep failing.
  • Prefer exponential backoff and bounded retries for transient failures.

Dead Letter Topics

Use a Dead Letter Topic when a subscriber cannot process a message after a bounded number of delivery attempts. Treat it as an operational recovery path, not as a place to ignore failures.

Configuration
  • Create a dedicated dead-letter topic per subscription or per message contract when failures need different ownership.
  • Configure maxDeliveryAttempts deliberately. Start with a small bounded number for deterministic poison messages and a higher number only for dependencies that often recover.
  • Give the Pub/Sub service account permission to publish to the dead-letter topic and acknowledge messages on the source subscription.
  • Create a separate dead-letter subscription for inspection, alerting, and controlled replay.
  • Keep retention long enough for investigation but bounded to avoid silent backlog growth.
Message Handling
  • Include enough attributes to diagnose and replay: eventType, schemaVersion, source, correlationId, and original event/message IDs.
  • Log the Pub/Sub message ID, ordering key if used, delivery attempt, business key, and failure class.
  • Classify failures:
  • transient: retry by not acknowledging or returning a non-2xx response in push delivery.
  • permanent: fail fast so the message reaches the dead-letter topic after the configured attempts.
  • duplicate: acknowledge after confirming existing successful processing.
  • Keep consumers idempotent even when messages come back from the dead-letter topic.
Reprocessing
  • Reprocess dead-letter messages through an explicit tool, job, or admin endpoint. Do not automatically replay all dead-letter messages without filtering.
  • Validate the message contract version before replay.
  • Preserve the original message identifiers in logs and replay metadata.
  • Replay to the original topic only when the consumer can safely handle duplicates.
  • If the payload is bad, store the investigation result and acknowledge the dead-letter message instead of looping it forever.
Monitoring
  • Alert on dead-letter topic backlog and oldest unacked message age.
  • Track failure counts by subscription, event type, and exception category.
  • Treat a growing dead-letter backlog as production work, not normal queue depth.

Cloud Run Integration

  • For push subscriptions, expose a minimal HTTP endpoint and validate the request identity.
  • For pull subscribers, make sure lifecycle and concurrency are explicit.
  • Keep processing time within request and acknowledgement deadlines.

Testing

  • Test message serialization and deserialization as a contract.
  • Test duplicate message handling.
  • Test permanent failures and dead-letter behavior where practical.
  • Test replay paths with duplicate and already-processed messages.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fernandoteixxeira/stark-bank-challenge/gcp-pubsub/badge)](https://verified-skill.com/skills/fernandoteixxeira/stark-bank-challenge/gcp-pubsub)

Something wrong with this skill or its page? Tell us.