When the XML validation is unsuccessful, a negative acknowledgement (NACK) is sent out to the sending Microsoft Message Queuing computer. If the client application that sent the message was configured to use the system dead letter queue of the client computer, the message may be located in this dead letter queue.
Note You can also enable Message Queuing journaling in the client application to record all messages sent.
MessageQueueTransaction myTransaction = new MessageQueueTransaction();
MessageQueue mq = new MessageQueue(textBoxAddr.Text);
System.Messaging.Message msg = new System.Messaging.Message();
msg.Label = "TestMessageLabel";
StreamWriter wr = new StreamWriter(msg.BodyStream,System.Text.Encoding.Unicode);
msg.UseJournalQueue = true;
msg.UseDeadLetterQueue = true;
textError.Text = "Success.";
catch (Exception ex)
textError.Text = ex.ToString();
Note If you require different behavior in BizTalk Server 2004, you may want to use the Microsoft BizTalk Server 2004 Adapter for Message Queuing 2.0. For example, you may want to decouple the transport failures from the transform failure and to see the failed message as suspended within BizTalk Server.
Article ID: 897293 - Last Review: 10 Sep 2008 - Revision: 1