Cov kauj ruam yuav ua hauj lwm nrog lub caij nplooj ntoos hlav xws li

Spring Integration

Cov kauj ruam yuav ua hauj lwm nrog lub caij nplooj ntoos hlav xws li

Txheej txheem cej luam

Lub caij nplooj ntoos hlav integration yuav daws tau teeb meem ntau muag ntawm lub enterprise integration ntau ntau. Thaum ntawv enterprise tsom rau INTERACTIONS with ib leeg, lawv yuav fim teeb meem ntau yam xws li tshuab incompatibility, teeb meem kev sib txuas lus thiab ntaub ntawv parsing lossis conversion teeb meem. Daws tej teeb meem yuav noj ntau yam kev pab uas yuav muaj tau thov nyob rau hauv ntau cov chaw ua hauj lwm ntau. Lub caij nplooj ntoos hlav integration solves tej teeb meem thiab tso cai rau enterprises kom kub siab rau cov kev ua hauj lwm ntau tseem ceeb. caij nplooj ntoos hlav, uas tshuav nqi nws lub hauv paus rau qhov qhib lub caij nplooj ntoos hlav commissioned los ntawm SpringSource, Leverages ntau nws cov peevxwm los ntawm lub caij nplooj ntoos hlav Framework. Tab sis yog muaj ib lub cav uas caij nplooj ntoos hlav Framework yuav daws tau enterprise integration teeb meem uas tsis muaj tseeb.








Lub caij nplooj ntoos hlav (Spring Integration)?

Lub caij nplooj ntoos hlav integration siv los txhawb cov kev pab sib txawv rau ib lub lag luam tov. Cov kev pab txawv yog ob peb loosely thiab raws li lub lag luam yuav tsum ua hauj lwm, yuav tau hloov. Muaj peev xwm hloov tau cov kev pab yooj yim yog ib feature ntawm lub caij nplooj ntoos hlav architecture. Nyob rau hauv lub lag luam tov qhov twg lub caij nplooj ntoos hlav integration yog koom tes nrog, Qhov kev pab cuam integration tam sim ntawd saum qhov kev pab cuam tam sim ntawd.

Lub caij nplooj ntoos hlav architecture raws li cov kav dej nrov thiab filters approach. Koj yuav xav tias cov lim dej ua ntaub ntawv xov xwm nyob rau lwm lub tsev thiab cov pipes raws li cov lus qhia uas muaj nyob rau hauv xov xwm.

Genesis ntawm caij nplooj ntoos hlav Integration

Lub inspiration qab caij nplooj ntoos hlav Integration yuav hais kom muaj ntau yam qauv uas mam li tawm thaum enterprise inspiration yog sim. Tus yuam sij rau kev kawm lus dag hauv kev nkag siab thiab ntse siv cov qauv. Tab sis yog muaj cov tswvyim uas lub caij nplooj ntoos hlav integration yog ruaj vim lub caij nplooj ntoos hlav Framework muaj tej zaum yuav siv cov qauv, Qhov tseeb yog tias lub caij nplooj ntoos hlav framework muab cia li lub tsev blocks rau lub tsev enterprise daim ntaub ntawv thiab lub caij nplooj ntoos hlav integration yog meant yuav tau siv cov qauv. Piv txwv, Yog tias koj ua ib daim ntawv thov kev pab nrog lub caij nplooj ntoos hlav (Spring integration), xav txog cov pipes thiab filters raws li lus channels thiab lus endpoints. Lub network yog nqa lus ntawm ib endpoint rau lwm endpoint los ntawm channels. Hais yog validated, yoojyim, phua, nkaus, cov qhab nees rov txheej txheem, reformatted thiab parsed thiab enriched li cov endpoints txheej txheem cov ntaub ntawv.

Vim li cas thiaj yog lub caij nplooj ntoos hlav Integration?

Nws muaj nws ib tug tswvyim tias Lub caij nplooj ntoos hlav muaj peev xwm ntawm enterprise daim ntawv thov kev pab vim yog nws cov array ntawm capabilities. Txawm li cas los, Lub caij nplooj ntoos hlav, Rau tag nrho nws cov peev xwm, yog tsis muaj chaw nyob rau unique enterprise integration teeb meem. Nws yog meant muab lub tsev blocks rau enterprise daim ntawv thov. Los integrate diverse enterprise daim ntaub ntawv, Koj yuav tsum tau ntes cov qauv txawv txawv thiab daws cov teeb meem. Peb to taub qhov no nrog ib qho piv txwv.








Cia peb xav tias ob daim ntawv thov, Ib thiab B yuav tsum tau muab cov ntaub ntawv ntawm lawv. Daim ntawv thov kev pab yuav sib txuas lus nrog lwm cov ntaub ntawv tsuas mus txog TCP kev twb kev txuas thaum uas siv ib daim ntawv thov kev pab cuam web rau cov ntaub ntawv txais. Obviously, Cov ntaub ntawv sib koom thiab kev txhim kho txoj kev sib nrauj. rov qab, Tej zaum koj yuav tau ua ntau yam xws li sau ib code thiab muaj nws sau ntawv rau lub sij hawm, teev txheej txheem, thiab parse cov ntaub ntawv rau ib daim ntawv uas sau npe thov B. Ua tej tasks txhais tau ntau peev. Neb ib leeg twg yuav tsum tau ua daim ntawv thov A thiab B yuav raug outsourced rau ib daim ntawv muaj peev xwm. Txhua yam ntawm cov kev paub tab no yuav ua tau los ntawm lub caij nplooj ntoos hlav. Piv txwv, Lub caij nplooj ntoos hlav yuav muaj ib lub framework los yog qiv uas connects ib TCP thiab nyeem thiab sau ntawv streams.

Nyob rau hauv ib nutshell, Lub caij nplooj ntoos hlav integrationly enterprise daim ntaub ntawv, irrespective ntawm lub tshuab los yog platform. Secondly, Nws rua ntau kev nqis peev uas tsis muaj nqis peev pab rau ib sab ntawm tus enterprise.

Lub caij nplooj ntoos hlav Integration?

Lub chaw ua hauj lwm ntawm lub caij nplooj ntoos hlav integration framework yog piav hauv qab no. Cov duab nram qab no qhia tau hais tias lub caij nplooj ntoos hlav hais thiab lus nram qab no tsim kom muaj thiab muab kev pab. Qhov no yog ib daim ntawv yooj yim uas hais thiab lus txaus siab txaus. Nws yuav nyuab nyuab raws li qhov uas yuav tsum tau.

  • Lub caij nplooj ntoos hlav architecture yuav ua hauj lwm nrog rau cov tshuaj irrespective ntawm lawv cov tshuab thiab platform. Tag nrho framework yog ib tug architecture architecture uas yuav tau dynamically configured nyob rau hauv lub lag luam tov.
  • Lub caij nplooj ntoos hlav architecture tshwj xeeb tshaj yog siv nyob rau hauv cov ntsiab lus teb tswj microservices architecture los yog solutions uas muaj loosely coupled ntau yam kev pab nyob rau hauv cov kev pab txheej txheem. Thaum koj yuav tsum disengage ib los yog ntau tshaj ntawm cov architecture, Nws yog ib qho yooj yim tswj nrog lub caij nplooj ntoos hlav integration.
  • Lub caij nplooj ntoos hlav integration tswj cov kev ua si tag nrho ntawm tej kev ua si.









Siv:

Tom qab no yog ib cov lus raug handler code rau XMPP lus. Qhov no yog rau outbound lus txaus. Nws kuj ua tau qhov txheej txheem ntawm cov lus.

Qhia 1: Uas qhia handler

@Bean

@ServiceActivator(Inputannel = “txiv laum huab xeeb”)

Pej xeem Messageler sendChatMsgHandr(XMPPConnection xmpConn) {

ChatMessageSendingHandr handlr = tshiab ChatMessagesSendingHandr(xmpConn);

DefaultXpmheaderMapper xmpHprm = tshiab DefaultPMaper();

xmpHdrMpr.setRequestheaderNames(“Kuaj”);

handr.setHeaderMaper(xmpHDRMR);

rov qab los;

}

Mob(nurses).. Tus poller configuration yuav tau ua los ntawm SourcePollingChannelAdapter, uas yog lwm AbstractEndpoint implement.

Tom qab no yog ib qho qauv configuration ntawm inbound ntws.

Qhia 2: Qauv code rau inbound ntws

@Bean

@InboundChannelAdapter(tus nqi = “inboundchannel”, poller = @Poller(fixedDelay=”4000″))

pej xeem<?> quav(DataSource dtaRc) {

Rov qab tshiab JdbcPollingChannelAdapter(dtaCS, “XAIV * Kev kuaj ntawd nyob qhov twg = y”);

}

Tom qab no yog ib qho qauv XML rau lub caij nplooj ntoos hlav integration. Nws muaj tag nrho cov components thiab lawv bindings.

Qhia 3: Qauv XML rau lub caij nplooj ntoos hlav

<?xml version =”1.0″ encoding =”UTF-8″?>

<taum:taum xlm:int.”http://www.springframework.org/schema/integration”

xmlns:xsi =”http://www.w3.org/2001/XMLSchema-instance”

xmlns:taum hlawv.”http://www.springframework.org/schema/beans”

xmlns:kwj txheej txheem=”http://www.springframework.org/schema/integration/stream”

xsi:schemaLocation =”http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/Spring-beans.xsd

http://www.springframework.org/schema/integration

http://www.springframework.org/schema/integration/spring-integration.xsd

http://www.springframework.org/schema/integration/stream

http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd”>

<rau cov menyuam:ntxuav hniav txhuv id.”kev ntsuam xyuas” kev cuam tshuam rau kev cuam tshuam=”techalpine.samples.springint”/>

<rau cov menyuam:channel id=”hoob”/>

<rau cov menyuam:txawv input-channel=”hoob” nyob =”classplitter”

txujci =”phua” channel tawm hauv channel=”Tsev kawm ntawv”/>

<taum:taum daim id =”Xibfwb” hoob =”techalpine.samples.xib fwb”/>

<rau cov menyuam:poller id=”neeg txom nyem” vim =”tseeb” npaum li cas tas nrho =”2000″/>

</taum:taum>








Xaus

Lub ntsiab incentive ntawm adopting lub caij nplooj ntoos hlav integration framework, dua li qhov tseeb tias nws yog ib tug enterprise integration, nws yog ib qhov qhib framework. Enterprises yuav hloov tau los yog tweak qhov chaws thiab txhawb nws kom nws kawm tau. Tsis tau, Thawj cov peev xwm ntawm lub framework yuav nyob pristine thiab koom haum yuav tau mus koom lawv cov ntaub ntawv software. Kuj muaj ob peb lwm txoj hauv lub lag luam xws li cov tshuaj Camel ntawm Apache uas tseem yuav ntes tau cov qauv ntawm cov qauv ntawm enterprise integration txawm tias txhua yam, Caij nplooj ntoos hlav integration lawm nyiam tuaj.

============================================= ============================================== Yuav zoo TechAlpine phau ntawv rau Amazon
============================================== ---------------------------------------------------------------- electrician ct chestnutelectric
error

Txaus siab rau qhov blog? Tshaj tawm lus thov :)

Follow by Email
LinkedIn
LinkedIn
Share