General discussion

Locked

Problem reading MSMQ

By colwa02 ·
What would the code look like to read this queue, one at a time and not remove the message when the read completes?

Here is a partial listing of the C# windows console application code snipets of the message put code:
MessageQueue que = new MessageQueue(".\\private$\\inbound");
que.Formatter = new BinaryMessageFormatter();
myMessage msg = new myMessage();
/* load the msg object here, many lines */
Object obj = msg;
Message mput = new Message();
mput.Label = "myAutomation";
mput.Priority = MessagePriority.High;
mput.UseDeadLetterQueue = true;
mput.Body = obj;
mput.Formatter = new BinaryMessageFormatter();
try
{
que.Send(mput);
}

Every time i attempt a read, i can't see the actual data.

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums