How to enable negative source journaling while sending a message to MSMQ?
Asked Answered
L

1

7

I'm trying to send a message through System.Messaging.MessageQueue (.NET) and the message keeps on disappearing. I've seen people recommending enabling negative source journaling, but can't seem to find out how this is done. Anyone?

Leung answered 17/10, 2012 at 15:0 Comment(0)
L
9
Message m = new Message();
m.UseDeadLetterQueue = true;

Simple as.

Leung answered 17/10, 2012 at 15:17 Comment(3)
Can you be more explicit in case we use the following API :public void Send(object obj, string label);Hartmunn
Hey Franck- not sure I follow what you're asking, but from what I understand you're looking to do something like:Message m = new Message(); m.UseDeadLetterQueue = true; var queue = new MessageQueue(path, accessMode); queue.Send(m, tx); Where did you see this API?Leung
Hi, I was just wondering how to use Message, as It is not really explicit in the Microsoft API (you can pass any serializable object in the Send(s) methods). You exactly guess what I was looking for. ThanksHartmunn

© 2022 - 2024 — McMap. All rights reserved.