I have a question about messaging in our system. We have three services: Order, Cart, and Monitoring. We usually work with communication in such a way that each project has its own contracts, and others can subscribe to them via Nuget. This works well for us and makes sense.
However, we now have a situation where we want to send metrics from other services to Monitoring via a service bus. The message regarding the metrics will always be the same format. If we did it the way we do now, Order and Cart would define their own message and Monitoring would start subscribing to it. This certainly offers possibilities for extensibility, etc. However, I would rather have Monitoring say what it wants, and the others have to comply. That's why I found articles about CDC (Consumer Driven Contract Pattern). In a way, I understand this, and it makes sense to me. Monitoring defines the message, and others can send it. When a new service is added, Monitoring doesn't need to be modified. It's just beautiful.
My question is whether this breaks the "purity" of dependencies a little. Now, when I looked at Order, I saw that it pulls contracts from Cart because it receives messages from Cart. But if I use CDC for monitoring, the monitoring will have no dependencies and will still process its message. Others will have dependencies on monitoring and will not process any messages. Is this okay? How can I tell what depends on what?
Thank you in advance.