Arazzo의 AsyncAPI 단계

AsyncAPI Steps in Arazzo

Arazzo 1.1에서 메시지 전송과 수신을 워크플로 단계로 연결하고 응답을 상관 ID로 기다립니다.

···
html
<div class="viz"><h3>ASYNC STEP JOIN</h3><div class="flowline"><span class="box">send<br>K7</span><span class="arrow">→</span><span class="box" id="message">wait</span><span class="arrow">→</span><span class="box" id="next">next</span></div><div class="timeline"><i id="progress"></i></div><div class="muted" id="async-note">waiting for correlationId K7</div></div>
css
.viz{width:94%;height:88%;max-width:960px;padding:clamp(10px,2vmin,18px);border:1px solid var(--line);border-radius:14px;background:var(--surface);font:600 clamp(12px,1.35vw,16px)/1.35 var(--font-sans,system-ui,sans-serif);display:flex;flex-direction:column;gap:clamp(7px,1.8vmin,13px);overflow:hidden}.viz h3{margin:0;color:var(--accent);font:700 clamp(12px,1.35vw,16px)/1.2 var(--font-sans,system-ui,sans-serif);letter-spacing:.04em}.viz .row{display:flex;align-items:center;justify-content:center;gap:clamp(5px,1.4vmin,12px);flex:1;min-height:0}.viz .box{padding:clamp(5px,1.5vmin,12px);border:1px solid var(--line);border-radius:9px;background:var(--bg);text-align:center}.viz .muted{color:var(--muted)}.viz .accent{color:var(--accent)}.viz .code{font-family:ui-monospace,monospace}.viz .pill{padding:3px 7px;border:1px solid var(--line);border-radius:99px;white-space:nowrap}.viz .active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface))}.viz .arrow{color:var(--accent);font:700 18px ui-monospace,monospace}.flowline{display:flex;align-items:center;justify-content:center;gap:8px;flex:1}.flowline .box{min-width:22%}#next{opacity:.3}#next.ready{opacity:1;border-color:var(--accent)}.timeline{height:8px;border-radius:9px;background:var(--line);overflow:hidden}.timeline i{display:block;height:100%;background:var(--accent);transition:width .4s}
js
const steps=[['unrelated K8',32,'skip unrelated message',false],['confirm K7',76,'receive matched K7',false],['confirm K7',100,'dependsOn satisfied · continue',true]];let n=0;function draw(){const s=steps[n];document.getElementById('message').textContent=s[0];document.getElementById('progress').style.width=s[1]+'%';document.getElementById('async-note').textContent=s[2];document.getElementById('next').classList.toggle('ready',s[3]);n=(n+1)%steps.length}draw();setInterval(draw,800)

Arazzo 1.1은 AsyncAPI 연산을 워크플로의 단계로 참조할 수 있습니다. send 단계는 메시지를 보낸 뒤 완료되고, receive 단계는 상관 ID에 맞는 메시지가 올 때까지 기다립니다. dependsOn은 비동기 수신이 끝나야 다음 단계가 실행되도록 결합점을 만듭니다.

데모는 주문 메시지를 보낸 뒤 다른 메시지는 건너뛰고 같은 상관 ID의 확인 메시지를 받아 다음 단계를 여는 흐름을 보여줍니다. 전송 완료는 브로커 전달 확인을 뜻하지 않으며, 수신 조건과 제한 시간을 명시해야 합니다.

언제 쓰나

동기 API 호출과 메시지 기반 완료 통지를 하나의 실행 시나리오로 기술할 때 사용합니다.

페이지로 열기 ↗