I’m facing to a problem when implementing the ConfigureHowToFindSaga() method of a saga orchestration service class.
in this method i have to specify how to connect the message received to the current saga conversation. I have to specify in particular the property of the message which contains the saga id.
This propery is like this: message.Sup.SubProperty and i can’t do it becouse the nservicebus gets just the first property of message.
I don’t want to change my nservicebus version.
how can i figure it out?
You have 2 options:
Create a message handler which sends a new kind of message that has the property with which you need to correlate defined at a higher level.
Write your own saga finder by implementing IFindSagas<T>.Using<M>.
I think that option 1 would be easier to code. You can also host the handler in the same endpoint as the saga and then do a Bus.SendLocal so that it doesn’t impact your deployment in any significant manner.