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 6 1561
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
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
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
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
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
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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)....
|
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
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |