This repository contains three microservices developed using Go and Java languages, integrated with Apache Kafka for event processing and messaging.
-
Event Generator (Go)
- This service is written in Go and is responsible for generating "product view" events and sending them to a Kafka topic.
- The events include information about the viewed product, category, application, and session ID.
-
Order Creator (Go)
- Also implemented in Go, this service creates orders based on user product views.
- It subscribes to product view events from Kafka, then aggregates multiple products into a single order.
-
Purchase Finder (Java)
- Developed in Java using Kafka Streams, this service analyzes view events and searches for purchases related to product views.
- It processes product view events and order data from Kafka, identifies cases where a user viewed a specific product category before making a purchase, and sends relevant messages to a new Kafka topic.
- Apache Kafka
- Used for asynchronous message processing and event communication between microservices.
- Services send and receive messages through Kafka topics to ensure scalability and fault tolerance.
-
Go
- The Go services use standard library and third-party libraries like
confluentinc/confluent-kafka-go
for Kafka interaction.
- The Go services use standard library and third-party libraries like
-
Java
- The Java service utilizes
spring-kafka
for Kafka integration andkafka-streams
for real-time data processing.
- The Java service utilizes
-
Install Apache Kafka
- Ensure Apache Kafka is installed and running, including a Kafka broker and ZooKeeper.
-
Configure and Run the Services
- For each service (Event Generator, Order Creator, Purchase Finder), follow these steps:
- Install any necessary dependencies if not already installed.
- Configure the configuration files (e.g., Kafka connection parameters).
- Start each service using instructions provided in the respective README files within the service directories.
- For each service (Event Generator, Order Creator, Purchase Finder), follow these steps: