Our Compliance Checker has now been updated to include a compliance check on the EU AI Act! Learn more.

Idempotent Consumer Workflow

This workflow models processing each message safely only once.

Full FlowZap Code

Copy and paste the following FlowZap code into a project in your FlowZap account to see this template diagram.

user { # User
  n1: circle label:"Start Idempotent Consumer"
  n4: rectangle label:"Execute Idempotent Consumer action"
  n7: rectangle label:"Monitor Idempotent Consumer status"
  n10: circle label:"End Idempotent Consumer"
  n1.handle(bottom) -> app.n2.handle(top) [label="Success"]
  n4.handle(bottom) -> app.n5.handle(top) [label="Valid"]
  n7.handle(bottom) -> app.n8.handle(top) [label="Next"]
}

app { # App
  n2: rectangle label:"Receive Idempotent Consumer event"
  n5: rectangle label:"Record Idempotent Consumer outcome"
  n8: diamond label:"Monitor Idempotent Consumer status"
  n2.handle(bottom) -> service.n3.handle(top)
  n5.handle(bottom) -> service.n6.handle(top)
  n8.handle(bottom) -> service.n9.handle(top)
  n8.handle(right) -> user.n7.handle(right) [label="Retry/Rejected"]
}

service { # Service
  n3: rectangle label:"Validate Idempotent Consumer conditions"
  n6: rectangle label:"Monitor Idempotent Consumer status"
  n9: rectangle label:"Monitor Idempotent Consumer status"
  n9.handle(right) -> user.n10.handle(bottom)
  n6.handle(right) -> user.n7.handle(left)
  n3.handle(right) -> user.n4.handle(left)
}

Related templates

Back to all templates