spring-modulith icon indicating copy to clipboard operation
spring-modulith copied to clipboard

Allow for use of event publication registry outside of Spring Modulith

Open vab2048 opened this issue 1 year ago • 1 comments
trafficstars

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?

vab2048 avatar Jun 18 '24 20:06 vab2048

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.

odrotbohm avatar Jun 19 '24 09:06 odrotbohm

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.

vab2048 avatar Nov 01 '24 11:11 vab2048

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.

odrotbohm avatar Nov 01 '24 11:11 odrotbohm