Pergunta

Is it possible to correlate on multiple properties in Rebus? Or I should combine them into one correlation Id?

Thanks

Yin

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top