EAI Guy.net

Enterprise Applicaiton Integration and SOA 2.0

Monthly Archives: June 2012

ReturnToSourceQueue.exe

ReturnMessageToErrorQueue is a command-line tool that ships with NServiceBus and returns all messages from an error queue to their source queues.

Unfortunately the directions are sparse, and my first attempt was a flop:
C:\Projects\NServiceBus\tools>ReturnToSourceQueue.exe
Please enter the error queue you would like to use:
.\private$\myNsbApp.error
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 queue.
all

Unhandled Exception: System.Messaging.MessageQueueException: Format name is invalid.
at System.Messaging.MessageQueue.MQCacheableInfo.get_Transactional()
at System.Messaging.MessageQueue.get_Transactional()
at NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.ErrorManager.set_InputQueue(Address value)
at ReturnToSourceQueue.Program.Main(String[] args)

Here is the correct syntax:

C:\Projects\NServiceBus\tools>ReturnToSourceQueue.exe
Please enter the error queue you would like to use:
myNsbApp.error@SERVERNAME
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 queue.
all

Attempting to return message to source queue. Queue: [myNsbApp.error@servername], message id: [all]. Please stand by.
Success.
Success.
Success.

Udi, please update the directions!

Advertisements