473,395 Members | 2,436 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 seems to be unreliable

Hello,

i have the following C# app, where i send messages to MSMQ:

---
private void button1_Click(object sender, System.EventArgs e) {

const string QNAME = @".\private$\Deltest";

MessageQueue mq = null;
if( MessageQueue.Exists( QNAME ) ) {
mq = new MessageQueue( QNAME );
} else {
mq = MessageQueue.Create( QNAME );
}

mq.Send( "", "HELLO" );

}
---

And then i have VB6 "client" app, which will wait messages from that queue,
and after receiving one, will delete it:

---
Private Sub Command1_Click()
On Error GoTo ErrHandler

Dim resultInfo As New MSMQQueueInfo
resultInfo.PathName = ".\private$\Deltest"

Dim resultQueue As MSMQQueue
Set resultQueue = resultInfo.Open(Access:=MQ_RECEIVE_ACCESS,
ShareMode:=MQ_DENY_NONE)

Dim resultMsg As MSMQMessage
Set resultMsg = resultQueue.Receive(, , False, 500)

resultQueue.Close
resultInfo.Delete

If Not resultMsg Is Nothing Then
MsgBox resultMsg.Label
Else
MsgBox "NULL"
End If

ExitProc:
Set resultMsg = Nothing
Set resultQueue = Nothing
Set resultInfo = Nothing

Exit Sub

ErrHandler:

End Sub
---

My problem is this: the C# app will send the message succesfully only once!
When i try to send the message for the second time, everything seems to work
fine, but the VB app will never recd the message. If i restart the C# app,
it works again, but only once!

thx

Kimmo Laine

Nov 16 '05 #1
0 975

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...
6
by: William Ryan | last post by:
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. ...
1
by: Mat Andrews | last post by:
I'm getting an error "Message queuing is not installed on this computer". This implies that I need to install MSMQ on the computer sending the message as well as the computer which is to receive...
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 ...
0
by: Clare Howard | last post by:
Hi, We are working on a project that requires that we implement MSMQ on the Pocket PC. As from online documentation it seems that MSMQ is only supported with Compact Framework 2, I have been...
3
by: Claudia | last post by:
Hi all... I'm working on a project that uses MSMQ as its core for inter-process communication. At the moment there is a single process that listens for inbound TCP-based messages on a socket,...
1
by: Spam Catcher | last post by:
Hi all, Is MSMQ thread safe? If two threads dequeue simulataneously, will MSMQ dequeue properly (i.e. each thread gets an unique message)?
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...
1
jackb
by: jackb | last post by:
Structure of my application is: 1. Message is dispatched to an application 2. That application puts the message in a private queue 3. Another application reads messages from this queue and...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.