-
Notifications
You must be signed in to change notification settings - Fork 242
Purge Queue Messages
One can choose to auto delete COMPLETED
, FAILED
, WARNING
and CANCELED
queue messages from database based on
configurable delays for one or more Queue(s).
- Go to
Menu->Configuration
, then onDevices
page,Edit
thedcm4chee-arc
device. Go toExtensions
andEdit extension
ofDevice Extension
. Again go to itsExtensions
andEdit extension
ofArchive device
. - Add values for field
Purge Queue Messages Polling Interval
andSave
. - Next go to the
Child Objects
of archive device and selectQueue
to addDelay for purging completed queue messages
,Delay for purging failed queue messages
,Delay for purging warning queue messages
andDelay for purging canceled queue messages
andSave
. - This can be repeated for other
Queue
as required.
One may either
-
create a LDIF file (e.g.):
version: 1 dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org changetype: modify add: dcmPurgeQueueMessagePollingInterval dcmPurgeQueueMessagePollingInterval: PT1H - dn: dcmQueueName=Export1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org changetype: modify add: dcmPurgeQueueMessageCompletedDelay dcmPurgeQueueMessageCompletedDelay: P1D - dn: dcmQueueName=Export1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org changetype: modify add: dcmPurgeQueueMessageFailedDelay dcmPurgeQueueMessageCompletedDelay: P1D - dn: dcmQueueName=Export1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org changetype: modify add: dcmPurgeQueueMessageWarningDelay dcmPurgeQueueMessageCompletedDelay: P1D - dn: dcmQueueName=Export1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org changetype: modify add: dcmPurgeQueueMessageCanceledDelay dcmPurgeQueueMessageCompletedDelay: P1D -
and import it to the LDAP Server by using the ldapmodify command line utility.
-
or use the Add Attribute... and Add Value... function of Apache Directory Studio to add attributes on Device Level (e.g.:
dicomDeviceName=dcm4chee-arc
) and on Queue Descriptor level (e.g.:dcmQueueName=Export1
) in the Archive Configuration.
One may refer to Archive Device and Queue Descriptor to understand the description of attributes.
Refer ISO-8601 Duration format for more know-how on Durations.
Go to the Control tab on Configuration page in archive UI and reload the configuration.
After the configurable delays have been reached, one can see the following in the Wildfly server logs.
11:34:04,144 INFO [org.dcm4chee.arc.qmgt.impl.QueueManagerEJB] (EE-ManagedScheduledExecutorService-default-Thread-13)
Delete Task[id=ID:0b5b2ee7-e33f-11e8-b5ce-c47d4614bea4] from Queue Export1
11:34:04,153 INFO [org.dcm4chee.arc.qmgt.impl.QueueManagerEJB] (EE-ManagedScheduledExecutorService-default-Thread-13)
Delete Task[id=ID:0f8c7c88-e33f-11e8-b5ce-c47d4614bea4] from Queue Export1
11:34:04,176 INFO [org.dcm4chee.arc.qmgt.impl.PurgeQueueMessageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-13)
Deleted 2 COMPLETED messages from queue: Export1
11:34:04,193 INFO [org.dcm4chee.arc.qmgt.impl.QueueManagerEJB] (EE-ManagedScheduledExecutorService-default-Thread-13)
Delete Task[id=ID:89f21ad0-e33f-11e8-b5ce-c47d4614bea4] from Queue Export1
11:34:04,201 INFO [org.dcm4chee.arc.qmgt.impl.PurgeQueueMessageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-13)
Deleted 1 FAILED messages from queue: Export1
11:34:04,220 INFO [org.dcm4chee.arc.qmgt.impl.QueueManagerEJB] (EE-ManagedScheduledExecutorService-default-Thread-13)
Delete Task[id=ID:15499a4a-e33f-11e8-b5ce-c47d4614bea4] from Queue Export1
11:34:04,234 INFO [org.dcm4chee.arc.qmgt.impl.QueueManagerEJB] (EE-ManagedScheduledExecutorService-default-Thread-13)
Delete Task[id=ID:4e0debbe-e33f-11e8-b5ce-c47d4614bea4] from Queue Export1
11:34:04,247 INFO [org.dcm4chee.arc.qmgt.impl.PurgeQueueMessageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-13)
Deleted 2 CANCELED messages from queue: Export1
DCM4CHEE 5 Documentation