Message Endpoints
Message Transformer
๋ฉ์์ง ๋ณํ๊ธฐ๋ ๋ฉ์์ง์ ๋ด์ฉ์ด๋ ๊ตฌ์กฐ๋ฅผ ๋ณํํ๊ณ ์์ ๋ ๋ฉ์์ง๋ฅผ ๋ฐํํ๋ ์ญํ ์ ํฉ๋๋ค.
Message Filter
๋ฉ์์ง ํํฐ๋ ๋ฉ์์ง๋ฅผ ์ถ๋ ฅ ์ฑ๋๋ก ์ ๋ฌํด์ผ ํ๋์ง ์ฌ๋ถ๋ฅผ ๊ฒฐ์ ํฉ๋๋ค.
๋ฉ์์ง ํํฐ๋ ์ฌ๋ฌ ์๋น์๊ฐ ๋์ผํ ๋ฉ์์ง๋ฅผ ์์ ํ๊ณ ํํฐ ๊ธฐ์ค์ ์ฌ์ฉํ์ฌ ์ฒ๋ฆฌํ ๋ฉ์์ง ์งํฉ์ ๋ฒ์๋ฅผ ์ขํ ์ ์๋ publish-subscribe channel๊ณผ ํจ๊ป ์ฌ์ฉ๋๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค.
Message Router
๋ฉ์์ง ๋ผ์ฐํฐ๋ ๋ค์์ ๋ฉ์์ง๋ฅผ ์์ ํด์ผ ํ๋ ์ฑ๋(์๋ ๊ฒฝ์ฐ)์ ๊ฒฐ์ ํด์ผ ํฉ๋๋ค.
์ผ๋ฐ์ ์ผ๋ก ๋ฉ์์ง ๋ด์ฉ ๋๋ ๋ฉ์์ง ํค๋์์ ์ฌ์ฉ ๊ฐ๋ฅํ ๋ฉํ๋ฐ์ดํฐ์ ๋ฐ๋ผ ๊ฒฐ์ ๋ฉ๋๋ค.
๋ฉ์์ง ๋ผ์ฐํฐ๋ ํ์ ๋ฉ์์ง๋ฅผ ๋ณด๋ผ ์ ์๋ ์๋น์ค ์กํฐ๋ฒ ์ดํฐ ๋๋ ๊ธฐํ ์๋ํฌ์ธํธ์์ ์ ์ ์ผ๋ก ๊ตฌ์ฑ๋ ์ถ๋ ฅ ์ฑ๋์ ๋ํ ๋์ ๋์์ผ๋ก ์์ฃผ ์ฌ์ฉ๋ฉ๋๋ค.

Splitter
์คํ๋ฆฌํฐ๋ ์ ๋ ฅ ์ฑ๋์์ ๋ฉ์์ง๋ฅผ ์๋ฝํ๊ณ ํด๋น ๋ฉ์์ง๋ฅผ ์ฌ๋ฌ ๋ฉ์์ง๋ก ๋ถํ ํ๊ณ ๊ฐ ๋ฉ์์ง๋ฅผ ์ถ๋ ฅ ์ฑ๋๋ก ๋ณด๋ด๋ ๋ ๋ค๋ฅธ ์ ํ์ ๋ฉ์์ง ๋์ ์ ๋๋ค
Aggregator
์ ๊ทธ๋ฆฌ๊ฒ์ดํฐ๋ ์ฌ๋ฌ ๋ฉ์์ง๋ฅผ ์์ ํ์ฌ ๋จ์ผ ๋ฉ์์ง๋ก ๊ฒฐํฉํ๋ ์ผ์ข ์ ๋ฉ์์ง ์๋ํฌ์ธํธ์ ๋๋ค.
Service Activator
Service Activator๋ ์๋น์ค ์ธ์คํด์ค๋ฅผ ๋ฉ์์ง ์์คํ ์ ์ฐ๊ฒฐํ๊ธฐ ์ํ ์ผ๋ฐ ๋์ ์ ๋๋ค.

Channel Adapter
์ฑ๋ ์ด๋ํฐ๋ ๋ฉ์์ง ์ฑ๋์ ๋ค๋ฅธ ์์คํ ์ด๋ ์ ์ก์ ์ฐ๊ฒฐํ๋ ๋์ ์ ๋๋ค.


Endpoint Bean Names
์๋น ์๋ํฌ์ธํธ(inputChannel์ด ์๋ ๋ชจ๋ ๊ฒ)๋ consumer์ message ํธ๋ค๋ฌ๋ผ๋ ๋ ๊ฐ์ ๋น์ผ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค.
Consumer๋ ๋ฉ์์ง ํธ๋ค๋ฌ์ ๋ํ ์ฐธ์กฐ๋ฅผ ๊ฐ์ง๊ณ ์์ผ๋ฉฐ ๋ฉ์์ง๊ฐ ๋์ฐฉํ๋ฉด ์ด๋ฅผ ํธ์ถํฉ๋๋ค
XML ๊ตฌ์ฑ:
์์ ์์์ bean ์ด๋ฆ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค
Consumer:
someService(theid)Handler:
someService.handler
EIP(Enterprise Integration Pattern) ์ด๋
ธํ
์ด์
์ ์ฌ์ฉํ ๋ ์ด๋ฆ์ ์ฌ๋ฌ ์์ธ์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋๋ค. ์ด๋
ธํ
์ด์
์ด ๋ฌ๋ฆฐ POJO์ ๋ค์ ์:
์์ ์์์ bean ์ด๋ฆ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค
Consumer:
someComponent.someMethod.serviceActivatorHandler:
someComponent.someMethod.serviceActivator.handler
๋ฒ์ 5.0.4๋ถํฐ ๋ค์ ์์ ์ ๊ฐ์ด @EndpointId์ฃผ์์ ์ฌ์ฉํ์ฌ ์ด๋ฌํ ์ด๋ฆ์ ์์ ํ ์ ์์ต๋๋ค.
@EndpointId์ฃผ์์ ์ฌ์ฉํ์ฌ ์ด๋ฌํ ์ด๋ฆ์ ์์ ํ ์ ์์ต๋๋ค.์์ ์์์ bean ์ด๋ฆ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
Consumer:
someServiceHandler:
someService.handler
@EndpointId๋ XML ๊ตฌ์ฑ์ ์ฌ์ฉํ์ฌ id ์์ฑ์ ์ํด ์์ฑ๋ ์ด๋ฆ์ ์์ฑํฉ๋๋ค.
@EndpointId๋ XML ๊ตฌ์ฑ์ ์ฌ์ฉํ์ฌ id ์์ฑ์ ์ํด ์์ฑ๋ ์ด๋ฆ์ ์์ฑํฉ๋๋ค.์์ ์์์ bean ์ด๋ฆ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
Consumer:
someConfiguration.someHandler.serviceActivatorHandler:
someHandler(the@Beanname)
๋ฒ์ 5.0.4๋ถํฐ ๋ค์ ์์ ์ ๊ฐ์ด @EndpointId ์ฃผ์์ ์ฌ์ฉํ์ฌ ์ด๋ฌํ ์ด๋ฆ์ ์์ ํ ์ ์์ต๋๋ค.
์์ ์์์ bean ์ด๋ฆ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
Consumer:
someService(the endpoint ID)Handler:
someService.handler(the bean name)
๋ง์ฐฌ๊ฐ์ง๋ก ํด๋ง ๊ฐ๋ฅ ๋ฉ์์ง ์์ค๋ SPCA(SourcePollingChannelAdapter)์ MessageSource๋ผ๋ ๋ ๊ฐ์ ๋น์ ์์ฑํฉ๋๋ค
SourcePollingChannelAdapter)์ MessageSource๋ผ๋ ๋ ๊ฐ์ ๋น์ ์์ฑํฉ๋๋คXML ๊ตฌ์ฑ:
Given the preceding XML configuration, the bean names are as follows:
SPCA:
someAdapter(theid)Handler:
someAdapter.source
Java configuration of a POJO to define an @EndpointId
@EndpointIdGiven the preceding Java configuration example, the bean names are as follows:
SPCA:
someAdapterHandler:
someAdapter.source
Java configuration of a bean to define an @EndpointID:
@EndpointID:Given the preceding example, the bean names are as follows:
SPCA:
someAdapterHandler:
someAdapter.source(as long as you use the convention of appending.sourceto the@Beanname)
Reference
Last updated
Was this helpful?