messaging sequence diagram

This commit is contained in:
2025-11-21 22:05:11 +01:00
parent 76fee7b729
commit 3bba05ff61

View File

@@ -0,0 +1,104 @@
@startuml Messaging Sequenzdiagramm
group "Backend: Request produzieren und warten"
Endpoint -> RequestReply: request(cmdW)
RequestReply -> AtomicReference : <<create>>
RequestReply <-- AtomicReference : responseRef
RequestReply -> RequestReply : responses.put(\nrequestId,\nresponseRef)
RequestReply -> Kafka: produce(cmdW)
RequestReply <-- Kafka : Ack
RequestReply -> AtomicReference : wait()
end
note over Kafka : asynchron
group "Persistence: Request konsumieren und enqueuen"
Quarkus -> Kafka: poll()
Quarkus <-- Kafka: cmdW
Quarkus -> CommandObserver: process(cmdW)
CommandObserver -> Transaction: get(txId)
CommandObserver <-- Transaction: tx
CommandObserver -> Transaction: queue(tx, cmdW)
CommandObserver <-- Transaction
Quarkus <-- CommandObserver
Kafka <-- Quarkus : Ack
end
note over Transaction : asynchron
group "Persistence: Request verarbeiten und Response produzieren"
Transaction -> CommandWrapper : process(cmdW)
CommandWrapper -> Command : <<reflection>>\ndeserialize(cmdW)
CommandWrapper <-- Command : cmd
CommandWrapper -> Command : process(cmd)
Command -> CDI : select(Class)
Command <-- CDI : Processor
Command -> Processor : process(cmd)
note over Processor : Verarbeitung\ndes Commands
Command <-- Processor : resp
CommandWrapper <-- Command : resp
Transaction <-- CommandWrapper : resp
Transaction -> CommandResponse : serialize(resp).copyIds(cmdW)
Transaction <-- CommandResponse : respW
Transaction -> Interceptor : intercept(respW)
note over Interceptor : (asynchron;\nDetails nicht\ndargestellt)
Transaction <-- Interceptor
Transaction -> Transaction : commit()
Transaction -> Kafka : produce(respW)
Transaction <-- Kafka : Ack
end
note over Kafka : asynchron
group "Backend: Response konsumieren und benachrichtigen"
RequestReply -> Kafka : poll()
RequestReply <-- Kafka : respW
RequestReply -> RequestReply : responses.get(requestId)
RequestReply -> AtomicReference : set(respW)
RequestReply <-- AtomicReference
RequestReply -> AtomicReference : notifyAll()
RequestReply <-- AtomicReference
end
note over RequestReply : asynchron
group "Backend: Response zu Request zurückgeben" [synchron nach 1. Block, siehe oben]
RequestReply <-- AtomicReference : wegen wait (siehe oben)
RequestReply -> AtomicReference : get()
RequestReply <-- AtomicReference : respW
Endpoint <-- RequestReply : respW
end
@enduml