Hello,
Fellow community members, here is an extendable / re-usable / generic pub-sub model.
Microservices is a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services. In a microservices architecture, services should be fine-grained and the protocols should be lightweight.