A quick primer on microservices
As we said, a microservice focuses on solving a problem and solving it right, much like the UNIX philosophy of make each program do one thing well [Doug McIlroy].
That said, too many people describe microservices as being less than a certain number of lines of code, or less than a certain number of megabytes in total size. Nothing could be further from the truth. In fact, microservices are more closely tied to bounded contexts as defined by Eric Evans in Domain Driven Design, a worthwhile read despite having been written in 2003.
In essence, a microservice should focus on solving a particular problem, and only use enough domain knowledge to tackle that specific problem. If other parts of the system wish to interact with the same domain, their own context might be different.
Note
In case you missed it, we introduced Spring Cloud (http://projects.spring.io/spring-cloud/) in the previous chapter using Spring Cloud Stream. Spring Cloud is a collection of Spring projects...