Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make service startup in dev mode explicit and not depending on topic declaration #3208

Open
kroeberk opened this issue Mar 20, 2021 · 0 comments

Comments

@kroeberk
Copy link

kroeberk commented Mar 20, 2021

Lagom Version (1.2.x / 1.3.x / etc)

1.6.4

API (Scala / Java / Neither / Both)

scala with macwire

Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)

MacOs Big Sur

JDK (Oracle 1.8.0_112, OpenJDK 1.8.x, Azul Zing)

OpenJDK 1.8

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

  1. I start the services in dev mode using sbt runAll
  2. I would expect to be able to manually define which services are started (and I mean all the way startup, including instantiation of ServiceImpl classes)

Actual Behavior

  1. I start the services in dev mode using sbt runAll
  2. Only services that produce kafka topics are started automatically
  3. services that consume kafka messages (only have a subscriber and no own topics) are not started
  4. this means that every service that only consumes has to be initialized with a previous message. An email service that consumes some kafka messages and sends out emails is not initialized

I would expect there to be a way to eagerly initialize classes like I could with guice in PlayFramework. Especially for initialization of certain data or for the described passive listener behaviour this is crucial.

I could not find anything in the docs, on google or anywhere else to facilitate this so I'm guessing explicit eager startup is not possible right now. Only services with topics are started eagerly.

Reproducible Test Case

That issue is reproducible even in the demo projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant