Story #8061: develop queue-based processing system for the CN
prototype durable task processing for d1_index_processor
The requirement is publisher confirmation when submitting task to a queue, and consumer acknowledgements when pulling from a queue. Don't acknowledge consumption until you get publisher confirmation from the outputQueue, or else you risk dropping the task.
It would be good to generalize this pattern to isolate the safe-hand off, but RabbitMQ Java client makes it a bit tricky, since it implements consumers as callbacks - methods that are called under the hood when a message is consumed.