I want to implement fan-out(one-to-many) by Pub/Sub. In specific, I want to publish the event to 5000 pods.
For this, I will make a dynamic subscription whenever each pod starts.
Each pod will subscribe to one dedicated subscription.
However, as the quota of the number of subscriptions is 10000,
the unnecessary subscription should be deleted immediately.
Does pub/sub have any callback or methods that a subscription is no longer active subscriber?
I tried a dead letter topic and connected the subscription to the dead letter. I found that the undelivered messages were not delivered to the dead letter. The 'nacked' messages are sent to the dead letter topic.
In my scenario, the messages would never be delivered if a single subscribing pod dies.
I want to catch the event that a message cannot be delivered as there is no active subscribers.