# HG changeset patch # User Alain Mazy # Date 1756291699 -7200 # Node ID a2b24bfeb0d6d06f2d49c08cdaf9300bb659e2b5 # Parent cadeae6be091cc227fabc52f6b2e8647408b7c2d TODO DequeueValue2 diff -r cadeae6be091 -r a2b24bfeb0d6 TODO --- a/TODO Wed Aug 20 14:26:28 2025 +0200 +++ b/TODO Wed Aug 27 12:48:19 2025 +0200 @@ -312,6 +312,19 @@ can not cross the C/C++ frontier safely -> we need a OrthancPluginRegisterStorageArea3 with a return value. Ex: install DelayedDeletion + S3 storage. Right now, the second plugin to load is just ignored with an error message in the logs. +* Queues: There is currently a risk of loosing messages from the Queues: + message = orthanc.DequeueValue("instances-to-process", orthanc.QueueOrigin.FRONT) + # consider Orthanc is interrupted here (hard shutdown) + proccess(message) + The message will never be processed ... + We should have an acknowledge/commit mechanism e.g: + message, messageId = orthanc.DequeueValue2("instances-to-process", orthanc.QueueOrigin.FRONT, 5) # where 5 is a "timeout" + # At this point, the message is still in the queue but will not be dequeued by other consumers. + # If the message is not acknowledged within 5 seconds, it will get back into the queue. + process(message) + orthanc.AcknowledgeQueue("instances-to-process", messageId) + # This requires adding a new "timeout" column in the DB with the reservation_expiration timestamp. + -----------