Is it possible to correlate on multiple properties in Rebus?
-
21-12-2019 - |
Frage
Is it possible to correlate on multiple properties in Rebus? Or I should combine them into one correlation Id?
Thanks
Yin
Lösung
You should combine the saga part of it into one correlation value that is stored in a single field on the saga, but you're free to do method calls and string concatenation and whatnot for generating a correlation value out of the incoming message.
The reason is technical: The saga data property path is an Expression<Func<TSagaData, object>>
that gets reflected into a string that can be used by Rebus to generate a suitable query to a database, whereas the correlator is just using a Func<TMessage, object>
to extract a correlation value from your message.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow