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********@comc ast.nospam.net www.devbuzz.com www.knowdotnet.com 6 1578
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********@nos pam.comcast.net > wrote in message
news:uW******** ******@TK2MSFTN GP11.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********@comc ast.nospam.net www.devbuzz.com www.knowdotnet.com
Take a look at MSMQ triggers.
Willy.
"William Ryan" <do********@nos pam.comcast.net > wrote in message news:uW******** ******@TK2MSFTN GP11.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********@comc ast.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************ **@NOSPAMhotmai l.com> wrote in message
news:ep******** ******@TK2MSFTN GP10.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********@nos pam.comcast.net > wrote in message news:uW******** ******@TK2MSFTN GP11.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********@comc ast.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******** *******@TK2MSFT NGP10.phx.gbl.. . Take a look at MSMQ triggers.
Willy.
"William Ryan" <do********@nos pam.comcast.net > wrote in message
news:uW******** ******@TK2MSFTN GP11.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********@comc ast.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********@nos pam.comcast.net > wrote in message
news:uW******** ******@TK2MSFTN GP11.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********@comc ast.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******** ******@TK2MSFTN GP12.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********@nos pam.comcast.net > wrote in message news:uW******** ******@TK2MSFTN GP11.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********@comc ast.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 found a couple
of code example in an ancient message in this newsgroup. The send.py
one I changed to the following:
from win32com.client import gencache
msmq = gencache.EnsureModule('{D7D6E071-DCCD-11D0-AA4B-0060970DEBAE}',
0, 1, 0)
qi =...
|
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 MSMQ , although my WinSvc is set to automatic restart
setting.
I have to manually go and restart the service then only it retrieves all the
messages from the MSMQ.
This is the code.....
/////////////////////////////////////////
|
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 new record to the database and how can
I use MSMQ in this method?
|
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).
Occasionally, I get the erroror below. The data(string) being sent is not
null or empty. Is this a problem related to multiple threads ? Right now I
have coded it like this
Controller.MSMQ.Send(Record);
Should I change to
|
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
The MSMQ service cannot be started.
Error code: 0x42C
The Dependency service or group failed to start.
If I acknowledge, the "installation" continues as if nothing happened, but
in the end nothing has been installed.
| |
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 was want to pass messages
between two programs and my first approach was MSMQ and it worked
perfectly and then I found out MSMQ is a seperate win component and is
not installed by default.
I am looking at writing files and implement...
|
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 derived from AbstractCommand class
since the system is distributed and should be presistant, I want to use
MSMQ to pass the Command object to the Workers
The object which I send to the MSMQ is a message containing an object
|
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 are derived from AbstractCommand class (but are
significantly different from each other)
Since the system is distributed and should be presistant, I want to use
|
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 learning
how to build C# solutions on MSMQ / MTS, if I already know VB6 as well as
C#?
Jon
|
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 application does:
1. user provides input on a form on an aspx page and clicks continues
2. on postback, the page creates a c# .net object and calls a method on it to process the data provided by the user
3. the object in turns creates an...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |