Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
so @RikD your suggestion is to just copy the three lines of code in this service to several different places where this sync should be triggerd OR implement a pub/sub queue ?
so please explain to me how putting all three steps that are completely different tasks into one class would help me in unit testing the code? I'd have a dependency to a persistence layer, a dependecy to an async queue that would not make writing tests any easier also that has nothing todo with microservices
Hi thanks for the clarification. I don't think it's irrelevant, that's why I'm asking for bad practices and not hard limits. Of course it has to be done, but if this creates a larger amount of technical dept it can influence the decision to extract related services earlier to avoid this technical dept that accumulates.