Custom Recoverability Policy

I don’t know if this is possible but I thought I would post the question and see if I can do this. We have a our own custom logging which we pass messages to a queue of type EventLogEntry. I would like to create a custom policy for messages that are going to be sent to the error queue. Besides sending the message to the error queue, I would also like to transform that message into a EventLogEntry and send it to our logging queue. Over time we would probably just send it to one of the queues but until we have everything processing well we would probably like to go to both the error queue and our logging queue.

As far as I have been able to find I don’t have anything to send a message to our logging queue from the policy.

Hi Jeremy,

Have a look at the error notifications, specifically the OnMessageSentToErrorQueue event. That might do the trick for you.

I don’t think that will work. I can get the message info with a Policy too. My issue is I want to create a new message and send it to a different queue. I don’t know how I can get an instance of IMessageSession or something like that to send my newly created message.

What about creating separate send-only endpoint and use it to send message when registered callback error notification invoked?

The other option you can try to use is ServiceControl integration events - Using ServiceControl Events • ServiceControl Contracts • Particular Docs