CommandProcessor.AddHandlersToRouter uses internally AddNoPublisherHandler to add a handler to a router CorrelationID middleware does not work. Since it assumes that the handler should return a list of new messages but AddNoPublisherHandler wraps the call into a function and always returns nil instead of messages.
When I try to wire everything manually, adds handlers to a router then the middleware works fine.
Some code snippets would help us understand the issue (I know it's been a long time). CQRS facade assumes that messages will be published using the provider Publisher, not the handler functions.
CommandProcessor.AddHandlersToRouter uses internally AddNoPublisherHandler to add a handler to a router CorrelationID middleware does not work. Since it assumes that the handler should return a list of new messages but AddNoPublisherHandler wraps the call into a function and always returns nil instead of messages.
When I try to wire everything manually, adds handlers to a router then the middleware works fine.