Problem: I know that Google Pub/Sub subscription cannot be patched to update the filter. I am just figuring out other ways to handle updates to filter in production.
Approach I could come up with:
- Modify the push config to pull in existing subscription (old filter) so that it accumulates messages
- Create a new subscription with latest filter
- Transfer the messages from old subscription to a topic using dataflow
- Detach the old subscription from the topic
Problems I see with the approach:
- As both subscriptions exist at a point of time, I could end up processing duplicate messages
Any suggestions on the best way to handle this?