>From my MSMQ friend to me...... <snip, with some cleanup edits> 1. A queue will only get empty if he actually writes a program that empties it. He should investigate why his program is not receiving all messages out of the queue.
2. If he wants to empty out the old messages but keep the queue, he can either receive the messages normally (which will also delete them), or he can purge them using Computer Management, or he can purge them programmatically. He can search the KB for "MSMQ local admin API" to find the API used to purge. 3. If he really wants to delete old queues, assuming that they're public queues, there are standard API calls for locating queues based on certain criteria (including creation date, if I recall correctly). Once a queue is located, it can be deleted programmatically. For more info, see http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemMessagingM essageQueueClassGetPublicQueuesByCategoryTopic.asp (.NET) or http://msdn.microsoft.com/library/en-us/msmq/msmq_ref_query_5usl.asp (COM object) -- there is an equivalent for the C++ API as well. </snip> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Abhishek Sharma Sent: Thursday, June 10, 2004 10:33 AM To: '[EMAIL PROTECTED]' Subject: [ActiveDir] Script to purge Domain based MSMQ Hi All, I am using a Content Management System which uses MSMQ for publishing to targets. I am facing a problem whereby the queue doesn't get empty and many times there are queues which are 3 months old. I want to write a script for purging the domain MSMQ for queues older then 2 weeks. Any help will be appreciated. The details are as follows: 1. The queue is domain based and public. 2. The name of the queue is tridion_cm_pub. 3. The queue is transactional. Let me know if more details are required. -- thanks, Best regards, Abhishek Sharma | Network Architect | netdecisions Mumbai Software Development Centre 6th Flr, MET Building, Gen. A.K.Vaidya Chowk Bandra Reclamation, Bandra (W), Mumbai 400050. INDIA t Direct - +91 22 2644 0534, Board - +91 22 2644 0000 - Extn: 534. f +91 22 2655 8048 Email : [EMAIL PROTECTED] Website: www.netdecisions.com List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
