Comments (4)
I saw your updated documentation. However, I still have some questions
JSON serialization is flexible. So when an Order is deserialized into Invoice and Delivery just the needed data is read
, How is this possible? I know they use the same topic, but no relation exists between Order and Invoice i.e foreign key- Things become complex when if no such relation exists. Order data on Kafka consumed by Invoice and Shipping. Since there is no relation between Shipping and Invoice, Invoice may consume one Order object and shipping may consume different Order object. When the user pulls his order information, he may not see correct information.
I looked at other implementations, they deserialized Order (in their case Car) object on another microservice. Am I missing something here?
from microservice-kafka.
1 - The attributes in Order
, Invoice
and Delivery
have the same names. So a serialized Order
can be interpreted as an Invoice
or a Delivery
. The additional attributes are ignored.
2 - The Order
has an ID that is also present in Invoice
and Delivery
. So there is a relation.
from microservice-kafka.
Got it. In large enterprise applications do you think it's a good idea to have the same id for all the Objects? Let's just say we have custom order id: ORD112-34-44847477
for Order
and as per your implementation Invoice
and Delivery
will get the same ID which has ORD in it, which confuses users. I think it's better to have a unique id (invoice_id, delivery_id)
for each object based on object/microservice name and have the ID attribute for relation. What do you think?
from microservice-kafka.
You need to correlate orders to invoices and deliveries. I am not sure how that should be done if the invoice and delivery do not contain the id of the order. Note that there might still be an additional invoice or delivery id.
from microservice-kafka.
Related Issues (17)
- mvn package build issue HOT 6
- Failed to execute ms-kafka-order
- Question: use of `-XX:TieredStopAtLevel=1 -noverify` HOT 1
- project builds, but tests fail HOT 3
- docker compose fails HOT 1
- Proxy error HOT 2
- I want to change db from postgresql to mysql. HOT 1
- Invoice and Shipment services don't start due to missing topic ? HOT 3
- Request without post or get HOT 3
- Passwords in `.properties` file HOT 1
- Oders are not processed HOT 5
- returned a non-zero code: 137 HOT 1
- mvn package installation should be done via docker multi-stage build HOT 1
- Race condition of topic creation from KAFKA_CREATE_TOPICS & the Spring apps (?) HOT 1
- Postgres init-user-db.sh not executed when using docker on Windows
- Starting mskafka_zookeeper_1 ... error ERROR: for mskafka_zookeeper_1 Cannot start service zookeeper: driver failed programming external connectivity on endpoint mskafka_zookeeper_1 (de37724a560282572b4e7698cc26e584e0709fb4bb1401beef02cda986e894da): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:2181:tcp:172.18.0.3:2181: input/output error ERROR: for zookeeper Cannot start service zookeeper: driver failed programming external connectivity on endpoint mskafka_zookeeper_1 (de37724a560282572b4e7698cc26e584e0709fb4bb1401beef02cda986e894da): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:2181:tcp:172.18.0.3:2181: input/output error ERROR: Encountered errors while bringing up the project. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microservice-kafka.