Kbase 21148: SonicMQ: Cleaning Up Expired/Acknowledged Pub/Sub Messages
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/4/2002 |
|
SUMMARY:
This Solution applies to SonicMQ 3.5 and 4.0. It discusses the parameters that can be set in the broker.ini to control cleanup of expired and/or acknowledged publish/subscribe messages from the database.
EXPLANATION:
The DB_MSG_CLEAN_THRESHOLD and EXP_MSG_CLEAN_THRESHOLD configuration parameters can be used to control cleanup of expired and/or acknowledged publish/subscribe messages from the database.
DB_MSG_CLEAN_THRESHOLD
The default value is 5000.
EXP_MSG_CLEAN_THRESHOLD
The default value is 100000.
These parameters determine how frequently the broker cleans up messages stored in the database for durable subscribers.
When a message is acknowledged by a subscriber, the broker records the acknowledgement to prevent redelivery of the message, but doesn't immediately delete the message itself from the database. Instead, the broker keeps a total count of acknowledged messages and when it reaches the limit set by the DB_MSG_CLEAN_THRESHOLD parameter, the broker starts a cleanup thread.
The broker also keeps track of the total count of publish/subscribe messages stored in the database that have expiration set. When the count reaches the limit set by the EXP_MSG_CLEAN_THRESHOLD parameter, the broker starts a cleanup thread.
The cleanup thread performs two tasks. First, it deletes all acknowledged publish/subscribe messages from the database. Secondly, it deletes all expired publish/subscribe messages from the database.
In addition, the broker performs the cleanup of publish/subscribe messages during restart.