I am wondering if there is a way to do the following:
main WCF service is in a class lib which gets invoked / bound to MSMQ. Have a seperate Console app which hosts the service.
2 different projects. Of course the console app references the class lib which processes messages.
I want custom handling of poison messages. No problem, I can create an attribute and decorate this ontop of the service itself and then have a custom class which implements IErrorHandler and move the message. This is all in the class lib
Problem: in order for the service to continue processing messages, the service host must be restarted.
But not possible because the class lib does not (nor should it!) have a reference to the console app which hosts the service.
what is the best way of restarting the client? I was thinking maybe there is a way to attach at runtime the attribute and errorhandler, which would be moved to the console app project and then when the service is being created to maybe attach the attribute at runtime in someway? or am I getting carried away?