This guide continues the previous one. It shows how to create Multi-Datasource dynamically. When a user registers, a new data source connection is registered dynamically. The app uses Grails Multi-Tenancy capabilities in DATABASE mode.That it is to say, when a new user register, a new database is wired-up for the new tenant.
When you picture how microservices communicate, you are probably thinking about an exchange of HTTP requests between each other. @bitboss in his talk at GR8Conf EU explains the problems you may face if you choose that route ( Service discover, timeouts, Errors, Latency, Load Balancing, Stability ...). He pitches the use of an Event-Driven Architecture.
Moreover, he praises Grails Events system. He demos how to replace a Spring Boot microservice with a Grails application in an application composed of several microservices. He shows how to use RabbitMQ Native Plugin and Grails Events. Sample Repository.
He uses, the recently updated, RabbitMQ Native Grails Plugin.