Hello everyone. My name is Emmanuel and I am an APEX developer. We had enabled push notifications for one of our applications. This application has thousands of users. Some of those users, might have logged in and logged out at some point, or due to some other reason their notification subscription has become expired. This wouldn't be an issue if not for the fact that any of the notification sent to them, just stays forever in the queue and it slows down every other normal notification. The first time we saw this issue there were 32000 pending notifications in the queue.
The only way we have found to remove it from the queue is going to the workspace settings as an admin. Is there a way where I can programmatically get rid of these expired notifications? I want to put a schedule in place to prevent this.