Isaac Han (3) [Avatar] Offline
Confused for two points:

1. There are two tables in the diagram - As my understanding, Producer just wants to send a message, and for transaction purpose producer stores the message into OUTBOX table instead of sending it to message channel directly. But why there is another table on the left?

2. Is this the real transactional messaging? The full journey should be: 1. producer generates data -> 2. send it as a message through the broker -> 3. consumer reads and stores into the database. But OUTBOX only guarantees the transaction of step 1. Is my understanding correct?

Finally, could you provide a complete example? Since this part is a little bit hard to understand for readers without enough context.
ceracm (110) [Avatar] Offline
The problem is as follows:
The producer needs to do two things .
First, it needs to update data that it owns - this is the "..." table on the left.
Second, it needs to send a message to one or more consumers.
These two things must be done as part of a transaction in order to maintain consistency.

Earlier in the chapter there is a sub-sub-section titled "Transactional messaging" - that explains the problem in a bit more detail. Probably 3.3 needs to say more about the problem to provide the context and provide an example.

Thanks for your question.
Isaac Han (3) [Avatar] Offline
Understood. It is clear right now.

So it is transactional separately - caller side and consumer side. If we look the whole process which from caller to consumer, only eventual consistency can be guaranteed.

Thank you.