πŸ’»
Albert's Til
GitHub
  • 맀일맀일 μ‘°κΈˆμ”© μ„±μž₯ν•˜κΈ°
    • README
    • CS
      • Network
      • HTTP
        • NO-CACHE
      • 였λ₯˜ μ½”λ“œ
      • ORM 도ꡬ
      • Design Pattern
        • CQRS Pattern
          • Event Sourcing and CQRS pattern
        • Builder Pattern
    • DB
      • MySQL
        • Timeline
        • Pagination
        • Index
        • Database Performance Optimization Strategies
        • B+ tree
        • MySQL Connectors VS MySQL Shell(Scripting) VS MySQL Workbench
        • MySQL Storage Engine Architecture
      • Normalization & Denormalization
      • JPA
        • @Transactional
        • Why JPA?
        • About JPA
        • N+1 Issue
        • Index
        • ElementCollection&CollectionTable
        • orphanRemoval
        • CascadeType
        • Use Subselect
        • Dynamic Instance Creation
        • Paging
        • Order
        • Spefication
        • mappedBy
      • MongoDB
        • ObjectId
      • Why MySQL?
      • ACID properties of transactions
      • Between JPA and JDBC
      • Identifiers in Hibernate/JPA
    • Java
      • Jackson de/serialize
      • Collections.singletonList() vs List.of()
      • Manage dependencies in Gradle
      • Logging Level
      • Bean Validation
      • JVM Internals
        • Threads
          • Frame
        • Shared Between Threads
          • Classloader
            • Class Loader Hierarchy
            • Loading Linking Initialization
      • Java Collection Framework
      • Annotation
      • Generic
      • λ””λ―Έν„° 법칙
    • Spring
      • Caching
      • Spring Integration Overview
        • ThreadPollTaskExecutor
        • Messaging Bridge
        • Channel Adapter
        • Poller
        • Configuration and @EnableIntegration
        • Message Endpoints
        • Message Channels
      • HATEOAS
      • @Autowired vs Constructor Dependency Injection
      • Spring Security
        • JWT 토큰 μ‚¬μš©ν•œ 인가
        • OAuth 2 Login
        • OAuth 2 인증
        • 인가
        • 인증
        • PasswordEncoder
      • IoC Container
      • Filter,Interceptor,AOP,Argument Resolver
      • Spring Annotation
      • About Spring
    • Kafka
      • Error Channel
    • Infra
      • Scale Up || Scale Out
      • Docker
        • Dockerfile
        • Docker Hub Deploy
        • Command
      • Cloud μœ ν˜•
        • Infrastructure as a Service
        • Platform as a Service
        • Software as a Service
      • 무쀑단 배포
        • μ—”μ§„μ—‘μŠ€(Nginx)
      • μ½”λ“œ μžλ™ 배포
        • Technical
      • AWS EC2
        • PEM(Privacy Enhanced Mail) ν‚€
      • AWS RDS
      • AWS S3
    • CodeSquad
      • Spring Boot Project 1μ£Όμ°¨ 회고
      • Spring Boot Project 2μ£Όμ°¨ 회고
      • Spirng Boot Project 3μ£Όμ°¨ 회고
      • Spring Boot Project 4μ£Όμ°¨ 회고
    • Foody Moody ν”„λ‘œμ νŠΈ
      • Query Performance Comparison
      • HeartCount Asynchronous Issue
      • DeferredResult
      • ResponseBodyEmitter
      • SseEmitter (Spring)
      • Server-Sent Events (SSE)
      • 기술 μŠ€νƒ 적용 이유
      • NO-CACHE(HTTP)
      • Transactional
    • DDD
      • AggregateId
    • Test
      • RestAssured
    • Coding and Algorithmic Problems
      • 819. Most Common Word
      • 344. Reverse String
      • 125. Valid Palindrome
      • 937. Reorder Data in Log Files
    • Node
      • Async... Await...
      • Custom Transactional Decorator Challenger
    • Python
      • Python Basic Grammar
        • Comments and Input/Output
        • Variable
        • Data type
        • Operations and syntax
        • List,Tuple,Dictionary,Set
        • Function
        • Conditional statement
        • Loop
    • HTML
      • HTML Basic
      • HTML Basic Tags
      • HTML Form Tags
      • HTML Table Tags
    • CSS
      • CSS Basic
      • CSS Practice
Powered by GitBook
On this page
  • Goals and Principles
  • golas
  • priciples
  • Main Components
  • Message
  • Message Channel
  • Message Endpoint
  • Dependencies
  • Reference

Was this helpful?

  1. 맀일맀일 μ‘°κΈˆμ”© μ„±μž₯ν•˜κΈ°
  2. Spring

Spring Integration Overview

Last updated 11 months ago

Was this helpful?

Spring Integration은 을 μ§€μ›ν•˜κΈ° μœ„ν•΄ Spring ν”„λ‘œκ·Έλž˜λ° λͺ¨λΈμ˜ ν™•μž₯이닀. Spring 기반 μ• ν”Œλ¦¬μΌ€μ΄μ…˜ λ‚΄μ—μ„œ κ²½λŸ‰ λ©”μ‹œμ§•μ„ κ°€λŠ₯ν•˜κ²Œ ν•˜κ³  선언적 μ–΄λŒ‘ν„°λ₯Ό 톡해 μ™ΈλΆ€ μ‹œμŠ€ν…œκ³Όμ˜ 톡합을 μ§€μ›ν•©λ‹ˆλ‹€.

Spring Integration의 μ£Όμš” λͺ©ν‘œλŠ” μœ μ§€ 관리 및 ν…ŒμŠ€νŠΈ κ°€λŠ₯ν•œ μ½”λ“œλ₯Ό μƒμ„±ν•˜λŠ” 데 ν•„μˆ˜μ μΈ κ΄€μ‹¬μ‚¬μ˜ 뢄리λ₯Ό μœ μ§€ν•˜λ©΄μ„œ μ—”ν„°ν”„λΌμ΄μ¦ˆ 톡합 μ†”λ£¨μ…˜μ„ κ΅¬μΆ•ν•˜κΈ° μœ„ν•œ κ°„λ‹¨ν•œ λͺ¨λΈμ„ μ œκ³΅ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.

Goals and Principles

golas

  • λ³΅μž‘ν•œ μ—”ν‹°ν”„λΌμ΄μ¦ˆ 톡합 μ†”λ£¨μ…˜μ„ κ΅¬ν˜„ν•˜κΈ° μœ„ν•œ κ°„λ‹¨ν•œ λͺ¨λΈμ„ μ œκ³΅ν•œλ‹€

  • Spring 기반 μ• ν”Œλ¦¬μΌ€μ΄μ…˜ λ‚΄μ—μ„œ 비동기식 λ©”μ‹œμ§€ 기반 λ™μž‘ μš©μ΄ν•˜κ²Œ ν•œλ‹€

  • κΈ°μ‘΄ Spring μ‚¬μš©μžλ₯Ό μœ„ν•œ 직관적이고 점진적인 채택을 μΆ”μ§„ν•œλ‹€

priciples

  • ꡬ성 μš”μ†ŒλŠ” λͺ¨λ“ˆμ„±κ³Ό ν…ŒμŠ€νŠΈ κ°€λŠ₯성을 μœ„ν•΄ λŠμŠ¨ν•˜κ²Œ κ²°ν•©λ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€.

  • ν”„λ ˆμž„μ›Œν¬λŠ” λΉ„μ¦ˆλ‹ˆμŠ€ 둜직과 톡합 둜직 κ°„μ˜ 관심사 뢄리λ₯Ό μ‹œν–‰ν•΄μ•Ό ν•©λ‹ˆλ‹€.

  • ν™•μž₯ 지점은 본질적으둜 좔상적이어야 ν•˜μ§€λ§Œ μž¬μ‚¬μš© 및 이식성을 μœ„ν•΄μ„œ 잘 μ •μ˜λœ 경계 내에 μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.

Main Components

λ©”μ‹œμ§• μ‹œμŠ€ν…œμ€ 일반적으둜 μœ μ‚¬ν•˜κ²Œ 좔상적인 pipes-and-filters λͺ¨λΈμ„ λ”°λ¦…λ‹ˆλ‹€. filtersλŠ” λ©”μ‹œμ§€λ₯Ό μƒμ„±ν•˜κ±°λ‚˜ μ†ŒλΉ„ν•  수 μžˆλŠ” λͺ¨λ“  ꡬ성 μš”μ†Œλ₯Ό λ‚˜νƒ€λ‚΄κ³  pipesλŠ” ꡬ성 μš”μ†Œ μžμ²΄κ°€ λŠμŠ¨ν•˜κ²Œ μ—°κ²°λœ μƒνƒœλ₯Ό μœ μ§€ν•˜λ„λ‘ ν•„ν„° 간에 λ©”μ‹œμ§€λ₯Ό μ „μ†‘ν•©λ‹ˆλ‹€.

Message

payloadλŠ” λͺ¨λ“  μœ ν˜•μ΄ 될 수 있으며 headersμ—λŠ” ID, νƒ€μž„μŠ€νƒ¬ν”„, 상관 관계 ID 및 λ°˜ν™˜ μ£Όμ†Œμ™€ 같은 일반적으둜 ν•„μš”ν•œ 정보가 ν¬ν•¨λ©λ‹ˆλ‹€. HeadersλŠ” μ—°κ²°λœ 전솑과 값을 μ£Όκ³  λ°›λŠ” 데에도 μ‚¬μš©λ©λ‹ˆλ‹€.

예λ₯Ό λ“€μ–΄, μˆ˜μ‹ λœ νŒŒμΌμ—μ„œ λ©”μ‹œμ§€λ₯Ό 생성할 λ•Œ 파일 이름은 λ‹€μš΄μŠ€νŠΈλ¦Ό ꡬ성 μš”μ†Œμ—μ„œ μ•‘μ„ΈμŠ€ν•  수 μžˆλ„λ‘ 헀더에 μ €μž₯될 수 μžˆμŠ΅λ‹ˆλ‹€. λ§ˆμ°¬κ°€μ§€λ‘œ λ©”μ‹œμ§€ λ‚΄μš©μ΄ ꢁ극적으둜 μ•„μ›ƒλ°”μš΄λ“œ 메일 μ–΄λŒ‘ν„°μ— μ˜ν•΄ μ „μ†‘λ˜λŠ” 경우 λ‹€μ–‘ν•œ 속성(λ°›λŠ” μ‚¬λžŒ, 보낸 μ‚¬λžŒ, μ°Έμ‘°, 제λͺ© λ“±)이 μ—…μŠ€νŠΈλ¦Ό ꡬ성 μš”μ†Œμ— μ˜ν•΄ λ©”μ‹œμ§€ 헀더 κ°’μœΌλ‘œ ꡬ성될 수 μžˆμŠ΅λ‹ˆλ‹€. κ°œλ°œμžλŠ” μž„μ˜μ˜ ν‚€-κ°’ μŒμ„ 헀더에 μ €μž₯ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€.

Message Channel

λ©”μ‹œμ§€ 채널은 pipes-and-filters μ•„ν‚€ν…μ²˜μ˜ pipeλ₯Ό λ‚˜νƒ€λƒ…λ‹ˆλ‹€.

λ©”μ‹œμ§€ 채널은 λ©”μ‹œμ§• ꡬ성 μš”μ†Œλ₯Ό λΆ„λ¦¬ν•˜κ³  λ©”μ‹œμ§€ κ°€λ‘œμ±„κΈ°μ™€ λͺ¨λ‹ˆν„°λ§μ„ μœ„ν•œ convenient point을 μ œκ³΅ν•œλ‹€.

λ©”μ‹œμ§€ 채널은 point-to-point λ˜λŠ” publish-subscribe semantics을 λ”°λ₯Ό 수 μžˆμŠ΅λ‹ˆλ‹€.

Point-to-point channel

ν•œ λͺ…μ˜ μ†ŒλΉ„μžλ§Œ μ±„λ„λ‘œ μ „μ†‘λœ 각 λ©”μ‹œμ§€λ₯Ό 받을 수 μžˆμŠ΅λ‹ˆλ‹€.

Publish-subscribe channels

μ±„λ„μ˜ λͺ¨λ“  κ΅¬λ…μžμ—κ²Œ 각 λ©”μ‹œμ§€λ₯Ό λΏŒλ¦°λ‹€.

Message Endpoint

Spring Integration의 μ£Όμš” λͺ©ν‘œ 쀑 ν•˜λ‚˜λŠ” Inversion of Control을 톡해 μ—”ν„°ν”„λΌμ΄μ¦ˆ 톡합 μ†”λ£¨μ…˜μ˜ κ°œλ°œμ„ λ‹¨μˆœν™”ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€. 즉, μ†ŒλΉ„μžμ™€ μƒμ‚°μžλ₯Ό 직접 κ΅¬ν˜„ν•  ν•„μš”κ°€ μ—†μœΌλ©° λ©”μ‹œμ§€λ₯Ό μž‘μ„±ν•˜κ³  λ©”μ‹œμ§€ μ±„λ„μ—μ„œ 보내기 λ˜λŠ” λ°›κΈ° μž‘μ—…μ„ ν˜ΈμΆœν•  ν•„μš”λ„ μ—†μŠ΅λ‹ˆλ‹€.

Dependencies

implementation 'org.springframework.boot:spring-boot-starter-integration'
implementation 'org.springframework.integration:spring-integration-http'
testImplementation 'org.springframework.integration:spring-integration-test'

Reference

Enterprise Integration Patterns
Message Endpoints
Overview of Spring Integration Framework
Logo
Message
Message Channel