Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
出前館のメニュー登録・更新用APIをSpring Boot+Kafkaで実現したお話
Search
株式会社出前館
August 18, 2026
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
出前館のメニュー登録・更新用APIをSpring Boot+Kafkaで実現したお話
株式会社出前館
August 18, 2026
More Decks by 株式会社出前館
See All by 株式会社出前館
現実的なセキュリティ体制の構築 限られたリソースの中で成果を最大化する「選択と集中」
demaecan
7
5.7k
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
1
1.2k
複雑にからみあう複数のシステムを要する出前館QAの実情、展望
demaecan
0
230
QA業務を変える(!?)AIを併用した不具合分析の実践
demaecan
0
270
出前館アプリの品質を支えるリリーストレインとその実践
demaecan
0
320
出前館アプリ進化論 アーキテクチャと組織のリアルな変⾰の舞台裏
demaecan
0
1k
Flutterにしてよかった?出前館アプリを2年運用して気づいたことを全部話します
demaecan
1
1.4k
Boxを“使われる場”にする統制と自動化の仕組み
demaecan
1
550
生成AI導入における「短期ROIを超えた」共存戦略
demaecan
0
220
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Google's AI Overviews - The New Search
badams
0
1.6k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
290
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
New Earth Scene 8
popppiees
4
2.6k
How STYLIGHT went responsive
nonsquared
100
6.3k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
A Tale of Four Properties
chriscoyier
163
24k
Transcript
出出出出出出出出出出出出出出 Spring Boot + Kafka 2026.05.30 出出出出出出出 出出 出出 ©
Demae - can Co., Ltd. API 出 出出出出出出出
出出出出 出出出出 • 出出 出出 (Yuji Nakagawa) • 2016 出
4 出出出出出出出出出出出出出出出 Java / Spring Boot 出出出出出出出出出出出出出出出出 出出出出出出出出出出出出出出 2025 出 7 出出出出 出出出出出出 JOIN 出出出出出出出出出出出出出出 出出出出出出出出出出出出 • 出出出出出出出出出出出出出出出出出出出出出出出 出出出出出出出出出出出出出出出出出出出出出出出 出出出出出出 • 出出出出出出出出出出出出 2 © Demae - can Co., Ltd.
出出出出 出出出出出 • 出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出 Kafka 出出出出出出出出出出出出出 • 出出出出出 • Java,
Spring Boot, Kafka, etc... • 出出出出 • Java, Spring Boot 出出出出出出出出出出出出出出出 • Kafka 出出出出出出出出出出出出出 • etc... 出出出出出出出出出出出出出出出出 3 © Demae - can Co., Ltd.
出出 01 出出出出出出出出出出出出出出 02 出出出出出出 03 出出出出出出出出出出出出 04 出出出出出出出出出出出出 05
出出出出出出出出出 06 出出出出 API 出出出出出出出出 4 © Demae - can Co., Ltd.
出出出出出出出出出出出出出出出出 出出出 • Web 出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出 • 2000 出 10 出出出出出出出出出出出出出
• 2025 出 8 出出出出出出出出出出出出出出 455 出出出出出 6,074 出出出出出 5 © Demae - can Co., Ltd.
出出出出出出出出出出出出出出出出 出出出出出出出出出出 出出出出 出出 出出出 出出出出出 出出出出 出出出出出 6 ©
Demae - can Co., Ltd.
出出 01 出出出出出出出出出出出出出出 02 出出出出出出 03 出出出出出出出出出出出出 04 出出出出出出出出出出出出 05
出出出出出出出出出 06 出出出出 API 出出出出出出出出 7 © Demae - can Co., Ltd.
出出出出出出 API 出出出出出出出出 8 出出 API 出 Subscriber 1. 出出出出出出出出出出
API 2. 出出出出出出出出出出 API 3. 出出出出出出出出出出出出 API 4. 出出出出出出出出出出出出出出出出 API • 出出出出出出出出出出出出出出出出 Subscriber 5. 出出出出出出出出出出出出出出出出出 API 6. 出出出出出出出出出出出出出 API 7. 出出出出出出出出出出出出出出出 API 8. 出出出出出出出出出出出出出出出 API 8 © Demae - can Co., Ltd.
出出出出出出 API 出出出出出出出出 出出 API 出出出出出出出出出出出出出出出出 9 © Demae -
can Co., Ltd.
出出出出出出 API 出出出出出出出出 出出出出出出出 出出出出出出出 API 出出出出出出出出出出出出出 API 出出出 •
出出出出出出出出出出出出出出出出 14 出 297 出 655 出 89 出 401 出 10 © Demae - can Co., Ltd.
出出出出出出 API 出出出出出出出出 出出出出出出出 出出出出出出出 API 出出出出出出出出出出出出出 API 出出出 •
出出出出出出出出出出出出出出出出 • 出出出出出出出出出出出出出出出 • etc... 14 出 297 出 655 出 出出出出出 出出出出出出出出 × 出出出出出出出出出 : 出 56,500 89 出 401 出 11 © Demae - can Co., Ltd.
出出出出出出 API 出出出出出出出出 出出出出出出出出出出出出出出出 出出出出 … • 出出出出出出出出出出出出出出出出出出出出出 … 12
© Demae - can Co., Ltd.
出出出出出出 API 出出出出出出出出 出出出出出出出出出出出出出出出 出出出出 … • 出出出出出出出出出出出出出出出出出出出出出 • A
出出出出出出出出出出出出出出出出 … B 出出出出出出出出 … • etc... 13 © Demae - can Co., Ltd.
出出出出出出 API 出出出出出出出出 8 出出 API 出 Subscriber 1. 出出出出出出出出出出
API 2. 出出出出出出出出出出 API 3. 出出出出出出出出出出出出 出出出出出出出出出出出出 API 4. 出出出出出出出出出出出出出出出出 API • 出出出出出出出出出出出出出出出出 Subscriber 5. 出出出出出出出出出出出出出出出出出 6. 出出出出出出出出出出出出出 API API 7. 出出出出出出出出出出出出出出出 API 8. 出出出出出出出出出出出出出出出 API 14 © Demae - can Co., Ltd.
出出 01 出出出出出出出出出出出出出出 02 出出出出出出 03 出出出出出出出出出出出出 04 出出出出出出出出出出出出 05
出出出出出出出出出 06 出出出出 API 出出出出出出出出 15 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出 • 出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出 • 出出出出出出出出出出 • 出出出出出出出出出出出出出 1出出出出出出出出出出 •
出出 × 出出出出出出出出出出出出 出出出出出 1出出出出出出出 56,500 出出出出出 出出 • 出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出 16 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出 01 API 出出出 → 出出出 出出出 02 API
出出出 → Kafka + Subscriber 出出出 17 © Demae - can Co., Ltd.
出出出出出出出出出出出出 ①出出出出出出出出出出 出出 1出出出 • API 出出出出出出出出出出 × 20 出出
出出出出出出出出出出 + 202 Accepted 出出出出 • 出出出出出出出出出出出出 18 © Demae - can Co., Ltd.
出出出出出出出出出出出出 ①出出出出出出出出出出 出出 1出出出 × 20 出出 • API 出出出出出出出出出出
出出出出出出出出出出 + 202 Accepted 出出出出 • 出出出出出出出出出出出出 出出出出出出出出出出出出出出出出 出出出出出出出出出 19 © Demae - can Co., Ltd.
出出出出出出出出出出出出 ①出出出出出出出出出出 出出 1出出出 × 20 出出 • API 出出出出出出出出出出
出出出出出出出出出出 + 202 Accepted 出出出出 • 出出出出出出出出出出出出 出出出出出出出出出出出出出出出出 出出出出出出出出出 出出出出出出出出出出出出 20 © Demae - can Co., Ltd.
出出出出出出出出出出出出 ②Kafka + Subscriber 出出出出出出出出出出出出出出出出出出出出出出出 • API 出出出出出出出出出出 • 1出出出出出出出
+ 202 Accepted 出出出出 Kafka 出出出 • 出出出出出出出出出出 • 出出出出出出出出出出出出出出出出出出出出出 21 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出 出出出 ①出出出 ②Kafka + Subscriber 出出出出出出出 出出出出出 出
consume 出出出出 出出出出出 × 出出出出出出出 ( 出出 / 出出 1出出出出出出 出出出出出出出出出出出 ) 出 cron 出出出出 &出出出出出出出出出出 出 consume →@Async 出出出出出出出出 出出出出出出 出 Kafka 出出出出出 22 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出 1. 出出出出出出出出出 2. 出出出出出出出出 produce 3. 出出出出出出出出 consume
4. 出出出出出出出出出 5. Item - service 出出出出出出出 出出 23 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出 1. 出出出出出出出出出 2. 出出出出出出出出 produce 3. 出出出出出出出出 consume
4. 出出出出出出出出出 5. Item - service 出出出出出出出 出出 24 © Demae - can Co., Ltd.
出出 01 出出出出出出出出出出出出出出 02 出出出出出出 03 出出出出出出出出出出出出 04 出出出出出出出出出出出出 05
出出出出出出出出出 06 出出出出 API 出出出出出出出出 25 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出出出出出出出出 出出出出出出 API 出出 出 26 © Demae -
can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出出出出出出出出 01 event ID 出出出出 02 出出出出出出出出出 03 出出出出出出出出出出出出出
04 Kafka Produce API 出 出出出出出出出出出出 27 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出出出出出出出出 01 event ID 出出出出 02 出出出出出出出出出 03 出出出出出出出出出出出出出
04 Kafka Produce API 出出出出出出出出出出 出出出出出出出 出 出出出出出出出出出出 28 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Publish – publishMenuEvent - 1. 出出出出出出出出出出出出 • Protobuf
出 MenuEvent 出出 • 出出出出出出 • .proto 出出出出出出出出出 2. Kafka 出出出出出出出出出 • Topic 出出出出出出出出出出出出出 29 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Publish – publishMenuEvent - 1. 出出出出出出出出出出出出 • Protobuf
出 MenuEvent TopicNameProperty.java 出出 • 出出出出出出 • .proto 出出出出出出出出出 2. Kafka 出出出出出出出出出 • Topic 出出出出出出出出出出出出出 • @ ConfigurationProperties 出出出出 application - {env}. yml 出出出出出出出出 application - {env} .yml 30 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Publish – publishMenuEvent - 1. 出出出出出出出出出出出出 • Protobuf
出 MenuEvent • 出出出出出出 • .proto 出出出出出出出出出 出出 出出出 Kafka 出出出出出 出出出出出出出 2. Kafka 出出出出出出出出出 • Topic 出出出出出出出出出出出出出 31 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Publish – sendMessage - • executeInTransaction 出出出 •
commit or abort • @ Retryable 出 1出出出 出出出出出出 + 2 出出出出出 32 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Publish – sendMessage - • executeInTransaction 出出出 •
commit or abort • @ Retryable 出 1出出出 出出出出出出 + 2 出出出出出 • + eventId 出出出 Subscriber at - least - once 出 出出 出出出出出出出出出出 • exactly - once 出出出出出出出出出出出出出出出 33 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Publish – sendMessage - • executeInTransaction 出出出 •
commit or abort • @ Retryable 出 1出出出 出出出出出出 + 2 出出出出出 出出出 KafkaTemplate Config 出出出出出出出出出出 出 34 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config – producer 出 - • @Bean 出出出出出出出
• 出出出 Factory/Configs 出 private 出出出 • Bean 出 : menuKafkaTemplate • Publisher 出出出出出出出出出出出出出出出出出出出 DI 35 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config – producer 出 - • transactionIdPrefix •
出出出出出出出出 executeInTransaction 出出出出出 36 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config – producer • 出出出 出 - AWS_MSK_IAM
37 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config Producer 出出出出出出出 01 3 出出出出出出出出 ( Configs/Factory/Template
+ Bean 出出出出出出出 DI 02 Transactional 03 出出出 出出 ) transactionIdPrefix AWS_MSK_IAM 出出出 出 secret 出出出出出出 38 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config – consumer 出 - • Producer 出
Config 出出出 • @Bean 出出出出出出出 • 出出出 Factory/Configs 出 private 出出出 • Bean 出 : menuKafkaContainerFactory • @ KafkaListener 出出出出出出出出 出 containerFactory DI 出出 39 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config – consumer • FixedBackOff • 出出出出出出出出出出出出 出出出出出出出
出 出出出出出 recoverer 出 → 出出 • AuthExceptionRetryInterval 出出出出出出出出 • 出出出出出出出出出出出出出出出出出 出出出出出出出出出出出出 40 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config – consumer 出 - • ISOLATION_LEVEL_CONFIG •
read_committed 出出出出出出出出出出出出出出出出 • AUTO_OFFSET_RESET_CONFIG • 出出出出出出出出出出出出出出出 earliest 出出出出出出出出出出出 41 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Kafka Config Consumer 出出出出出出出 01 3 出出出出出出出出 ( Configs/Factory/
+ Bean 出出 DI 02 AuthExceptionRetryInterval 03 ISOLATION_LEVEL = Producer Tx 出出出出出出出 ContainerFactory ) 出出出 read_committed 出 42 © Demae - can Co., Ltd.
出出出出出出出出出出出出 出出出出出出出出出 - 出出出出 1. 出出出出出出出出出 2. 出出出出出出出出 produce 3.
出出出出出出出出 consume 4. 出出出出出出出出出 5. Item - service 出出出出出出出 出出 出出出出出出出 43 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Menu Subscriber Subscriber 出出出出出出出出出出出 01 出出出出出出出出 02 出出出出出出出出出出出出 03
出出出出出出出出出出出出出 Subscribe ( 出出出出出 ) 44 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Menu Subscriber – consumerMenuEvent - • @ KafkaListener •
Kafka Consumer 出出出出出 • 出 Trace(dispatcher = true) • 出出出出出出出出出出出出出出出出出 • @Payload • @Payload 出 produce 出出出出出出出出 byte[] 出 45 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Menu Subscriber – processMenuEvent - • 出 Trace(async =
true) • 出出出出出出出出出出出出出出出出出出出出出出 • Subscribe • @Async(“ 出出出出出出出出出出出 menuEvent ”) • 出出出出出出出出出出出出 46 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Menu Subscriber – processMenuEvent - 01 出出出出出出出出 & 出出出出出出出
02 出出出出出出出出出 03 item - service 出出出出出出出 04 item - service 出出出出出出 API 出出 05 item - service 出出出出出出 API 出出 06 出出出出出出出出出 ( 出出出出 ) 47 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Menu Subscriber – processMenuEvent 出出出出出出 01 出出出出出出出出 & 出出出出出出出
02 出出出出出出出出出 03 item - service 出出出出出出出 04 item - service 出出出出出出 API 出出 05 item - service 出出出出出出 API 出出 06 出出出出出出出出出 ( 出出出出 ) 48 © Demae - can Co., Ltd.
出出出出出出出出出出出出 Menu Subscriber – processMenuEvent - 01 出出出出出出出出 & 出出出出出出出
02 出出出出出出出出出 03 item - service 出出出出出出出 04 item - service 出出出出出出 API 出出 05 item - service 出出出出出出 API 出出 06 出出出出出出出出出 出出出出出 ( 出出出出 … ) 49 © Demae - can Co., Ltd.
出出 01 出出出出出出出出出出出出出出 02 出出出出出出 03 出出出出出出出出出出出出 04 出出出出出出出出出出出出 05
出出出出出出出出出 06 出出出出 API 出出出出出出出出 50 © Demae - can Co., Ltd.
出出出出出出出出出出出出 processMenuEvent – registerImages • 出出出出出 - URL 出出出出出出出出出出出出 •
出出出出出出出出出出出出出出出出出 • 出出出出出 1出出出出 5MB 出出 • 出出出 3000 〜 5000ms 出出出出出出出出出出出出出 出出出出出出出出出 出出出出出 … 51 © Demae - can Co., Ltd.
出出出出出出出出出出出出 processMenuEvent – registerImages • 出出出出出 - URL 出出出出出出出出出出出出 •
出出出出出出出出出出出出出出出出出 • 出出出出出 1出出出出 5MB 出出 • 出出出 3000 〜 5000ms 出出出出出出出出出出出出出 出出出出出出出出出 出出出出出 … • 出出出出出出出出出出出出出出出出 • 出出出出出出出 52 © Demae - can Co., Ltd.
出出出出出出出出出 processMenuEvent – url_hash 出出出出出出出出 - • 出出出出出出出 • url_hash
• Last - Modified • image_asset_id 出出 DL URL 出 SHA - 256 出出出出出出出出出出出出出出 ItemService 出出出出出出出出 ID 53 © Demae - can Co., Ltd.
出出出出出出出出出 processMenuEvent – url_hash 出出出出出出出出 - • 出出出出出出出 • url_hash
• Last - Modified • image_asset_id 出出 DL URL 出 SHA - 256 出出出出出出出出出出出出出出 ItemService 出出出出出出出出 ID • DL 出出出出出出出出 Last - Modified 出出出出出 出出出出出出出出出出出出出出出出出出出 54 © Demae - can Co., Ltd.
出出出出出出出出出 processMenuEvent – 出出出出出出出出出出 – • 出出出出出出出 • 出出出出出出出出出出出出出出 •
出出出出出出出 URL 出 Last - Modified 出出出 • 出出出出出出出 • 出出出出出 出 Last - Modified 出出 55 © Demae - can Co., Ltd.
出出出出出出出出出 processMenuEvent – 出出出出出出出出出 - • 出出出出出出出出出出出出出出出出出 • 出出 URL
出出出出出出出出出出出出出出出 • 出出出出出出出出出出出 56 © Demae - can Co., Ltd.
出出出出出出出出出 processMenuEvent – 出出出出出出出出出 - • CompletableFuture.runAsync 出出出出 • CompletableFuture.allOf(...)
出 出出出 出出 57 © Demae - can Co., Ltd.
出出出出出出出出出 processMenuEvent – 出出出出出出出 • 出出出出 failedItemCodes 出出出出 • 出出出出出出出出
• 出 1出出出出出出出出出出出出出出出 • 出出出出出出出出出出出出出 API 出出出出 58 © Demae - can Co., Ltd.
出出 01 出出出出出出出出出出出出出出 02 出出出出出出 03 出出出出出出出出出出出出 04 出出出出出出出出出出出出 05
出出出出出出出出出 06 出出出出 API 出出出出出出出出 59 © Demae - can Co., Ltd.
出出出出 出出出出出出出出出 - 出出出出 出出出出出出出出出 1. 出出出出出出出出出 2. 出出出出出出出出 produce
3. 出出出出出出出出 consume 4. 出出出出出出出出出 5. Item - service 出出出出出出出 出出 60 © Demae - can Co., Ltd.
出出出出 出出出出出出出 Kafka + Subscriber 出出出出出出出出出 出出出出出出出出出出 + @ Retryable
出出出出出出 Spring 1出出 + eventId 出出出出出出出出 at - least - once SLA 出出出出 出出出出出出出出出出出出出出出出出出出出出 61 © Demae - can Co., Ltd.
出出出出 出出出出出出出出出 • DLQ 出出出 • 出出出 Subscribe 出出出出出出出出出出出出出出出出出出出出出出出 •
出出出出出出出出出出出 • HEAD 出出出出出出 Last - Modified 出出出出出 DL 出出出出出 / 出出出出出出出出出出 • 出出出出出出出出出出 • Consumer Lag / 出出出出出出出出出 / 出出出出出出出出出出出出出出出 62 © Demae - can Co., Ltd.
出出出出 出出出出出出 • 出出出出出出出 • https:// x.gd /e6vlY URL 出
QR 出出出 • 出出出出出出出出出出 • https://x.gd/SETKa 63 © Demae - can Co., Ltd.
THANK YOU. THANK YOU. • 出出出出出出出出出出出出出出出出出出出 64 © Demae -
can Co., Ltd.