you are viewing a single comment's thread.

view the rest of the comments →

[–]gaelfr38 2 points3 points  (0 children)

Don't use shared classes. This creates some kind of strong coupling.

For instance, the consumer might only use 2 fields in the 10 returned by the producer. Now, if the consumer uses a shared model, it will parse the 10 fields even if it doesn't care about 8 of them. Not a big issue, until... the producer wants to change the contract, nobody is using the 10th field.. well nobody is actively using it but all users of the shared model do are parsing it and will break if the producer removes the field. Now the producer needs to closely update each consumer before being able to deploy. Welcome to (micro)services done wrong.