With MSMQ AcknowledgeTypes.NegativeReceive, is there a way to know what queue that generated the acknowledgement?

StackOverflow https://stackoverflow.com/questions/21865735

  •  13-10-2022
  •  | 
  •  

Pregunta

I am sending a message with AcknowledgeTypes.NegativeReceive with a time to be received set so that if the message isn't received off the destination queue within that time frame, a negative receive message is sent to my administration queue. This works fine. The problem is that I want to know which queue the message couldn't be received from.

When I check the message of the negative acknowledgement, there's no hint of the original queue to which the message was sent.

What I'm trying to accomplish is to treat the negative acknowledgement as an event to divert message traffic to a different queue but I need to know the queue to divert away from and that appears not to be retained in the negative acknowledgement message by default.

Is there a way to get the original destination queue out of an acknowledgment message?

UPDATE What appears to be happening is the DestinationQueue.Path in the acknowledgement message is set to the Outgoing queue on the target machine which is some GUID\ID, e.g.

enter image description here

¿Fue útil?

Solución

I found it. It is the ResponseQueue property of the acknowledgment message. Overlooked that.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top