Skip to content

cikupin/saga-simple-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Saga Pattern Example

A simple saga pattern example using Go and https://github.com/cikupin/go-saga library.

Requirement

  • Apache kafka (as a saga log storage)

Command

$ go run main.go main    # run saga orchestrator (port 8000)
$ go run main.go item    # run item service (port 8001)
$ go run main.go order   # run order service (port 8002)
$ go run main.go payment # run payment service (port 8003)

Flow

Endpoint : http://localhost:8000/normal-flow

normal flow

Endpoint : http://localhost:8000/purchase-failed

purchase item failed

Endpoint : http://localhost:8000/order-failed

order failed

Endpoint : http://localhost:8000/payment-failed

payment_failed

About

A simple saga pattern example in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages