You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Akka User List
Hi,
Im working on an play app that sends message to akka actors. In our env, continues deploy happens multiple times a day where severs go down for deploying.
Question:
How do I make sure that all the messages being processed before restart/shutdown the play application?
Do I have to use at-least once delivery message grantee?
Sends 10 messages to ProcessCounter and processes one by one. How do I make sure that all the messages being processing?
Thanks,
Mohan
Jean-François Côté
unread,
Sep 30, 2016, 1:00:22 PM9/30/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Akka User List
Hi,
Actor system is built to support failure, this time it can be the deployment, the other time a network failure, etc. You never know. You must code something in the backend that will handle the retrying and wait for a completion message and then update its state to "completed". If your server restart, you just have to go through the "uncompleted" task and send them again in the actor system.
For example, you could add a "Command" table in your database and create a new entry for each command with the state. When you receive the result from your ProcessCounter actor, you put the state of the command to "Completed". You add a function on the server start to run every "Command" that is not set to "completed".