api-guidelines
api-guidelines copied to clipboard
[define] support for commands
(i) This issue has been manually transferred from a former internal repository, as a private repository issue cannot be transferred to a public repository.
Context
This ticket contains the use cases and requirements for Commands in the context of asynchronous API.
Comment history
Jul 8, 2022 by @JanKlasser3000
Also to start with, there are both command and request response pattern, so it might be reasonable to split it up
Commands use cases
- TriggerOrderConfirmation : sent from order management once all conditions are fulfilled and the customer should get an order confirmation message via email. Ipanema is subscribed as single subscriber to this event type/ topic and once a message is received sends the order confirmation to the customer
- Send Partner E-mail : to inform market place partners, e.g. UI-partners that do not want to check the UI often a message can be sent to Neptune so that they inform the partner (TODO find out who owns the topic)
Request Response
- For market place orders partner / fulfillment control an order(part=position-item) once its processable. In case a customer wants to cancel an position-item he requests it. As consequence the sales-order-management will send out a message to the fulfillment. As we have two teams providing fulfillment services, there is a criteria in the message to allow the teams to find out where they are responsible. The requests message is sent to the normal order stream topic. As a consequence a cancel message or a rejection message is sent back in the topic of the responding team, which the sales order management consumes and updates the position item status.
Sep 13, 2022 by @thake
When adding the concept of a "command," we'll have to check if the definitions of "API provider" and "event producer" also fit the "command" use-case.