question: idiomatic to use one topic?
See original GitHub issuehello,
i’m quite new to camunda and bpmn, so please for please forgive if this sounds stupid. is it idiomatic, recommended, or even necessary to have one (kafka) topic for all the messages flowing through the system? i’m hoping that this show-case repo uses only one in order to keep the complexity low. but i would expect dedicated topics between the stages.
one topic for all doesn’t seem to me be good option from a scalability and performance perspective. having each listening party on the event-bus to read, evaluate, and optionally discard a message is costly. the more stages, the more event-/command-messages there will be, and the more events each component/listener needs to consume/process.
at least this is how i explain, why i can see a big difference in processing time of each order when placing 1 order vs 1000 orders at a time. (admitted, the later use-case is not frequent, but can regularly arise when the “order” application would have a temporary outage for some time and would need to catch up after being brought up again.)
i’ve extended the code a little bit by measuring the duration of the examples individual stages: https://github.com/xitep/flowing-retail/commits/pete/customization
i’m based on a few commits behind your current master
but there were no significant changes i believe. you can run the applications via mvn -f <app> exec:java
, follow the “order” application’s log to see the timings per order and then place for example 1000 orders using curl
:
curl -X PUT 'http://localhost:8090/api/cart/order-many?customerId=123&numOrders=1000'
maybe i’m misinterpreting something, but i appears that payment, fetching and shipping goods get more costly the more orders there are in the pipeline which i would not expect.
many thanks for clarifications in advance.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Hi Xitep. There is an awesome blog post from Martin Kleppman about this topic available: https://martin.kleppmann.com/2018/01/18/event-types-in-kafka-topic.html. Cheers Bernd
yeah … makes sense. thank you!