General discussion of Lagom: https://www.lagomframework.com/ | Code of Conduct: https://www.lightbend.com/conduct | Forums: https://discuss.lagomframework.com | Commercial support from https://www.lightbend.com/
and then in SerializerRegistry I add TestMessage to the registry via: JsonSerializer[TestMessage]
or whatever... I don't have direct formats like this defined in SerializerRegistry, but I have classes composed from such Sum classes
even in your case if it's a message, it has nothing to do with SerializerRegistry, assuming by naming convention it should go to Kafka or some other message broker
if it's a Command, or Event, or a State... then it will not go there like "TestMessage" directly, it will go as a part of some command or event, e.g. final case class TestCmd(msg: TestMessage) extends .....
and then JsonSerializer(derived.oformat[TestCmd]()) would definitely work
pretty much if you want that exact format in SerializerRegistry, most likely you have to pass it there as
you define it in companion object
Robert D. Blanchet Jr.
Yea. So the issue was that I could register the sealed trait with the registry but not derived case classes from that trait.. the implicit wouldn't be found. However, I think your idea of "wrapping" that item in a case class the Serializer Registery does know about will work. Thanks for the help
you can try JsonSerializer(derived.flat.oformat[TestMessage]((__ \ "type").format[String])) too
but I don't think it's a good idea to have a command and message/request/response model to use the same exact class
will be issues if any of those changes, they usually are not the same
that's why a wrapper is always a good idea
@ihostage hi Sergey yes i am running in DEV-mode
On dev-mode Lagom uses a single-node cluster and me not sure, that you can correctly test an akka-management health check on dev-mode.
Is there a way to specify Metadata when publishing a message to a topic when reading it from the PersistentEntityEventStream? I would like to add a timestamp and message version attribute there.
@ihostage thanks for help i will try after deploy in server
Hello everyone,Does lagom offer conf properties validation like we have in spring boot?If not,has anyone already created something to have such kind of validation.Thanks in advance
Hello everyone! By reading the docs I was wondering if this akka integration example works as a task scheduler? I'm in need of a task scheduler that runs every 15 seconds if a certain Kafka event is not triggered by another service. By reading this example I'm in doubt of what is the service abstraction and what is the job abstraction of a task scheduler. Can someone shed me some light? https://www.lagomframework.com/documentation/1.5.x/scala/Akka.html
@glothos Of course, you can use an Akka Scheduler as any other Akka feature on Lagom.
Just by injecting the actor system, I can use akka as normal inside my service then?
@nikhilaroratgo What you mean? Validation of the format of HOCON configuration?
@glothos Yep :wink:
sounds great, thank you
Lagom gives you something more then Akka and Play. But he does not break other Akka/Play features. You can use Akka Scheduler, Alpakka, Play Evolutions, Play Filters, Play JPA and many other features without problems.
I was just wondering by seeing the example if there was a need of another kind of encapsulation besides injecting to the service
Example is kinda confusing because of the service example, I was not sure what was the service in question or if the "Job" was an abstraction of the task in the scheduler
in another languages it's common to say that a "job" is a task function
@leozilla If you are using Cassandra for the write-side then the only metadata you can access using the PersitentEntity eventStream is Offset which incapsulates time based uuid
Any idea why for this project: https://github.com/mliarakos/lagom-scalajs-example running "~runAll" is not triggering fastOptJS but instead calling fullOptJS? Setting isDevMode in ThisBuild := true in build.sbt during development too is of no use. Thanks
hi All, how do we implement HATEOAS in Lagom ? any example or docs reference if anyone can share.
Hi! I want to increase the size of the headers that I'm receiving on client side, I'm trying with play.server.akka.max-header-value-length and akka.http.parsing.max-header-value-length (not working). Could you tell me what configuration should I change? Thanks
We have mobile app and want to keep the Play session values alive between server restart. Since Play session uses JWT is there a way to get values from the session so we can "reconnect" the user to the backend ?
@prasadmokkapati_twitter Play sessions aren't stored in the back end, only in the cookie. This should "just work".
What happens when a server is restarted. Before we had JWT we were setting the user info in the session once the user "logs" in. If the server is restarted we can't pull in the user info from the session. I am sorry I don't know much about JWT. If we are using JWT do we somehow pull user info from the header in the call even if the server is restarted ?
Miuler JWT should contains a microprofile of the user, from there you would get the information
Does session have JWT even if server is restarted. We can store user info in session and not care about if we have to pull JWT from the header and verify ? How do we store user info in JWT once the user "logs in" ? or just set in session and on server restart we can still pull user info from session.
I believe JWT is stored in the header. Do we pull JWT from header ? Can we somehow set info in JWT once the user "logs in". We should not care if the server is restarted. I apologize I am not familiar with JWT.
Miuler JWT is stored in the header, You front always send the jwt in the header, That's why I shouldn't have much information, just what is necessary.
How do we get JWT from the header? What field in the header has the JWT ?
Hello. Is it possible to run two instances of the same service in development mode?
what is minimum heap requirment to make s sample service which have one persistent entity , one readside processor and one process manager . Is there any memory usage footprints or memory uasge reports for lagom services
Has anyone constructed a Play frontend with the Lagom 1.6 Scala Service Client DSL to talk to Lagom?
Seems like there's a ServiceClientGuiceSupport mixin in the Java DSL but not in the Scala DSL