473,770 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MessageQueue Event for new messages

Is there any way to create an event that notifies when a message is added to
a MessageQueue, without resorting to polling the MessageQueue?

I.e., suppose we have a MessageQueue with several messages still in queue.
My process wants to know when a new message (of any sort) is added to the
queue.

Right now I have a Timer invoking a refresh via GetAllMessages( ) to detect
new messages. There must be a better way!

Mar 10 '07 #1
1 1814
Take a look at MSMQ Triggers.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Dave Booker" wrote:
Is there any way to create an event that notifies when a message is added to
a MessageQueue, without resorting to polling the MessageQueue?

I.e., suppose we have a MessageQueue with several messages still in queue.
My process wants to know when a new message (of any sort) is added to the
queue.

Right now I have a Timer invoking a refresh via GetAllMessages( ) to detect
new messages. There must be a better way!
Mar 10 '07 #2

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

Similar topics

1
1699
by: nestes | last post by:
I'm in need of a little direction, I've been tasked to create an app where the user can store dates and times in a table (informix) and when that date and time occurs send a popup message (like using net send computer_name "message") to a select number of computers on our network. My question is will messagequeue do this? I've read several articles about messagequeue but nothing indicating that it sends a popup (like net send). Thanks...
3
5099
by: Gerhard Swart | last post by:
Hi all. I'm writing a queue browser that reads queues from a specified machine and then display the data that's on the queue. I am using the MessageQueue Class in .Net(C#). I get the problem that I can't read the journal private queue on a remote machine. I don't know if this is possible though. I have tried all the possible options but can't seem to get it to work. The code that I tried is: MessageQueue _mq = new MessageQueue(...
1
3731
by: Tony Hamill | last post by:
Hi, I am trying to create a C# application ( eventually a windows Service ) which will pick up the event when a message enters MSMQ. When this happens I want to log isome message details.This seems fairly straightforward. I had assumed using delegates was the way to go and found the following on msdn (...
2
1754
by: Matt | last post by:
Does anyone know of a simple way to get the total number of messages in a MessageQueue? I thought it would have a count property or something of the like but I have been able to find anything. Thanks, Matt
5
5753
by: felecha | last post by:
I have a VB.Net application that runs as a Windows Service and monitors a MessageQueue on another machine. At times that machine will have to be rebooted, so I've been working on how to get my Service to re-establish the connection after the remote machine is back. I found that as soon as the remote machine goes down, the BeginReceive() method and the ReceiveCompleted() event handler start throwing an exception, for QueueNotAvailable,...
2
2171
by: felecha | last post by:
I'm stumped. I'm working on an application in VB.Net that uses System.Messaging.MessageQueue to listen for messages sent to a private queue on a remote machine. Both machines are in the same Workgroup in a small private LAN. The messaging is working fine, but since the remote machine is used as a control system and has to be rebooted when there is a configuration change, I have to handle the remote queue going down and coming back up...
4
1710
by: Risen | last post by:
Hi,All, I read MSDN about MessageQueue,and then I want to write some code to test MessageQueue in Vb.Net 2003. But there are some errors in code,and I don't know which code are incorrect. Who can tell me how to correct it. Thanks a lot. Risen.
5
5015
by: Jason Richmeier | last post by:
I have been unable to locate an answer for this question because (1) it is late in the day and my eyes are tired of looking at code and documentation, (2) I am new to this area of the .NET framework, or (3) a combination of (1) and (2). I am looking at using messaging in an application I am working on. I have been reading the documentation about messaging and have been able to understand just about everything that I have read so far. I...
0
881
by: xperttech | last post by:
Hello Gentle I am using System.Messaging.MessageQueue for creating Message Queue for Storing SMS. I work fine but if the computer is rebooted then it loses all the messages in it. I want to know is there any way that I may not lose the messages if the system reboots…? Please give your suggestion if anybody has got an idea about it. Thanks
0
9439
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,...
0
10237
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, 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...
0
10071
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8905
agi2029
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...
1
7431
isladogs
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...
0
5326
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...
1
3987
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
3
2832
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.