NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Purging a Queue's Contents

You can use the Purge method to clear the contents of any queue to which you have access rights in the Message Queuing system. For example, suppose you use a journal queue on your local Message Queuing client to record copies of all messages you send out. When that journal reaches its maximum size, you might use the Purge method to clear out the items you no longer need.

Note   Messages stored in journal and dead letter queues count against the quota for the computer where the queue resides. When the quota is reached, these queues stop accepting new messages. It is important to periodically clear messages that are no longer needed from journal and dead letter queues if you are using these in your application.

You must have Receive rights in Message Queuing to delete the contents of a queue. When you purge a queue, all of the messages it contains are discarded without being sent. You can purge a queue's contents from code.

To purge a queue's contents programmatically

See Also

Creating, Deleting, and Administering Queues | Creating Queues