{"id":20678516,"url":"https://github.com/codecentric/event-based-shopping-system","last_synced_at":"2026-03-09T20:05:16.134Z","repository":{"id":144964999,"uuid":"43136591","full_name":"codecentric/event-based-shopping-system","owner":"codecentric","description":"Event-Based-Shopping-System using Spring Boot and Apache Kafka (based on Movie Database @TobiasFlohre)","archived":false,"fork":false,"pushed_at":"2015-10-17T15:33:13.000Z","size":2564,"stargazers_count":18,"open_issues_count":1,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T13:35:16.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecentric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-25T11:38:22.000Z","updated_at":"2024-12-16T16:04:06.000Z","dependencies_parsed_at":"2023-04-10T11:15:27.880Z","dependency_job_id":null,"html_url":"https://github.com/codecentric/event-based-shopping-system","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fevent-based-shopping-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fevent-based-shopping-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fevent-based-shopping-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fevent-based-shopping-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecentric","download_url":"https://codeload.github.com/codecentric/event-based-shopping-system/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249810782,"owners_count":21328690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T21:20:35.465Z","updated_at":"2026-03-09T20:05:11.088Z","avatar_url":"https://github.com/codecentric.png","language":"Java","readme":"## Event-Based-Shopping-System (EBSS)\n\n\u003cimg src=\"order-entry-service/src/main/resources/static/images/ebss-logo.png\" width=\"250px\"\u003e\n\nThis project is a proof of concept for an event-based-shopping-system (EBSS) using Spring Boot and Apache Kafka. As a result of an article by Tobias Flohre, we decided to implement the event-based-system described in the blog. For more information I suggest you read up the article first.\n\n### Links\n\n- Blog article by Tobias Flohre https://blog.codecentric.de/2015/09/wer-microservices-richtig-macht-braucht-keine-workflow-engine-und-kein-bpmn/\n- Inspiration: Movie Database https://github.com/tobiasflohre/movie-database\n- Apache Kafka http://kafka.apache.org/\n\n## Overview\n\nThe final infrastructure will look like the following diagram:\n\n![Planned Shopping System](https://blog.codecentric.de/files/2015/08/BPMNVsMicroservices.png \"Event Based Shopping System\")\n\n## Getting started\n\nYou can use docker to get Kafka and Zookeeper up and running, or install the tools manually.\n\n### Automatically install Apache Kafka via docker\n\nClone repository:\n\n```\ngit clone git@github.com:wurstmeister/kafka-docker.git\ncd kafka-docker\n```\n\nStart a cluster:\n\n```\ndocker-compose up -d\n```\n\nAdd more brokers:\n\n```\ndocker-compose scale kafka=3\n```\n\nDestroy a cluster:\n\n```\ndocker-compose stop\n```\n\n### Manually install Apache Kafka\n\nDownload code\n\n```\nwget http://mirror.netcologne.de/apache.org/kafka/0.8.2.0/kafka_2.10-0.8.2.0.tgz\ntar -xzf kafka_2.10-0.8.2.0.tgz\ncd kafka_2.10-0.8.2.0\n```\n\nStart Zookeeper\n\n```\nbin/zookeeper-server-start.sh config/zookeeper.properties\n```\n\nStart Kafka server\n\n```\nbin/kafka-server-start.sh config/server.properties\n```\n\n### Use Kafka \u0026 Zookeeper\n\nBefore you can use Kafka and Zookeeper you need to figure out the right ports. Use *docker-compose ps* to find the dynamically created ports for all docker containers.\n\nEach Spring Boot App contains a application.properties under *src/resources*. It is important that you update the port to match your local infrastructure, before using the Spring Boot Apps.\n\n```\n~/git/kafka-docker$ docker-compose ps\n         Name                        Command               State                          Ports                        \n----------------------------------------------------------------------------------------------------------------------\nkafkadocker_kafka_1       /bin/sh -c start-kafka.sh        Up      0.0.0.0:32777-\u003e9092/tcp                             \nkafkadocker_kafka_2       /bin/sh -c start-kafka.sh        Up      0.0.0.0:32778-\u003e9092/tcp                             \nkafkadocker_kafka_3       /bin/sh -c start-kafka.sh        Up      0.0.0.0:32779-\u003e9092/tcp                             \nkafkadocker_zookeeper_1   /bin/sh -c /usr/sbin/sshd  ...   Up      0.0.0.0:32776-\u003e2181/tcp, 22/tcp, 2888/tcp, 3888/tcp\n```\n\nStep 1: Create a topic\n\nLet's create a topic named \"test\" with a single partition and only one replica:\n\n```\nbin/kafka-topics.sh --create --zookeeper 192.168.99.100:32776 --replication-factor 1 --partitions 1 --topic test\n```\n\nWe can now see that topic if we run the list topic command:\n\n```\nbin/kafka-topics.sh --list --zookeeper 192.168.99.100:32770\ntest\n```\n\nStep 2: Run the produces to send some messages\n\nRun the producer and then type a few messages into the console to send to the server.\n\n```\nbin/kafka-console-producer.sh --broker-list 192.168.99.100:32777 --topic test\nThis is a message\nThis is another message\n```\n\nStep 3: Start a consumer\n\n```\nbin/kafka-console-consumer.sh --zookeeper 192.168.99.100:32776 --topic test --from-beginning\nThis is a message\nThis is another message\n```\n\nFor more details see http://kafka.apache.org/documentation.html#quickstart\n\n## Maven projects\n\nTo build all Maven projects please run:\n\n```\nmvn clean install\n```\n\nTo start the Spring Boot Apps use:\n\n```\nmvn spring-boot:run\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecentric%2Fevent-based-shopping-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecentric%2Fevent-based-shopping-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecentric%2Fevent-based-shopping-system/lists"}