-
-
Notifications
You must be signed in to change notification settings - Fork 367
Return to source queue tool
In order to make it easy (and scriptable) to move messages back into their source queues, a simple tool has been made (currently in MSMQ flavor only) that can do just that.
You can download it here (MSMQ): http://mookid.dk/oncode/wp-content/2013/06/returnToSourceQueue.msmq_.zip
When the handling of a message fails too many time, the message is moved into an error queue. This ensures that a failing message does not prevent the service from handling messages.
When it is moved to the error queue, Rebus will add the original input queue, a.k.a. the source queue in a header on the message - this way, we can see which queue the message was originally delivered to, and we can retry the message some time in the future when we have fixed whatever it was that made the message undeliverable.
Unzip the ZIP file from above and run the script - then it will ask for all the necessary information. You may also run the script with ?
as the argument, and then you'll get a help page that explains the different command line parameters.
The script needs the name of an error queue to run.
Then it has two modes of operation:
- auto: it will quickly run through all the messages and move them back
- prompt: for each message, you will be prompted whether that message should be moved back
Moreover, it can perform a dry run, i.e. it can simulate a run.
C:\Projects\Rebus\src\Rebus.ReturnToSourceQueue.Msmq\bin\Debug>returnToSourceQueue.msmq.exe
Perform a (d)ry dun or actually (m) move messages? (d/m) > d
Please type the name of an error queue > finance.backend.error
Move (a)ll messages back to their source queues or (p)rompt for each message (a/p) > p
Would you like to move 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465673 to finance.backend.input@MHG-PC? (y/n) (y/n) > y
Moved 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465673 to finance.backend.input@MHG-PC
Would you like to move 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465675 to finance.backend.input@MHG-PC? (y/n) (y/n) > y
Moved 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465675 to finance.backend.input@MHG-PC
Would you like to move 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465677 to finance.backend.input@MHG-PC? (y/n) (y/n) >
C:\Projects\Rebus\src\Rebus.ReturnToSourceQueue.Msmq\bin\Debug>returnToSourceQueue.msmq.exe finance.backend.error --auto-move --dry Moved 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465673 to finance.backend.input@MHG-PC Moved 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465675 to finance.backend.input@MHG-PC Moved 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465677 to finance.backend.input@MHG-PC Moved 3d0adb87-f9e1-4172-8429-ad0ce3954006\31465680 to finance.backend.input@MHG-PC Aborting queue transaction
Sorry, but the tool has not yet been made in a Rabbit flavor.
Basic stuff
- Home
- Introduction
- Getting started
- Different bus modes
- How does rebus compare to other .net service buses?
- 3rd party extensions
- Rebus versions
Configuration
Scenarios
Areas
- Logging
- Routing
- Serialization
- Pub sub messaging
- Process managers
- Message context
- Data bus
- Correlation ids
- Container adapters
- Automatic retries and error handling
- Message dispatch
- Thread safety and instance policies
- Timeouts
- Timeout manager
- Transactions
- Delivery guarantees
- Idempotence
- Unit of work
- Workers and parallelism
- Wire level format of messages
- Handler pipeline
- Polymorphic message dispatch
- Persistence ignorance
- Saga parallelism
- Transport message forwarding
- Testing
- Outbox
- Startup/shutdown
Transports (not a full list)
Customization
- Extensibility
- Auto flowing user context extensibility example
- Back off strategy
- Message compression and encryption
- Fail fast on certain exception types
Pipelines
- Log message pipelines
- Incoming messages pipeline
- Incoming step context
- Outgoing messages pipeline
- Outgoing step context
Prominent application services