Create sequence diagrams with simple online tool

Swimlanes.io is a free webapp for making sequence diagrams. You simply edit the text on the left and the diagram is updated in real time. You can download your sequence diagrams as images or distribute with a link.

Title: Event Source with lindorm.io alias App: Event Source alias MQ: RabbitMQ alias DB: Database order: Client, App, MQ, DB _: **Initialisation** App -> App: Create subscription for command note App,MQ:``` handler: (command) => { create_event("said_hello", command.data) } queue: "unique_command_queue" topic: "say_hello" ``` App -> App: Create subscription for saga note App,MQ:``` handler: (event) => { console.log(event.data.say) } queue: "unique_saga_queue" topic: "said_hello" ``` App -> App: Create subscription for view note App,MQ:``` handler: (event) => { set_state({ messages: [ event.data.say ] }) } queue: "unique_aggregate_queue" topic: "said_hello" ``` App -> MQ: Register subscription consumers _: **Runtime** Client -> MQ: Send Command note:``` id: "uuid" aggregate: "messages" name: "say_hello" data: { say: "hello" } ``` MQ --> Client: OK _: **Aggregate (source of truth)** MQ -> App: Command received note:``` topic: say_hello ``` App -> App: Run handler App -> App: Handler creating event note:``` id: event.id aggregate: "messages" causation: command.id name: "said_hello" data: event.data timestamp: now() ``` App -> DB: Store event DB --> App: OK App -> MQ: ACK command App -> MQ: Send Event _: **Saga (automation)** MQ -> App: [saga] Event received App -> App: Run handler App -> App: Handler logging: ```"hello"``` App -> DB: Store causation in saga list of causations App -> DB: Store new saga state DB --> App: OK App -> MQ: ACK event _: **View (projection)** MQ -> App: [view] Event received App -> App: Run handler App -> App: Handler changing view state App -> DB: Store causation in view list of causations App -> DB: Store new view state DB --> App: OK App -> MQ: ACK event