Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a simple program that watches my system dead letter queue. When a message arrives, I parse the message, check for the error and if the error is a TTL error I want to repost it back to the queue it came from. Here is some of my code:

Dim deadMsg As Message = myQ.Receive()
           Console.WriteLine("Label: " & deadMsg.Label)
           Console.WriteLine("LookupID: " & deadMsg.LookupId)
           Console.WriteLine("SenderID: " & deadMsg.SenderId.ToString)
           Console.WriteLine("ID: " & deadMsg.Id)
           Console.WriteLine("SentTime: " & deadMsg.SentTime)
           Console.WriteLine("ArrivedTime: " & deadMsg.ArrivedTime)
           Console.WriteLine("SourceMachine: " & deadMsg.SourceMachine)
           Console.WriteLine("TimeToReachQueue: " &  deadMsg.TimeToReachQueue.ToString)
           value = deadMsg.Acknowledgment
           Console.WriteLine("Reason: " & value.ToString)
           reQ.Send(deadMsg, "MaxOrder")


The problem I am having is that the reQ.send is not resending the message back to the queue it came from. I just sits in the dead letter queue. The body format of the message is the XMLFormatter. I plan on using the deadMsg message data to write a log file in my database, but the important piece I am missing is putting the message back into the queue it came from. Anyone have any suggestions?

Thanks.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900