Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
kotdv
@kotdv
and then in SerializerRegistry I add TestMessage to the registry via: JsonSerializer[TestMessage]
JsonSerializer(derived.oformat[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 .....
kotdv
@kotdv
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.
@blanchet4forte
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
kotdv
@kotdv
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
mosaic-prateek-singh
@mosaic-prateek-singh
@ihostage hi Sergey yes i am running in DEV-mode
Sergey Morgunov
@ihostage
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.
David Leonhart
@leozilla
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.
mosaic-prateek-singh
@mosaic-prateek-singh
@ihostage thanks for help i will try after deploy in server
nikhilaroratgo
@nikhilaroratgo
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
glothos
@glothos
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
Sergey Morgunov
@ihostage
@glothos Of course, you can use an Akka Scheduler as any other Akka feature on Lagom.
glothos
@glothos
Just by injecting the actor system, I can use akka as normal inside my service then?
Sergey Morgunov
@ihostage
@nikhilaroratgo What you mean? Validation of the format of HOCON configuration?
@glothos Yep :wink:
glothos
@glothos
sounds great, thank you
Sergey Morgunov
@ihostage
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.
glothos
@glothos
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
lynxpluto
@lynxpluto
@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
Pawan Kumar
@pawank
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
mosaic-ankit-bhatter
@mosaic-ankit-bhatter
hi All, how do we implement HATEOAS in Lagom ? any example or docs reference if anyone can share.
Enzo Bonggio
@enzobonggio
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
Prasad Mokkapati
@prasadmokkapati_twitter
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 ?
Tim Moore
@TimMoore
@prasadmokkapati_twitter Play sessions aren't stored in the back end, only in the cookie. This should "just work".
Prasad Mokkapati
@prasadmokkapati_twitter
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 ?
matrixbot
@matrixbot
Miuler JWT should contains a microprofile of the user, from there you would get the information
Prasad Mokkapati
@prasadmokkapati_twitter
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.
matrixbot
@matrixbot
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.
Prasad Mokkapati
@prasadmokkapati_twitter
How do we get JWT from the header? What field in the header has the JWT ?
Tim Moore
@TimMoore
Mikkel Nygaard Ravn
@mravn
Hello. Is it possible to run two instances of the same service in development mode?
SahilAggarwalG
@SahilAggarwalG
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
Joe Koberg
@jkoberg
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
Renato Cavalcanti
@renatocaval
Hi @/all, we are please to announce that Lagom 1.5.5 is released
https://github.com/lagom/lagom/releases/tag/1.5.5
Enjoy!
Sergey Morgunov
@ihostage
:tada:
Geovanny Mendoza Gonzalez
@Geovanny0401
cool
Srepfler Srdan
@schrepfler
đź‘Źđź‘Źđź‘Ź