Kafka case studies for order management systems: updating inventory/stock
253
Sure, here's a rewritten overview for your Docker Hub repository:
This repository provides a robust, scalable, and efficient Kafka-based Node.js service designed to update inventory for an Order Management System (OMS) based on CompanyID and ChannelID. Leveraging Kafka for messaging ensures high throughput and reliability, making it ideal for large-scale, real-time inventory updates.
The architecture consists of the following components:
Clone the repository:
git clone https://github.com/yourusername/kafka-node-inventory-update-for-oms-by-companyid-channelid.git
cd kafka-node-inventory-update-for-oms-by-companyid-channelid
Build and start the Docker containers:
docker-compose up -d --build
Configuration is managed through environment variables and configuration files. You can set Kafka broker addresses, topics, and other relevant settings.
KAFKA_BROKER=localhost:9092
KAFKA_TOPIC=inventory_updates
COMPANY_ID=your_company_id
CHANNEL_ID=your_channel_id
Start the containers:
docker-compose up -d --build
Verify the service is running:
Check the logs to ensure the service is running and connected to Kafka:
docker-compose logs -f
Messages consumed from Kafka should be in the following format:
{
"companyID": "your_company_id",
"channelID": "your_channel_id",
"inventoryUpdate": {
"productID": "product_123",
"quantity": 100
}
}
{
"companyID": "company123",
"channelID": "channel456",
"inventoryUpdate": {
"productID": "prod789",
"quantity": 50
}
}
You can send a test message to Kafka using a Kafka producer or command-line tool:
kafka-console-producer --broker-list localhost:9092 --topic inventory_updates
Paste the example message and press Enter.
Content type
Image
Digest
sha256:ceaac241b…
Size
43.2 MB
Last updated
about 2 years ago
docker pull apige/kafka-node-inventory-update-for-oms-by-companyid-channelid