Identifying saga time out message in a outgoing message mutator based on header value


(Sanil Paul) #1

I am using a message mutator to add custom headers to all outgoing messages except saga timeout message. I am using presence of NServiceBus.IsSagaTimeoutMessage in the header to figure out whether its a timeout message. I don’t prefer coupling myself to the NSB internals here on the header value. Is there any other better option to accomplish the same result?


(Mike Minutillo) #2

I think the header is the only way to identify saga timeout messages.

Out of interest, why do you need to exclude Saga Timeout messages?


(Sanil Paul) #3

Sure. We pass some audit trail information(user, session etc) through the message headers from the web. In sagas that has timeout, when something is due to be checked, its not initiated by the user. so we would need to clear out our custom audit trail information from the headers.