You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Currently there is nothing implemented that decrements the reserved items. This
" * Currently there is nothing implemented that decrements the reserved items. This would happen, inside this service, in response to an order being shipped."
Following above comments, "in response to an order being shipped", assume below actions are required:
Decrease the reserved count in state store "reservedStock", say iPad
Decrease the count of available product (say iPad) in inventory KTable/Topic (Probably publish an event to inventory topic, but there might be latency to refresh to Ktable)
The question: How to ensure two "decreasing" happens in one atomic operation, and not enter into one inconsistent scenario based on these KStream/KTable solution?
e.g., if last iPad has been shipped, the count in reserviedStore is decreased to 0, but the "Inventory" is not decreased to 0 in one transaction, one new order may be put as "valid" order by no iPad on-sale actually
So one RDS is required for such cases?
The text was updated successfully, but these errors were encountered:
Maybe some trick existed in KTable if enabled exact-once transaction?
i.e., In transaction context, any new event/messages published to "compacted" topic of KTable, next join/query on KTable will always return the latest values (contain values from this newest event/messages)
kafka-streams-examples/src/main/java/io/confluent/examples/streams/microservices/InventoryService.java
Line 45 in a841b39
" * Currently there is nothing implemented that decrements the reserved items. This would happen, inside this service, in response to an order being shipped."
Following above comments, "in response to an order being shipped", assume below actions are required:
The question: How to ensure two "decreasing" happens in one atomic operation, and not enter into one inconsistent scenario based on these KStream/KTable solution?
So one RDS is required for such cases?
The text was updated successfully, but these errors were encountered: