Reputation: 733
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
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