·
Last changedVersion:
This version passed the hardening gate. Hardening applied 5 targeted changes and preserved all other text. Classified findings before hardening: 0. Classified findings closed: 0. Classified findings remaining: 0. Unclassified scanner findings remaining: 0. Review findings closed: 7. Review findings remaining: 5.
None
None
Expand | File | Group | Subtype | Severity | Status |
|---|
No findings available
0 findings
Pub/Sub is for asynchronous messaging between services. Producers publish events to a Topic; consumers attach Subscriptions to react. Resources must be declared as package-level variables — never inside functions.
Pass topic access to library code while maintaining static analysis. The snippet below is a sketch: create the reference inside a function within an Encore service so static analysis still applies, and pass the context of the caller into the helper as a parameter instead of relying on an undeclared one:
pubsub.AtLeastOnce (default): may deliver duplicates → handlers must be idempotent.pubsub.ExactlyOnce: stricter, capped throughput (AWS 300 msg/s/topic, GCP 3000+ msg/s/region). Does not deduplicate on the publish side. Even with exactly once delivery, duplicate Publish calls produce distinct messages, so keep handlers idempotent. Throughput limits depend on the cloud provider; check them against current Encore and cloud documentation.context.Context and the event pointer; return an error to retry per the retry policy of the subscription. The retry policy is configured on the subscription, and messages that exceed the maximum retries go to a dead letter.Publish returns once the message is queued and does not wait for subscribers. Move slow work into subscription handlers, and always check the error that Publish returns.Get started with chainctlchainctl skill install public/encoredev/go-pubsub:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/encoredev/encore/go-pubsub:latest
Apache-2.0
HARDENING.md
LICENSE
SKILL.md