(no title)
smorgusofborg | 3 years ago
On guice/gwizard/maven, if I understand correctly I would be defining new guice DI for something like a message broker (and gwizard's solutions for similar modules might serve as a template) while probably just using direct dependencies in maven for something that doesn't need to be mocked in unit tests or replaceable in production?
stickfigure|3 years ago
The main reason to make a separate guice module for the message broker is if setup requires a lot of boilerplate. You can put it all in a common jar artifact and include that in different services. But that's overkill if you just have one service, or if the broker has a fairly friendly interface to start with.
Guice is just a little bit of structure to bind together Normal Java Code. You don't need to wrap services or do things eg "the spring way". Just use the service; if you find yourself repeating code, consider abstracting it into a separate module.