由于某种原因,我有一些消息在错误队列中出现。我正在尝试使用ReturnToSourceQueue.exe实用程序,但它失败了。这是发生的事情:
PS C:\tools\NServicebus> .\ReturnToSourceQueue.exe
Please enter the error queue you would like to use:
nservicebus_errors
Please enter the id of the message you'd like to return to its source queue, or 'all' to do so for all messages in the q
ueue.
all
Attempting to return message to source queue. Please stand by.
Returning message with id 60dda2a3-e60f-4eaf-a40b-3a081cde0258\4114510 to queue
Could not return message to source queue.
Reason: Format name is invalid.
at System.Messaging.MessageQueue.MQCacheableInfo.get_WriteHandle()
at System.Messaging.MessageQueue.StaleSafeSendMessage(MQPROPS properties, ITransaction transaction)
at System.Messaging.MessageQueue.StaleSafeSendMessage(MQPROPS properties, IntPtr transaction)
at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTr
ansactionType transactionType)
at NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.Class1.ReturnMessage(String messageId)
at NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.Class1.ReturnMessageToSourceQueue(String messageId)
Message ID not found in time. Going to look in message labels for original ID.
Returning message with id 60dda2a3-e60f-4eaf-a40b-3a081cde0258\4114510 to queue
Could not return message to source queue.
Reason: Format name is invalid.
at System.Messaging.MessageQueue.MQCacheableInfo.get_WriteHandle()
at System.Messaging.MessageQueue.StaleSafeSendMessage(MQPROPS properties, ITransaction transaction)
at System.Messaging.MessageQueue.StaleSafeSendMessage(MQPROPS properties, IntPtr transaction)
at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTr
ansactionType transactionType)
at NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.Class1.ReturnMessage(String messageId)
at NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.Class1.ReturnMessageToSourceQueue(String messageId)
Returning message with id 60dda2a3-e60f-4eaf-a40b-3a081cde0258\4192925 to queue
知道这里发生了什么吗? “格式名称无效”是什么意思?
答案 0 :(得分:0)
该工具从消息头中提取队列的名称,该消息头存储在消息的Extension属性中(假设此处为MSMQ)。这意味着从该工具派生的名称无效。我将查看消息头并查看它对源队列的作用。这是由内部的NSB设置的,所以我猜它是环境的(集群或远程队列可能)?