Your creative attitude is good. However, instead of having one common message collection, each service can have its own message collection and then publish it as a NuGet package in a private repository.
So, if you have a sales service, for example, in the Sales repository, there will also be a Sales.Messages project. This is the simplest form, it will contain definitions for all teams processed by the sales service, and definitions for all events published by the sales service.
It is also useful for further splitting messages between Sales.InternalMessages and (let him just name it now) Sales.Contracts.
Internal messages are simply messages that travel within your service. Like private methods, you do not want other commands to be able to call those outside your service, and therefore you will not distribute these messages externally as a NuGet package.
Then Sales.Contracts will only contain messages that go beyond the service. Naming them βContractsβ reminds you that they are a contract between services, and therefore you need to manage them as such. This means that changes to them must be carefully considered and versioned.
source share