473,395 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MSMQ

I'm starting to play with MSMQ and have a really newbie question...

I can effectively write to my Queue with no problem. However, what event is
raised when something is added to the queue. Currently, I'm polling the
queue to see if it has anything in it and then processing accordingly. But
that seems like an awkward way to handle messages b/c I might interrogate
the queue x number of times when there's nothing in it. If I could just
wake up the client app when anything is added to the queue, it seems like
it'd be much better solution.

Is there a way to do this, namely, for the queue to send a notification that
something has been added or that it has stuff in it?

TIA,

Bill

--
Cordially,

W.G. Ryan
do********@comcast.nospam.net
www.devbuzz.com
www.knowdotnet.com
Jul 21 '05 #1
6 1566
One way is to implement a windows service which incorporates Timer object
for checking the Queue and notifies the other components in case of new
message.

"William Ryan" <do********@nospam.comcast.net> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
I'm starting to play with MSMQ and have a really newbie question...

I can effectively write to my Queue with no problem. However, what event is raised when something is added to the queue. Currently, I'm polling the
queue to see if it has anything in it and then processing accordingly. But that seems like an awkward way to handle messages b/c I might interrogate
the queue x number of times when there's nothing in it. If I could just
wake up the client app when anything is added to the queue, it seems like
it'd be much better solution.

Is there a way to do this, namely, for the queue to send a notification that something has been added or that it has stuff in it?

TIA,

Bill

--
Cordially,

W.G. Ryan
do********@comcast.nospam.net
www.devbuzz.com
www.knowdotnet.com

Jul 21 '05 #2
Take a look at MSMQ triggers.

Willy.

"William Ryan" <do********@nospam.comcast.net> wrote in message news:uW**************@TK2MSFTNGP11.phx.gbl...
I'm starting to play with MSMQ and have a really newbie question...

I can effectively write to my Queue with no problem. However, what event is
raised when something is added to the queue. Currently, I'm polling the
queue to see if it has anything in it and then processing accordingly. But
that seems like an awkward way to handle messages b/c I might interrogate
the queue x number of times when there's nothing in it. If I could just
wake up the client app when anything is added to the queue, it seems like
it'd be much better solution.

Is there a way to do this, namely, for the queue to send a notification that
something has been added or that it has stuff in it?

TIA,

Bill

--
Cordially,

W.G. Ryan
do********@comcast.nospam.net
www.devbuzz.com
www.knowdotnet.com

Jul 21 '05 #3
Ali:

Thanks for the suggestion, that's actually what I have now....I have a
background thread and a timer in it that's doing the polling , and it
definitely works. I was just wondering if the Queue had anything inherent
in it to notify me.
BTW, I noticed you earned the MCAD. I've been thinking about it for a
while...can you recommend any study material?

Thanks again,

Bill
"Ali Mazaheri [MCAD]" <ae**************@NOSPAMhotmail.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
One way is to implement a windows service which incorporates Timer object
for checking the Queue and notifies the other components in case of new
message.

"William Ryan" <do********@nospam.comcast.net> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
I'm starting to play with MSMQ and have a really newbie question...

I can effectively write to my Queue with no problem. However, what event
is
raised when something is added to the queue. Currently, I'm polling the
queue to see if it has anything in it and then processing accordingly.

But
that seems like an awkward way to handle messages b/c I might

interrogate the queue x number of times when there's nothing in it. If I could just
wake up the client app when anything is added to the queue, it seems like it'd be much better solution.

Is there a way to do this, namely, for the queue to send a notification

that
something has been added or that it has stuff in it?

TIA,

Bill

--
Cordially,

W.G. Ryan
do********@comcast.nospam.net
www.devbuzz.com
www.knowdotnet.com


Jul 21 '05 #4
That's exactly what I needed..... Many many thanks!
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Take a look at MSMQ triggers.

Willy.

"William Ryan" <do********@nospam.comcast.net> wrote in message

news:uW**************@TK2MSFTNGP11.phx.gbl...
I'm starting to play with MSMQ and have a really newbie question...

I can effectively write to my Queue with no problem. However, what event is raised when something is added to the queue. Currently, I'm polling the
queue to see if it has anything in it and then processing accordingly. But that seems like an awkward way to handle messages b/c I might interrogate the queue x number of times when there's nothing in it. If I could just
wake up the client app when anything is added to the queue, it seems like it'd be much better solution.

Is there a way to do this, namely, for the queue to send a notification that something has been added or that it has stuff in it?

TIA,

Bill

--
Cordially,

W.G. Ryan
do********@comcast.nospam.net
www.devbuzz.com
www.knowdotnet.com


Jul 21 '05 #5
If you use .NET Framework (as I suspect so since you post here) you can use
async programming. Look att BeginReceive / EndReceive in the MessageQueue
class. Read more at
http://msdn.microsoft.com/library/de...asp?frame=true

In fact, that whole chapter might be interesting for you.
http://msdn.microsoft.com/library/de...asp?frame=true

Also there is at least one other article about MSMQ and services at
http://msdn.microsoft.com/library/de...asp?frame=true
"William Ryan" <do********@nospam.comcast.net> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
I'm starting to play with MSMQ and have a really newbie question...

I can effectively write to my Queue with no problem. However, what event is raised when something is added to the queue. Currently, I'm polling the
queue to see if it has anything in it and then processing accordingly. But that seems like an awkward way to handle messages b/c I might interrogate
the queue x number of times when there's nothing in it. If I could just
wake up the client app when anything is added to the queue, it seems like
it'd be much better solution.

Is there a way to do this, namely, for the queue to send a notification that something has been added or that it has stuff in it?

TIA,

Bill

--
Cordially,

W.G. Ryan
do********@comcast.nospam.net
www.devbuzz.com
www.knowdotnet.com

Jul 21 '05 #6
Thank you.
"Rolf Enidsson" <ro***********@re-m-ove.msecf.rem-ove.com> wrote in message
news:eG**************@TK2MSFTNGP12.phx.gbl...
If you use .NET Framework (as I suspect so since you post here) you can use async programming. Look att BeginReceive / EndReceive in the MessageQueue
class. Read more at
http://msdn.microsoft.com/library/de...asp?frame=true
In fact, that whole chapter might be interesting for you.
http://msdn.microsoft.com/library/de...asp?frame=true
Also there is at least one other article about MSMQ and services at
http://msdn.microsoft.com/library/de...asp?frame=true

"William Ryan" <do********@nospam.comcast.net> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
I'm starting to play with MSMQ and have a really newbie question...

I can effectively write to my Queue with no problem. However, what event
is
raised when something is added to the queue. Currently, I'm polling the
queue to see if it has anything in it and then processing accordingly.

But
that seems like an awkward way to handle messages b/c I might

interrogate the queue x number of times when there's nothing in it. If I could just
wake up the client app when anything is added to the queue, it seems like it'd be much better solution.

Is there a way to do this, namely, for the queue to send a notification

that
something has been added or that it has stuff in it?

TIA,

Bill

--
Cordially,

W.G. Ryan
do********@comcast.nospam.net
www.devbuzz.com
www.knowdotnet.com


Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrew Gordon | last post by:
I'm investigating getting Microsoft Navision to do stuff from a Python script. The recommended way seems to be to use message queues (MSMQ). I can get Navision to send a message to itself fine. I...
3
by: Vai2000 | last post by:
hi all, I have a winsvc which reads of messages out an MSMQ. Can someone help with this problem. If my server goes down and comes back up my WinSvc doesn't picks up messages accumulated in the...
10
by: Jet Leung | last post by:
Hi all, Where is the MSMQ use for? For example, I have a client program to control the database and how can I use MSMQ in my program? When I should use it? For example I have a method to insert...
4
by: SRLoka | last post by:
I have an application that has five threads. All five threads write to the same MSMQ. All five threads are using the same global instance to send data to the MSMQ server(on same machine)....
5
by: Alex Nitulescu | last post by:
Hi. I'm trying to make MSMQ work, so I go to Control Panel, Windows Components, I select MSMQ (Message Queuing Client Setup, actually) and about half-way through I get a nice message box saying ...
5
by: DBC User | last post by:
Hello, Is there an alternative approach to MSMQ for delivering messages? I am planning to develop an app which I don't want clients to install MSMQ (or do anything otherthan install my app). I...
0
by: yonirabin | last post by:
Hello, I am building a system in C# 2.0 using the master - worker design pattern The system is supposed to work as follows: 1. The Master sends Command objects to the workers 2. All Commands are...
3
by: yonirabin | last post by:
Hello, I am building a system in C# 2.0 using the master - worker design pattern The system is supposed to work as follows: 1. The Master sends Command objects to several workers 2. All Commands...
11
by: Jon Davis | last post by:
Can a solution built in C# utilize MSMQ and/or MTS? If so, does this make the training material I already have on MSMQ and MTS in the context of VB6 an appropriate prerequisite foundation before...
1
by: Florence Tissot | last post by:
We are seeing some kind of resource leak in our performance lab running an ASP.NET (2.0) application that sends and receives messages from 2 public MSMQ queues. Here's a brief summary of what are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.