dillon
dillon

Reputation: 733

GCP Pub/Sub idempotency key on Publish

Is it possible for GCP Pub/Sub to respect a composite key as a sort of idempotency key to prevent duplicate messages from being queued on a topic when publishing?

Upvotes: 2

Views: 1298

Answers (1)

Kamal Aboul-Hosn
Kamal Aboul-Hosn

Reputation: 17251

At this time, Cloud Pub/Sub does not support the notion of a key that can be used to dedupe messages on publish. There is exactly-once delivery support on the subscribe side (currently in public preview), but that won't prevent redelivery if messages were duplicated on the publish side.

If you need to dedupe messages via a key used at publish time (likely an attribute on the message), then Dataflow deduping is probably the best solution.

Upvotes: 2

Related Questions