37 lines
9.5 KiB
XML
37 lines
9.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="499px" preserveAspectRatio="none" style="width:949px;height:499px;background:#FFFFFF;" version="1.1" viewBox="0 0 949 499" width="949px" zoomAndPan="magnify"><defs/><g><rect height="26.2969" style="stroke:#00000000;stroke-width:1.0;fill:none;" width="403" x="274.75" y="10"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="393" x="279.75" y="27.9951">Publishing messages with Forwarder component</text><rect height="75.3984" style="stroke:#000000;stroke-width:1.5;fill:none;" width="432.5" x="10" y="90.5938"/><rect height="267" style="stroke:#000000;stroke-width:1.5;fill:none;" width="613" x="330.5" y="179.9922"/><rect height="148.4688" style="stroke:#000000;stroke-width:1.5;fill:none;" width="593" x="340.5" y="291.5234"/><line style="stroke:#181818;stroke-width:0.5;fill:none;stroke-dasharray:5.0,5.0;" x1="68" x2="68" y1="73.5938" y2="463.9922"/><line style="stroke:#181818;stroke-width:0.5;fill:none;stroke-dasharray:5.0,5.0;" x1="391.5" x2="391.5" y1="73.5938" y2="463.9922"/><line style="stroke:#181818;stroke-width:0.5;fill:none;stroke-dasharray:5.0,5.0;" x1="621.5" x2="621.5" y1="73.5938" y2="463.9922"/><line style="stroke:#181818;stroke-width:0.5;fill:none;stroke-dasharray:5.0,5.0;" x1="859.5" x2="859.5" y1="73.5938" y2="463.9922"/><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="97" x="20" y="42.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="83" x="27" y="62.292">Application</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="97" x="20" y="462.9922"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="83" x="27" y="482.9873">Application</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="82" x="350.5" y="42.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="68" x="357.5" y="62.292">Database</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="82" x="350.5" y="462.9922"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="68" x="357.5" y="482.9873">Database</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="86" x="578.5" y="42.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="72" x="585.5" y="62.292">Forwarder</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="86" x="578.5" y="462.9922"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="72" x="585.5" y="482.9873">Forwarder</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="128" x="795.5" y="42.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="114" x="802.5" y="62.292">Message broker</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="128" x="795.5" y="462.9922"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="114" x="802.5" y="482.9873">Message broker</text><path d="M10,90.5938 L147,90.5938 L147,97.7266 L137,107.7266 L10,107.7266 L10,90.5938 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="75.3984" style="stroke:#000000;stroke-width:1.5;" width="432.5" x="10" y="90.5938"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="92" x="25" y="103.6606">Transaction</text><polygon fill="#181818" points="379.5,124.8594,389.5,128.8594,379.5,132.8594,383.5,128.8594" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="68.5" x2="385.5" y1="128.8594" y2="128.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="67" x="75.5" y="123.7935">Store data</text><polygon fill="#181818" points="379.5,153.9922,389.5,157.9922,379.5,161.9922,383.5,157.9922" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="68.5" x2="385.5" y1="157.9922" y2="157.9922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="299" x="75.5" y="152.9263">Publish a message (using Forwarder publisher)</text><path d="M330.5,179.9922 L492.5,179.9922 L492.5,187.125 L482.5,197.125 L330.5,197.125 L330.5,179.9922 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="267" style="stroke:#000000;stroke-width:1.5;" width="613" x="330.5" y="179.9922"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="117" x="345.5" y="193.0591">Forwarder loop</text><polygon fill="#181818" points="402.5,214.2578,392.5,218.2578,402.5,222.2578,398.5,218.2578" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="396.5" x2="620.5" y1="218.2578" y2="218.2578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="92" x="408.5" y="213.1919">Poll messages</text><polygon fill="#181818" points="609.5,243.3906,619.5,247.3906,609.5,251.3906,613.5,247.3906" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="391.5" x2="615.5" y1="247.3906" y2="247.3906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="56" x="398.5" y="242.3247">Message</text><polygon fill="#181818" points="847.5,272.5234,857.5,276.5234,847.5,280.5234,851.5,276.5234" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="621.5" x2="853.5" y1="276.5234" y2="276.5234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="214" x="628.5" y="271.4575">Unwrap and publish the message</text><path d="M340.5,291.5234 L406.5,291.5234 L406.5,298.6563 L396.5,308.6563 L340.5,308.6563 L340.5,291.5234 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="148.4688" style="stroke:#000000;stroke-width:1.5;" width="593" x="340.5" y="291.5234"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="21" x="355.5" y="304.5903">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="61" x="421.5" y="303.7339">[success]</text><polygon fill="#181818" points="632.5,325.7891,622.5,329.7891,632.5,333.7891,628.5,329.7891" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="626.5" x2="858.5" y1="329.7891" y2="329.7891"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="51" x="638.5" y="324.7231">success</text><polygon fill="#181818" points="402.5,354.9219,392.5,358.9219,402.5,362.9219,398.5,358.9219" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="396.5" x2="620.5" y1="358.9219" y2="358.9219"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="86" x="408.5" y="353.856">Ack message</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="340.5" x2="933.5" y1="367.9219" y2="367.9219"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="55" x="345.5" y="378.1323">[failure]</text><polygon fill="#181818" points="632.5,398.8594,622.5,402.8594,632.5,406.8594,628.5,402.8594" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="626.5" x2="858.5" y1="402.8594" y2="402.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="40" x="638.5" y="397.7935">failure</text><polygon fill="#181818" points="402.5,427.9922,392.5,431.9922,402.5,435.9922,398.5,431.9922" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="396.5" x2="620.5" y1="431.9922" y2="431.9922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="206" x="408.5" y="426.9263">Nack message (and retry again)</text><!--MD5=[bcb1a6082a0f0286ad04e19134bd6e8f]
|
|
@startuml
|
|
title Publishing messages with Forwarder component
|
|
|
|
participant "Application" as app
|
|
participant "Database" as db
|
|
participant "Forwarder" as fwd
|
|
participant "Message broker" as broker
|
|
|
|
group Transaction
|
|
app -> db: Store data
|
|
app -> db: Publish a message (using Forwarder publisher)
|
|
end
|
|
|
|
group Forwarder loop
|
|
fwd -> db: Poll messages
|
|
db - -> fwd: Message
|
|
fwd -> broker: Unwrap and publish the message
|
|
alt success
|
|
broker - -> fwd: success
|
|
fwd -> db: Ack message
|
|
else failure
|
|
broker - -> fwd: failure
|
|
fwd -> db: Nack message (and retry again)
|
|
end
|
|
|
|
end
|
|
@enduml
|
|
|
|
PlantUML version 1.2022.3beta2(Unknown compile time)
|
|
(GPL source distribution)
|
|
Java Runtime: Java(TM) SE Runtime Environment
|
|
JVM: Java HotSpot(TM) 64-Bit Server VM
|
|
Default Encoding: UTF-8
|
|
Language: en
|
|
Country: US
|
|
--></g></svg> |