Git Product home page Git Product logo

spot's Introduction

Spot


This project is an example of how to use the "Spring Cloud Stream" with Java functional programming.

This example uses the message broker Kafka.

Running environment


For the up environment:

# This command runs: Kafka Broker and Kafka UI
docker-compose up -d

# With makefile
make up

For access the Kafka UI click here.

For the down environment:

# This command down all environment and remove all unused files, folders and configurations
docker-compose down --remove-orphans --volumes

# With makefile
make down

API


Request example:

The order with a value less than or equal to 500.00 is valid and returns APPROVED.

The order with a value greater than to 500.00 is invalid and returns REJECTED.

curl --location --request POST 'http://localhost:8080/spot/v1/orders' \
--header 'Content-Type: application/json' \
--data-raw '{
    "customer_id": "36a8ea26-4eb0-4b9d-b609-d095175a2f7b",
    "value": 1000.00
}'

spot's People

Contributors

jonathanmdr avatar

Watchers

 avatar  avatar  avatar

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.