Questions tagged [lagom]

Lagom is a framework for creating microservice-based systems on the Java Virtual Machine.

Lagom is a framework for creating microservice-based systems. It offers four main features:

  • Service API
  • Persistence API
  • Development Environment
  • Production Environment

The Service API provides a way to declare and implement service interfaces, to be consumed by clients. For location transparency, clients discover services through a Service Locator. The Service API supports synchronous request-response calls as well as asynchronous streaming between services.

The Persistence API provides event-sourced persistent entities for services that store data. Command Query Responsibility Segregation (CQRS) read-side support is provided as well. Lagom manages the distribution of persisted entities across a cluster of nodes, enabling sharding and horizontal scaling. Cassandra is provided as a database out-of-the-box.

The Development Environment allows running all your services, and the supporting Lagom infrastructure, with one command. It hot-reloads your services when code changes; no fragile scripts are needed to set up and maintain a development environment. With Lagom, a developer can bring up a new service or join an existing Lagom development team in just a few minutes.

328 questions
3
votes
1 answer

How to write test case for NoHostAvailableException in lagom with Scala?

I have a partial function as exceptionHandler which matches the corresponding exception and throws accordingly. I am supposed to write a test case for NoHostAvailableException, but I am unable to throw the exception using mocking. I have made…
3
votes
1 answer

How to safely skip messages using Lagom Kafka Message Broker API?

We've defined a basic subscriber that skips over failed messages (ie for some business logic reason, we are not going to handle) by throwing an exception and relying on a Akka Streams' stream supervision to resume the Flow: someLagomService …
simonl
  • 1,240
  • 7
  • 19
3
votes
1 answer

Deploy Lagom Framework as standalone jar/docker

Is it possible to deploy a Lagom Application as a standalone running jar or Docker Container? And if yes, how?
3
votes
1 answer

Async Flows Design in Lagom or Microservices

How to design asyn flows in Lagom ? Problem faced: In our product we have a Lead Aggregate which has a User Id (represents the owner of the lead), Now User has a limitation which says one user can have max of 10 Lead associated with this. We…
techagrammer
  • 1,291
  • 8
  • 19
3
votes
1 answer

Lagom | Return Values from read side processor

We are using Lagom for developing our set of microservices. The trick here is that although we are using event sourcing and persisting events into cassandra but we have to store the data in one of the graph DB as well since it will be the one that…
piyushGoyal
  • 1,079
  • 1
  • 11
  • 26
3
votes
1 answer

Kubernetes pod - image never pulled error

I'm trying to deploy my Lagom accessservices on Kubernetes. To do that I tried to containerize my service using fabric8’s docker-maven-plugin. So, I added the following plugin settings to the root project pom.xml to register the fabric8 Maven…
Imen
  • 161
  • 2
  • 14
3
votes
1 answer

Why does lagom use an async appender in production

The following resource states that Lagom uses an async logger in production. https://www.lagomframework.com/documentation/1.3.x/java/SettingsLogger.html However, lagom also uses akka and akka advises that you use the akka-way of logging in your…
3
votes
1 answer

How does event tagging work in Lagom?

Lagom reference documentation shows how to tag events: object BlogEvent { val BlogEventTag = AggregateEventTag[BlogEvent] } sealed trait BlogEvent extends AggregateEvent[BlogEvent] { override def aggregateTag: AggregateEventTag[BlogEvent] = …
Edmondo
  • 19,559
  • 13
  • 62
  • 115
3
votes
1 answer

Multipart Form Errors with Lagom

Most of our Lagom entrypoints don't use multipart form requests, but one does. Since Lagom doesn't currently support multipart requests natively, the general suggestion I have seen is to call the underlying Play API, using the PlayServiceCall…
silverberry
  • 786
  • 5
  • 20
3
votes
1 answer

What's the use and meaning of second type parameter in akka.Source

What's the use and meaning of second type parameter in akka.Source? Sample Code:- def stream: ServiceCall[Source[String, NotUsed], Source[String, NotUsed]] According to as much code I have seen up to now by default second type parameter is set to…
Ravinder Payal
  • 2,884
  • 31
  • 40
3
votes
1 answer

Akka http vs Lagom

Please help in understanding 1)Choosing Akka http vs Lagom for building a microservice 2)Is there any difference between REST API and Akka http/Lagom based microservice. Thanks
Tilak
  • 323
  • 1
  • 5
  • 18
3
votes
1 answer

How to copy an Akka Persistence Cassandra database

We have a Lagom-based project with several microservices, each one (of course) with its own Cassandra keyspace. We need to copy the production data to our qa and dev environments. In a traditional database we would simply export all of the…
Mario Camou
  • 2,303
  • 16
  • 28
3
votes
0 answers

Lagom: Persistence failure when replaying events for persistenceId

I am using lagom for building a, small sample application. I am following the structure of "hello-world" lagom sample application. But whenever I am trying to run the application, I am facing, bellow error: [error] a.c.s.PersistentShardCoordinator…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
3
votes
1 answer

Where should I define custom (de)serializers in Lagom?

I'm getting started using Lagom in Java and have a need to write a custom (de)serializer. I've read through the documents and understand the roles of the NegotiatedSerializer, MessageSerializer, SerializerFactory etc. What I don't understand is in…
3
votes
2 answers

Lagom -LagomServiceLocatorStart :Failed to start embedded Service Locator or Service Gateway?

I have just started with lagom , was trying to run the lagom example, but i am facing an error in starting the server its self. I am having the following error > runAll [info] Starting Kafka [info] Starting Cassandra ....Kafka…
Kartikeya Sharma
  • 553
  • 1
  • 5
  • 22
1
2
3
21 22