jembi / openhim-mediator-mapping

An OpenHIM mediator for mapping incoming content to a different format
https://jembi.github.io/openhim-mediator-mapping/
MIT License
3 stars 6 forks source link

Implement MongoDB reconnect after failure #78

Open MattyJ007 opened 4 years ago

MattyJ007 commented 4 years ago

Our current logic will only connect to the MongoDB instance on startup and if the connection is lost the mapper will continue without it which means the endpoints won't be updatable. We can implement listeners on the DB which triggers a reconnect when an error is detected. The reconnect retries should be staggered.

The logic would probably sit here

Connection listener docs

https://jembiprojects.jira.com/browse/OHIE-384