node-cqrs-eventdenormalizer icon indicating copy to clipboard operation
node-cqrs-eventdenormalizer copied to clipboard

'disconnect' event for dynamodb repository not working

Open elmolicious opened this issue 7 years ago • 2 comments

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

elmolicious avatar Sep 13 '17 11:09 elmolicious

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...

adrai avatar Sep 13 '17 13:09 adrai

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.

elmolicious avatar Sep 13 '17 14:09 elmolicious