From 3bba05ff61932be47cceed2bcd39b6a134f3e3c5 Mon Sep 17 00:00:00 2001 From: Lennart Heinrich Date: Fri, 21 Nov 2025 22:05:11 +0100 Subject: [PATCH] messaging sequence diagram --- plantuml/messaging-sequence.puml | 104 +++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 plantuml/messaging-sequence.puml diff --git a/plantuml/messaging-sequence.puml b/plantuml/messaging-sequence.puml new file mode 100644 index 0000000..bd7a67e --- /dev/null +++ b/plantuml/messaging-sequence.puml @@ -0,0 +1,104 @@ +@startuml Messaging Sequenzdiagramm + +group "Backend: Request produzieren und warten" + +Endpoint -> RequestReply: request(cmdW) + +RequestReply -> AtomicReference : <> +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 : <>\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 +