node-cqrs-eventdenormalizer
node-cqrs-eventdenormalizer copied to clipboard
'disconnect' event for dynamodb repository not working
Hi,
We are currently implementing the denormalizer with the dynamodb repository and it seems like the 'disconnect' event does not get emitted.
I tested it by setting up a docker-compose with my service (using the denormalizer) and dynamodb and simply stopped the dynamodb container while the service was still running.
Can someone confirm that this is a problem with dynamodb? or is it a general problem?
Thanks for the answers in advance
this is not a general problem... but in real life I think dynamodb as a service offering will not go down that easy... I think the aws sdk has no sort of disconnect event for dynamodb...
Ok you are right, I guess the aws-sdk is stateless (no open connection, each request is a new, fresh one) and the concept of connection-lifecycle-hooks ('connect' and 'disconnect' events) does not really work with dynamodb.
Maybe it would be a good idea to enhance the existing documentation and add a notifier that the connection events are not supported when working with dynamodb as the repository type.