Giter VIP home page Giter VIP logo

Comments (4)

ignasi35 avatar ignasi35 commented on July 24, 2024

Hi @gabizou, this is the first time we hear of such an issue. Would you be able to provide a reproducer?

from lagom-samples.

gabizou avatar gabizou commented on July 24, 2024

Would you be able to provide a reproducer?

I simply cloned the lagom/shopping-cart-java sample:

  • Importing the maven pom.xml to IntelliJ
  • Running the necessary docker-compose file for the services (Kafka, zookeeper, Postgres)
  • Running mvn lagom:runAll with the debugger and a breakpoint at the flow subscription as line linked
  • Curl curl http://localhost:9000/inventory/456 and notice the result is still 0
  • Curl curl -H "Content-Type: application/json" -d 4 -X POST http://localhost:9000/inventory/456 to add 4 inventory
  • Run curl -H "Content-Type: application/json" -d '{"itemId": "456", "quantity": 2}' -X POST http://localhost:9000/shoppingcart/123 to add 2 of 456 to cart
  • Verify curl http://localhost:9000/inventory/456 and the inventory is still 4.......
  • Wait several minutes for the debugger to actually receive the first event from the shopping cart message to update the inventory side (varies, but occasionally can be 4 minutes, sometimes up to 10 minutes, and then after this initial delay, most updates are relatively within a second).

from lagom-samples.

ignasi35 avatar ignasi35 commented on July 24, 2024

I don't remember the details, but I think you need to checkout the shopping cart before the inventory is updated.

curl -X POST http://localhost:9000/shoppingcart/123/checkout

from lagom-samples.

gabizou avatar gabizou commented on July 24, 2024

So I did a re-test with the curl to checkout, turns out it works. My underlying problem turns out to be that akka/akka-persistence-cassandra#867 is giving my development environment the slow-start up that I'm observing.

from lagom-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.