Re: [akka-user] Drain mailbox on shutdown

2014-12-11 Thread √iktor Ҡlang
I prefer the method os sending a stopping message to oneself, then if you receive no other message between when you sent it and you received it, you "drained" you mailbox. (there's still messages that could be queued behind it, but that's life.) On Thu, Dec 11, 2014 at 2:13 AM, Richard Rodseth wr

Re: [akka-user] Drain mailbox on shutdown

2014-12-10 Thread Richard Rodseth
Hmm. Any? I wish to ensure that the writes happen. If I have to use a counter and acking protocol, for example, would I use a shutdown hook to send a "request shutdown" message and then use the gracefulShutdown pattern? Note that there *is* an ack after these writes, and a watermark (in another t

Re: [akka-user] Drain mailbox on shutdown

2014-12-10 Thread √iktor Ҡlang
Hi Richard, what's your definition of "best" in your scenario? On Thu, Dec 11, 2014 at 1:26 AM, Richard Rodseth wrote: > I've read some of the posts on shutdown patterns, reapers, graceful > shutdown and the like, but am still unclear on the best strategy for my > situation. > > The system is g

[akka-user] Drain mailbox on shutdown

2014-12-10 Thread Richard Rodseth
I've read some of the posts on shutdown patterns, reapers, graceful shutdown and the like, but am still unclear on the best strategy for my situation. The system is generating records to be written to a database. A single actor is doing this writing, in response to messages. When the system is sh