I'm sending a message to a private queue via c# :
MessageQueue msgQ = new MessageQueue(@".\private$\aaa");
msgQ.Formatter = new XmlMessageFormatter(new[] { typeof (String) });
msgQ.Send(msg);
It does work and I do see the message in the queue.
However, is there any way to get an ACK whether the message got to the queue with success ?
ps
BeginPeek
and PeekCompleted
is an event which is raised when a message becomes available in the queue or when the specified interval of time has expired. it is not helping me because I need to know if the message that I sent was received by msmq. BeginPeek
will be raised also if someone else entered a message to the queue. and the last thing I want is to check via BeginPeek
- from who this message comes from.
How can I do that?
ps2
Or maybe I don't have to worry since msgQ.Send(msg);
will raise an exception if a message wasn't inserted....?