Monitoring MSMQ with VB.NET

G

Guest

What would be the recommended way to monitor a high traffic message queue? I
need to import data from the que into another program via the other programs
API. When a message is added to the que I want it read by my app and then the
app will take care of the rest. I read about triggers but is running my .exe
a whole lot the best way to do this? Should I use a timmer and have my
program poll the que at set time intervals? Also, what is considered to much
traffic for the MSMQ? I will have this hooked up to a website at some point
and serveral hundred messages will need to be put into the que and processes.
Thank you
 
C

Chris Dunaway

I don't have an answer to you specific question, but I worked with MSMQ
on a project in the past and during testing, I had no problems
monitoring and posting thousands of messages on the queue. Since you
indicate you will be processing only several hundreds, I don't think
you'll have a problem.
 
G

Guest

I monitor the queue inside a Windows application by using a thread. I suppose
you don't need to do that if all your app is doing is monitoring the queue.

Inside the thread, I have an infinite loop that polls the queue every 250ms
(my choice of delay based on my application). I also have a global flag in my
infinite loop that terminates the loop when the main application needs to
halt messaging.

It seems to me that you want to write a service that continually polls the
message queue in an infinite loop. I agree with Chris Dunaway that
performance should not be a problem. I ran a test that successfully retrieved
hundreds of messages in only a few seconds.
 
G

Guest

So overloading the queue does not seem to be a problem. It looks like a
service would be a good way to go that monitors the queue via a loop. I guess
using a timer would work well because I can then adjust the pooling rate. Any
comments on these ideas? Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top