Delete old messages on Solace
Background:
For efficiency, when the router needs to store messages for slow or offline consumers, it writes groups of messages to the disk into a single (spool) file. The spool file may contain messages from multiple queues and must remain on the disk until all of the messages are consumed or deleted from the various queues.
It is possible for a single queue to prevent the removal of many spool files by holding many old messages. This can consume significant amounts of disk space even though relatively few messages are spooled or quota is used.
Solutions:
In the short term, the solution is to find these queues and consume or delete the messages. In order to find the queues, there is a script on router, rs-find-old-messages.
Execution Steps for script
1: Log in as the support user
2: cd usr/sw/loads/currentload/unsupported rs-find-old-messages
3: .rs-find-old-messages localhost --prompt 30d
This will search for queues with messages older than 30 days and optionally let you delete the messages once the script has finished running.
Note:
1: Solace release 9.3, the de-fragmentation command can be used to consolidate spool files, without the need to delete any messages, https://docs.solace.com/System-and-Software-Maintenance/Defragmenting-Guaranteed-Messaging.htm#Defragmenting_GM_Spools
2: Its good to reach out to Solace Support team before running script.