2

Do I have to close some instances after the completion of work with the base using the ReactiveMongo driver?

When I do a lot of inserts and then I call driver.close(), many operations can not be completed with dead letters akka messages.

Can I be sure that he will complete all operations before shutting down without await all operations futures?

Tolsi
  • 656
  • 9
  • 20
  • Are you sure the messages you see ending up in the dead letters are due to failing operations? They may be acks or things like that. – vptheron Apr 02 '15 at 13:53
  • @vptheron, I see it in the logs, data insertion operations started shortly before closing the driver, they are no changes in the database – Tolsi Apr 02 '15 at 14:01
  • You should not close the driver after DB operation. It would close the underlying actor system and cause issues. – cchantep Apr 02 '15 at 14:53
  • If you are using the ask pattern you can compose a sequence of Futures with Future.sequence and then onComplete of the big future of all operations close the connection – Andrew Cassidy Apr 02 '15 at 19:31
  • @AndrewCassidy and if I work with ReactiveMongo from many different methods? I use it in MapReduce Hadoop job. – Tolsi Apr 02 '15 at 20:08

0 Answers0