db queue implementation in case of lost db connection