In my test application, I can see the messages that were processed, and the exception is automatically inserted into the default EasyNetQ_Default_Error_Queue, which is excellent. I can then successfully dump or request these messages using Hosepipe , which also works fine, but requires dropping to the command line and calling both the Hosepipe and the RabbitMQ API to clear the message retry queue.
So, I think the easiest approach for my application is to simply subscribe to the error queue, so I can reprogram them using the same infrastructure. But at EastNetQ, the error queue seems special. We need to subscribe using the correct type and routing identifier, so I'm not sure what these values should be for the error queue:
bus.Subscribe<WhatShouldThisBe>("and-this", ReprocessErrorMessage);
Can I use a simple API to subscribe to the error queue or do I need to dig into the advanced API ?
If the type of my original message was TestMessage , then I would like to do something like this:
bus.Subscribe<ErrorMessage<TestMessage>>("???", ReprocessErrorMessage);
where ErrorMessage is the class provided by EasyNetQ to wrap all errors. Is it possible?
source share