Git Product home page Git Product logo

vertx-workers-example's Introduction

README

This project is a small example of Worker verticles running with Vert.x 3.5.2. It simulates a small coffee shop processing orders from customers. Customers send coffee orders to a HTTP endpoint, which are then sent to worker verticles which process the order for a random period of time, in effect behaving like blocking code.

Compiling

To compile the application, run the following with at least Java 8:

./mvnw package

Running

To run the application:

java -Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory -jar target/vertx-workers.jar

The Dvertx.logger-delegate-factory-class-name system variable ensures that SLF4j is used with logback so that logs contain more details, in particular regarding threads running.

The application runs by default on the port 8085.

To test the application, you can use the ruby script present at the root:

ruby process_messages.rb

The script sends 2 batches of 3 random coffee orders to the HTTP http://localhost:8085/coffee endpoint.

License

Apache License, version 2.0.

© Copyright 2018 – Sébastien Le Callonnec

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.