Closed kidnextdoor461993 closed 4 months ago
Thank you for your interest in this new adapter!
However, I think this should be handled by the end user, and not by the adapter itself. What do you think?
Thank you for your interest in this new adapter!
However, I think this should be handled by the end user, and not by the adapter itself. What do you think?
I think if we allow the end user to decide this we should provide full both info of [queueUrl] and [subscriptionArn] on result of createAdapter function. Currently I just see _topicArn property on createAdapter result, so this is missing the way help end user decide delete or keep queue and subscription of current session. There is an example where the system is running and encounters some error and crashes the application. Then the server's registered service tries to restart your application and fails again, and so on, the startup loop is endless until you log in to your AWS Console account and see Hundreds of thousands of queues and subscriptions are created, which is a cost nightmare for AWS services.
AWS Console account and see Hundreds of thousands of queues and subscriptions are created, which is a cost nightmare for AWS services.
Sorry for that. The cleanup.sh
script in the repository may help clean up these subscriptions...
I think if we allow the end user to decide this we should provide full both info of [queueUrl] and [subscriptionArn] on result of createAdapter function.
Can't you just call io.close()
(or io.of("/").adapter.close()
for version < 4.7.5)?
process.on("SIGINT", () => {
io.close();
});
Can't you just call
io.close()
(orio.of("/").adapter.close()
for version < 4.7.5)?process.on("SIGINT", () => { io.close(); });
I called and subscription and queue still not remove on AWS SNS. Currently I see the core don't have any call to clean them!!
The queue is removed here when the isClosed
variable is set to true
:
That being said, we could indeed cancel the current poll()
, as the receiveMessage()
method accepts an abortSignal
option. What do you think?
Update event listeners to clean backlogged subscriptions and topics on development environment. In cases: