There are cases in which a group of use cases happens at the same time and eventual consistency must be guaranteed.
For each one of these use cases, an event is published for different topics.
An example would be the validation by scanning in dispatch, where the following events might happen and therefore be published:
Order picking area validated
Crates updated
Order staging area dispatched
Order dispatched
If an error occurred in the middle, database would rollback, but events would have been published.
Furthermore, each request to postoffice adds latency and it could be reduced to just one call.
A purpose would be to expose an endpoint that would allow us to send messages of different topics in bulk.
Postoffice already exposes POST /bulk/messages/ but it's only for messages with the same topic.
I think it's misleading, as the topic belongs to the message.
In order to don't break the current API, our proposal is to expose an endpoint like POST /bulk//multitopic-messages/ which would accept a body like:
There are cases in which a group of use cases happens at the same time and eventual consistency must be guaranteed. For each one of these use cases, an event is published for different topics. An example would be the validation by scanning in dispatch, where the following events might happen and therefore be published:
If an error occurred in the middle, database would rollback, but events would have been published.
Furthermore, each request to postoffice adds latency and it could be reduced to just one call.
A purpose would be to expose an endpoint that would allow us to send messages of different topics in bulk.
Postoffice already exposes
POST /bulk/messages/
but it's only for messages with the same topic. I think it's misleading, as the topic belongs to the message.In order to don't break the current API, our proposal is to expose an endpoint like
POST /bulk//multitopic-messages/
which would accept a body like: