Remove the indents in a sequence diagram in PlantUML

Remove the indents in a sequence diagram in PlantUML

I like PlantUML for its super-simple syntax that allows me to create visualizations for complex operations or flows. Sometimes, a sequence diagram is needed to remove space between messages. And PlantUML supports it!

Just define !pragma teoz true, and the new Teoz engine processes a diagram. Add & to the start of a row to ignore the indent between messages.

@startuml
!pragma teoz true
actor Customer as C
participant "HTTP API" as API
database "Database" as DB

C -> API: Message
& API -> DB: Same message
@enduml

More about Teoz engine here: https://plantuml.com/teoz. It supports many more amazing functions to empower a sequence diagram.