PC Review


Reply
Thread Tools Rate Thread

MSMQ: removing all messages issue

 
 
DeveloperX
Guest
Posts: n/a
 
      1st Jul 2008
Hi, I'm using MSMQ 3 under framework 2. All I want to do is retreive
all the messages on a queue and remove them.

If you use recieve on the queue you have to pass it a timespan which
defines the timeout for when there are no further messages. I could
set this to be stupidly small, but how small is safe, say if the
network has a blockage in it's tubes?
You can retrieve an enumerator using GetMessageEnumerator2 which has a
removeCurrent. However, this immediately causes the enumerator to stop
working (no real suprise) so is useless.

The queue has a GetAllMessages method which does as it says on the
tin, however, it doesn't remove them, and once retrieved, there's no
handy method to go in and delete them.

I could use a combination of GetAllMessages and then run through the
returned array once I'd finished with them doing receiveByID. This
would work, but what a waste.

Any ideas?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IN THE NEXT HOURS ALL AND I MEAN ALL CODES OF THE WINDOWS OPERATIONSYSTEMS ARE PUBLIC FOR ALL ON NET . THIS IS A NONENCODED SAFETY ISSUE Mandelbrot Set Microsoft Access 0 3rd Sep 2009 05:26 AM
Removing Messages from Server Issue The Merg Microsoft Outlook Discussion 0 29th Oct 2008 04:08 PM
Microsoft Speech Recognition repeating error "all all all all all all...." kenrosen@gmail.com Windows XP General 1 17th Dec 2005 03:22 AM
Microsoft Speech Recognition repeating error "all all all all all all...." kenrosen@gmail.com Windows XP Help 0 16th Dec 2005 07:39 PM
Removing desktop icon from one account is removing from all accounts Kyle Windows XP Security 1 3rd Jul 2003 04:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:41 AM.