xmidt-org/webpa-common

Don't try to unsubscribe

kristinapathak opened this issue · 2 comments

when a caduceus confirms its subscription, it tries to unsubscribe old subscriptions that might belong to it (I think that's what it's doing), so it calls ListSubscriptionByTopic :

resp, err := ss.SVC.ListSubscriptionsByTopic(params)

We don't need this block of code. A start up sequence should simply attempt to subscribe. If the subscription results in an error because a subscription already exists, just ignore the error and move on.

joe94 commented

If we decide to work on this before we move away from SNS for webhooks:
We need to come up with a tool to move this logic to as it doesn't belong here. This component is intended as a way to perform old subscriptions cleanup at system exit.

joe94 commented

We should reopen this if necessary but with the switch to Argus, this won't be relevant.