spring-modulith
spring-modulith copied to clipboard
Allow for use of event publication registry outside of Spring Modulith
For spring boot projects which want to make use of the outbox pattern which the event publication registry provides would it be possible to extract the relevant bits into their own starter?
It would, indeed. We just would like to avoid creating a gazillion of starters for different usage flavors because that adds cognitive load for people approaching Spring Modulith (which starter would I use under which circumstances). Starters are an expression of preferred usage scenarios. While perfectly possible, using the registry outside of Spring Modulith currently is not one.
I realise this is now marked as not planned but there is precedent in Spring for creating separate projects like this e.g. spring-rety.
I still think it is worth separating this out as its own project given how the "transactional outbox" is such a great pattern.
For one, rest assured that we constantly observe this space and would reconsider the project arrangement in case we see the picture significantly changing. Spring Retry is not the best analogy here, as it's basically and advice and a bit of configuration to repeat method invocations. That's by no means comparable to a piece of infrastructure that deeply integrations with Spring's event multicasting and also integrates with many different third-party technologies like message brokers and databases.
I still don't quite understand what's wrong with the existing starters (spring-modulith-events-jpa et al.) because they're exactly built for what you're asking.