Skip to Content
이벤트 기반 마이크로서비스 구축
book

이벤트 기반 마이크로서비스 구축

by 이일웅, 애덤 벨메어
May 2021
Beginner to intermediate
380 pages
7h 48m
Korean
Hanbit Media, Inc.
Content preview from 이벤트 기반 마이크로서비스 구축
177
7
장
상태 저장 스트리밍
현재 총 재고 수량에서 이벤트 스트림의 변경분을 가감하고 그 결과를 데이터 저장소에 저장하
는 정말 단순한 재고 회계 서비스입니다. 주어진 임곗값
threshold
value
에 따라 필터링한 결과 제품
이 너무 많이 팔려 재고가 부족하다는 사실을 관리자에게 알릴지 여부는 비즈니스 로직에서 결
정됩니다. 각 입력 이벤트가 한 번 이상 적용되거나 아예 누락되면 계산이 틀려지기 때문에 실
제로 한 번 적용해서 집계해야 합니다. ‘실제로 한 번 처리’ 기능은 이런 경우에 요긴하게 쓰입
니다.
7.6.2
클라이언트-브로커 트랜잭션으로 실제로 한 번 처리
트랜잭션을 지원하는 이벤트 브로커를 사용하면 실제로 한 번 처리하기가 어렵지 않습니다. 출
력 이벤트, 체인지로그 기반의 내부 상태 업데이트, 컨슈머 오프셋 증가를 모두 하나의 원자적
트랜잭션에 묶을 수 있습니다. 단, 이 세 업데이트가 전부 브로커의 특정 이벤트 스트림 안에
저장될 경우에만 가능합니다. 오프셋 업데이트, 체인지로그 업데이트, 출력 이벤트는 전부 한
트랜잭션으로 묶여 원자적으로 커밋됩니다 (그림
7
-
9
).
재고 변경 스트림
컨슈머 오프셋
읽기
재고 테이블
출력 이벤트
체인지로그 커밋
원자적 트랜잭션
오프셋 커밋
쓰기
애플리케이션 컨테이너
집계기 컨슈머
그림
7-9
클라이언트-브로커 트랜잭션,
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

헤드 퍼스트 자바(3판)

헤드 퍼스트 자바(3판)

케이시 시에라, 버트 베이츠
클라우드 핀옵스: 비용은 최소화 운영은 최적화

클라우드 핀옵스: 비용은 최소화 운영은 최적화

오성근, J. R. 스토먼트, 마이크 풀러

Publisher Resources

ISBN: 9791162244173