1100. Join Basic - dkkahm/study-kafka-with-spring GitHub Wiki

μ œμ•½ 쑰건

  • KStream은 μ œμ•½ μ—†μœΌλ©΄, Data μž…λ ₯될 λ•Œλ§ˆλ‹€ ν˜„μž¬ κ°€μ§€κ³  μžˆλŠ” λͺ¨λ“  Data 검색이 λ°œμƒν•˜λ―€λ‘œ Window μ œμ•½μ΄ λ°˜λ“œμ‹œ ν•„μš”ν•¨
  • λ˜ν•œ Co-Partitioning (두 topic 의 partition κ°œμˆ˜κ°€ κ°™μŒ) μ œμ•½μ΄ μš”κ΅¬λ˜λŠ” κ²½μš°λ„ μžˆμœΌλ―€λ‘œ 확인 ν•„μš”

Join Event λ°œμƒ μ‹œμ 

  • Inner Join
    • 두 topic λͺ¨λ‘μ—μ„œ 같은 Keyλ₯Ό κ°€μ§„ 값이 λ“€μ–΄μ˜¨ μ‹œμ 
  • Left Join
    • Primary topicμ—μ„œλ§Œ 값이 λ°œμƒμ‹œ (Left, null) λ°œμƒ
    • Primary topicμ—μ„œ 값이 λ°œμƒν•˜κ³ , 쑰금 ν›„ Secondary topic μ—μ„œ 같은 Keyλ₯Ό κ°€μ§„ 값이 λ°œμƒ μ‹œ (Left, Right) λ°œμƒ
    • Secondary topicμ—μ„œ 값이 λ°œμƒν•˜κ³ , 쑰금 ν›„ Primary topicμ—μ„œ 값이 λ°œμƒμ‹œ (Left, Right)
  • Outer Join
    • Primary μ—μ„œλ§Œ 값이 λ°œμƒ μ‹œ (Left, null)
    • Secondary μ—μ„œλ§Œ 값이 λ°œμƒ μ‹œ (null, Right)
    • Primary ν˜Ήμ€ Secondary μ—μ„œ κ°’ λ°œμƒμ‹œ, λ™μΌν•œ Key에 ν•΄λ‹Ήν•˜λŠ” 값이 μƒλŒ€ topicμ—μ„œ 이미 λ°œμƒν•œ 경우 (Left, Right)