lagom

Simple Microservice framework [closed]

大憨熊 提交于 2020-01-14 06:31:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . For a while I was looking for a fast and simple solution for a microservice framework. I am quite new to all Lightbend products & scala but since its looks very interesting I decided to give it a try. Few Questions: 1) I don’t understand why there is a need for the new framework

Configure Kubernetes nginx for an external access

允我心安 提交于 2020-01-06 11:48:31
问题 I'm still new to Kubernetes and Lagom. I need to invoke my Lagom microservice from an external server. To do that, I think that I need to expose my nginx-ingress for an external access, but I don't know how. Should I configure an "externalIPs"? { "apiVersion": "v1", "kind": "Service", "metadata": { "name": "nginx-ingress" }, "spec": { "type": "LoadBalancer", "ports": [ { "port": 80, "name": "http", "targetPort": 8080 }, { "port": 443, "name": "https" } ], "externalIPs": [ "192.168.1.120" ],

How to fetch all persisted entities

折月煮酒 提交于 2019-12-25 12:49:08
问题 I am completely new to the lagom framework, hence, i was reading the documentation today and started modifying their hello world example. However, i am unable to find a way to fetch all persisted entities (i.e. all persisted greetings in this example). This is how the default example fetches a person's greeting: @Override public ServiceCall<GreetingMessage, Done> useGreeting(String id) { return request -> { // Look up the hello world entity for the given ID. PersistentEntityRef<HelloCommand>

Lagom Publish message with Kafka

半城伤御伤魂 提交于 2019-12-24 20:19:42
问题 Only one way of publishing is described here. There is another way? The example I need to make a publication with dynamic topic id and custom event without persistentEntityRegistry? And how do I can publish the event with eventId? @Override default Descriptor descriptor() { return named("helloservice").withCalls( pathCall("/api/hello/:id", this::hello), pathCall("/api/event/:id", this::pushEventWithId) // id - eventId ) .withTopics( topic(GREETINGS_TOPIC, this::greetingsTopic) ) .withAutoAcl

Column family ID mismatch (found 52ac10b0-6e1b-11e7-82d3-c39cc53c1347; expected 42e51050-6e1b-11e7-82d3-c39cc53c1347)

∥☆過路亽.° 提交于 2019-12-13 22:07:49
问题 am running the Lagom online-auction-java and am having the error , when running below when i execute sbt clean runAll ERROR [Native-Transport-Requests-13] 2017-07-21 16:52:45,704 ErrorMessage.java:384 - Unexpected exception during request java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.ConfigurationException: Column family ID mismatch (found 52ac10b0-6e1b-11e7-82d3-c39cc53c1347; expected 42e51050-6e1b-11e7-82d3-c39cc53c1347) at org.apache

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

我只是一个虾纸丫 提交于 2019-12-13 00:34:19
问题 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 akka.NotUsed . But I don't know what's the significance of it. 回答1: The second parameter is the materialized value, that is, when you run the source, it's the value that gets returned by the run method to you. All stream shapes in Akka streams have

Lagom: Asynchronous Operations in Command Handlers

老子叫甜甜 提交于 2019-12-12 05:24:53
问题 In Lagom, what do you do when a command handler must perform some asynchronous operations? For example: override def behavior = Actions().onCommand[MyCommand, Done] { case (cmd, ctx, state) => // some complex code that performs asynchronous operations // (for example, querying other persistent entities or the read-side // by making calls that return Future[...] and composing those), // as summarized in a placeholder below: val events: Future[Seq[Event]] = ??? events map { xs => ctx

Lagom message durability between persistent actor and read processor

穿精又带淫゛_ 提交于 2019-12-12 02:16:11
问题 just wondering about the guarantee of the event notification delivery from the persistent event sourced actor to the read processor in lagom , is there any or there is no message durability for event notification to the read processor which will update the query side ? I understand there is eventual consistency which is fine but i am talking about the event handler notification to the Cassandra read processor. 回答1: Event processing is guaranteed by using event sourcing in the persistent

Enabling the CORS filter for Lagom Java

本秂侑毒 提交于 2019-12-11 05:40:58
问题 I have followed the instruction of Cross-Origin Resource Sharing in order to access localhost:9000 (Lagom GateWay where my microservices are running) from localhost:3000 (where my angular front-end is running). but still I face: XMLHttpRequest cannot load http://localhost:9000/api/myservice. No 'Access-Control-Allow-Origin' header is present on the requested resource doe anyone have a sample or project that enabling CORS works there? 回答1: This is a quote from James Roper He publish in the

Column family ID mismatch (found cebcc380-72d4-11e7-9a6b-bd620b945799; expected c05d6970-72d4-11e7-9a6b-bd620b945799)

久未见 提交于 2019-12-07 19:39:20
问题 How can i resolve this error Column family ID mismatch (found cebcc380-72d4-11e7-9a6b-bd620b945799; expected c05d6970-72d4-11e7-9a6b-bd620b945799) Caused by: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.ConfigurationException: Column family ID mismatch (found cebcc380-72d4-11e7-9a6b-bd620b945799; expected c05d6970-72d4-11e7-9a6b-bd620b945799) at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_131] at java.util.concurrent.FutureTask.get