<mxfile><diagram name="idempotencia-eos"><mxGraphModel adaptiveColors="auto" background="#FFFFFF" pageWidth="985" pageHeight="460"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="g1" value="Kafka → Kafka: transação atômica (exactly-once)" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#F7F8FA;strokeColor=#D5DAE1;dashed=1;verticalAlign=top;align=left;spacingLeft=10;spacingTop=6;fontSize=13;fontStyle=1;fontColor=#5A626E;" vertex="1" parent="1"><mxGeometry x="15" y="0" width="930" height="190" as="geometry"/></mxCell><mxCell id="in" value="Tópico entrada" style="rounded=1;fillColor=#FFF0E5;strokeColor=#F0B48A;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="40" y="70" width="140" height="64" as="geometry"/></mxCell><mxCell id="cn" value="Consumer&lt;br&gt;read_committed&lt;br&gt;auto commit = false" style="rounded=1;fillColor=#EEF4FF;strokeColor=#9DB8F2;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="230" y="60" width="180" height="84" as="geometry"/></mxCell><mxCell id="lg" value="Lógica de&lt;br&gt;negócio" style="rounded=1;fillColor=#F2F4F7;strokeColor=#B8C0CC;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="460" y="70" width="120" height="64" as="geometry"/></mxCell><mxCell id="pr" value="Producer&lt;br&gt;transactional.id" style="rounded=1;fillColor=#F3EEFF;strokeColor=#B9A6F0;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="630" y="60" width="150" height="84" as="geometry"/></mxCell><mxCell id="out" value="Tópico saída" style="rounded=1;fillColor=#FFF0E5;strokeColor=#F0B48A;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="820" y="70" width="100" height="64" as="geometry"/></mxCell><mxCell id="e1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" source="in" target="cn" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="e2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" source="cn" target="lg" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="e3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" source="lg" target="pr" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="e4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" source="pr" target="out" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="g2" value="Kafka → banco: consumer idempotente (at-least-once + dedup)" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#F7F8FA;strokeColor=#D5DAE1;dashed=1;verticalAlign=top;align=left;spacingLeft=10;spacingTop=6;fontSize=13;fontStyle=1;fontColor=#5A626E;" vertex="1" parent="1"><mxGeometry x="15" y="230" width="930" height="190" as="geometry"/></mxCell><mxCell id="in2" value="Tópico&lt;br&gt;(entrega ≥ 1 vez)" style="rounded=1;fillColor=#FFF0E5;strokeColor=#F0B48A;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="40" y="300" width="150" height="64" as="geometry"/></mxCell><mxCell id="c2" value="Consumer" style="rounded=1;fillColor=#EEF4FF;strokeColor=#9DB8F2;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="250" y="300" width="130" height="64" as="geometry"/></mxCell><mxCell id="tx" value="Transação no banco:&lt;br&gt;1) INSERT event_id (unique)&lt;br&gt;2) aplica efeito" style="rounded=1;fillColor=#EAF7EE;strokeColor=#8FCB9F;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="440" y="285" width="220" height="94" as="geometry"/></mxCell><mxCell id="db" value="Banco de dados" style="rounded=1;fillColor=#F2F4F7;strokeColor=#B8C0CC;whiteSpace=wrap;html=1;fontSize=13;fontColor=#1B1F24;" vertex="1" parent="1"><mxGeometry x="730" y="300" width="180" height="64" as="geometry"/></mxCell><mxCell id="e5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" source="in2" target="c2" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="e6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" source="c2" target="tx" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="e7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" source="tx" target="db" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="e8" value="offsets na mesma transação (sendOffsetsToTransaction)" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8A94A6;fontColor=#5A626E;fontSize=11;labelBackgroundColor=#FFFFFF;endArrow=block;dashed=1;exitX=0.5;exitY=0;entryX=0.5;entryY=0;" edge="1" source="pr" target="cn" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell></root></mxGraphModel></diagram></mxfile>