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?

nieve
  • 4,601
  • 3
  • 20
  • 26

1 Answers1

9
Message m = new Message();
m.UseDeadLetterQueue = true;

Simple as.

Sam Holder
  • 32,535
  • 13
  • 101
  • 181
nieve
  • 4,601
  • 3
  • 20
  • 26
  • Can you be more explicit in case we use the following API :public void Send(object obj, string label); – Franck LEVEQUE Jun 18 '13 at 10:10
  • 1
    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? – nieve Jun 18 '13 at 18:41
  • 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. Thanks – Franck LEVEQUE Jun 19 '13 at 07:41