3 ms·
What we did in a project was storing message data in a JSONB field of a database table, with an id of the recipient process in another field. We used the module
by pmontra 3y ago
What we did in a project was storing message data in a JSONB field of a database table, with an id of the recipient process in another field. We used the module name for that. Then we sent a normal message with the id of the database record. If the process succeeded it marked the record as done. If it crashed, any of those proceesses would read all of its unprocessed records upon restart and start working on them. We took care never to restart a failed process too fast. Sometimes they kept failing for hours or days until we had a fix, then they processed their backlog. If some jobs were not important anymore or must not be performed because something else took care of them (even people manually) the fix had to skip them. Manual UPDATEs, code, etc.