CN107070782A - A kind of Interface integration method, server and the system expansible based on message queue - Google Patents
A kind of Interface integration method, server and the system expansible based on message queue Download PDFInfo
- Publication number
- CN107070782A CN107070782A CN201710301636.3A CN201710301636A CN107070782A CN 107070782 A CN107070782 A CN 107070782A CN 201710301636 A CN201710301636 A CN 201710301636A CN 107070782 A CN107070782 A CN 107070782A
- Authority
- CN
- China
- Prior art keywords
- message
- data
- message queue
- packets
- queue
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000010354 integration Effects 0.000 title claims abstract description 74
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000005540 biological transmission Effects 0.000 claims abstract description 80
- 238000012545 processing Methods 0.000 claims description 8
- 108010001267 Protein Subunits Proteins 0.000 claims description 2
- 238000012546 transfer Methods 0.000 abstract description 22
- 230000008878 coupling Effects 0.000 abstract description 10
- 238000010168 coupling process Methods 0.000 abstract description 10
- 238000005859 coupling reaction Methods 0.000 abstract description 10
- 230000003993 interaction Effects 0.000 description 12
- 230000008569 process Effects 0.000 description 11
- 239000000463 material Substances 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 238000003032 molecular docking Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/04—Real-time or near real-time messaging, e.g. instant messaging [IM]
- H04L51/046—Interoperability with other network applications or services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/222—Monitoring or handling of messages using geographical location information, e.g. messages transmitted or received in proximity of a certain spot or area
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a kind of Interface integration method, server and the system expansible based on message queue, this method includes:Message queue, and on-premise network service are configured, the message packets of external data sender transmission are received using the message queue;By the message queue, the message packets are transmitted to each outside data receiver, so that each described data receiver parses the content of the message packets, and call request are sent;Receive the call request that each described data receiver sends;The network service is called according to each described call request;The corresponding data of the message packets are obtained using the network service, and the data are transferred to each data receiver.Therefore the scheme that the present invention is provided can reduce the close coupling of data transfer.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of Interface integration side expansible based on message queue
Method, server and system.
Background technology
In information-based highly integrated unit, because the demand of business between each operation system in unit, it is necessary to enter
Row frequently data interaction.
At present, the data interaction between each operation system, is carried out data transmission using point-to-point mode.Such as, number
, it is necessary to point-to-point right with each data receiver progress respectively when being needed according to sender for each data receiver transmission data
Connect, so as to realize the data transfer with each data receiver.
But, existing mode, because data sender needs to carry out Point-to-Point Data with each data receiver respectively
Transmission, is modified once data sender, Added Business and during damage, it is necessary to adjust application layout, therefore data are passed
Defeated close coupling is higher.
The content of the invention
The invention provides a kind of Interface integration method, server and the system expansible based on message queue, it can drop
The close coupling of low data transfer.
In a first aspect, the invention provides based on the expansible Interface integration method of message queue, this method includes:
Configure message queue, and on-premise network service;
The message packets of external data sender transmission are received using the message queue;
By the message queue, the message packets are transmitted to each outside data receiver, so that each
The data receiver parses the content of the message packets, and sends call request;
Receive the call request that each described data receiver sends;
The network service is called according to each described call request;
The corresponding data of the message packets are obtained using the network service, and the data are transferred to each institute
State data receiver.
Preferably,
The configuration message queue, including:
Build Message Queuing Services program, and open queue service;
Determine user name, password, access path and the port numbers of the message queue;
The user name, the password, the access path and the port numbers are sent respectively to the data hair
The side of sending and each described data receiver, so that the data sender is according to the user name, the password, the access road
Footpath and the port numbers transmit the message packets to the message queue, so that each described data receiver is according to institute
State user name, the password, the access path and the port numbers and receive the message packets.
Preferably,
The message packets that external data sender transmission is received using the message queue, including:
The message packets of the setting transformat of data sender's transmission are received using the message queue, its
In, the transformat includes:Any one in JSON, XML, EXCEL and TXT.
Preferably,
After the message packets that external data sender transmission is received using the message queue, further wrap
Include:
Determine the message content that the message packets include;
Judge whether the message content meets content format set in advance, wherein, the content format includes:Data
Mark, type of message, summary info and transmission time;
If it is, by the message queue, the message packets are transmitted to data receiver each described;
If not, abandoning the message packets.
Preferably,
Further comprise:
Record the message queue service condition information.
Preferably,
The message queue, including:It is any one in ActiveMQ, RabbitMQ, Redis, ZeroMQ and Kafka
Kind.
Preferably,
The network service, including:WebService services any one in being serviced with WCF.
Second aspect, the invention provides based on the expansible Interface integration server of message queue, the server includes:
Configuration and deployment unit, for configuring message queue, and on-premise network service;
Message packets receiving unit, receives outer for the message queue using the configuration and deployment unit configuration
The message packets of portion data sender transmission;
Transmission unit, for the message queue configured by the configuration and deployment unit, by the message data
The message packets that bag receiving unit is received are transmitted to each outside data receiver, so that each described data receiver
The content of side's parsing message packets, and send call request;
Call request receiving unit, for receiving the call request that each described data receiver sends;
Call unit, for matching somebody with somebody described in being called according to each described call request that the call request receiving unit is received
Put and deployment unit deployment the network service;
Obtain and transmission unit, the network service for being called using the call unit obtains the message data
Corresponding data are wrapped, and the data are transferred to each data receiver.
Preferably,
The configuration and deployment unit, including:Build subelement, determination subelement, transmission sub-unit;
It is described to build subelement, for building Message Queuing Services program, and open queue service;
The determination subelement, for determine the user name for building the message queue that subelement is built, password,
Access path and port numbers;
The transmission sub-unit, for the user name for determining the determination subelement, the password, the access
Path and the port numbers are sent respectively to the data sender and each described data receiver, so that the data are sent out
Root is sent to be transmitted according to the user name, the password, the access path and the port numbers to the message queue described
Message packets, so that each described data receiver is according to the user name, the password, the access path and described
Port numbers receive the message packets.
Preferably,
The message packets receiving unit, connects for the message queue using the configuration and deployment unit configuration
The message packets of the setting transformat of data sender's transmission are received, wherein, the transformat includes:JSON、
Any one in XML, EXCEL and TXT.
Preferably,
Further comprise:Processing unit;
The processing unit, for determining that the message packets that the message packets receiving unit is received include
Message content;Judge whether the message content meets content format set in advance, wherein, the content format includes:
Data Identification, type of message, summary info and transmission time;If it is, triggering the transmission unit passes through the configuration and portion
The message queue of unit configuration is affixed one's name to, the message packets are transmitted to data receiver each described;If not, abandoning
The message packets.
The third aspect, the invention provides based on the expansible Interface integration system of message queue, the system includes:
Data sender, any of the above-described described Interface integration server expansible based on message queue and at least
One data receiver;
The data sender, is connected with the Interface integration server expansible based on message queue, for that will disappear
Breath packet is transferred to described based on the expansible Interface integration server of message queue;
Each described data receiver, is connected with the Interface integration server expansible based on message queue, uses
In the reception message packets based on the expansible Interface integration server transport of message queue, and disappear described in parsing
The content of packet is ceased, and sends call request to the Interface integration server expansible based on message queue;Receive institute
State the data corresponding to the call request based on the expansible Interface integration server transport of message queue.
The invention provides a kind of Interface integration method, server and the system expansible based on message queue, by with
Put message queue, and on-premise network service.Then the message count of data sender's transmission is received using the message queue of configuration
According to bag.Then the message packets received are transferred to each data receiver by message queue again, so that each data receiver
The content of side's parsing message packets, and send call request.Receive the call request of each data receiver transmission, Ran Hougen
The network service of deployment is called according to each call request, the corresponding data of message packets are obtained using network service, and by number
According to being transferred to each data receiver.By said process, as data sender and each data receiver in this programme
When carrying out data transmission, data sender only needs to that the data biography with each data receiver just can be completed by message queue
It is defeated, and do not need data sender carried out respectively with each data receiver it is point-to-point dock, therefore, the side provided of the invention
Case can reduce the close coupling of data transfer.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of flow for Interface integration method expansible based on message queue that one embodiment of the invention is provided
Schematic diagram;
Fig. 2 is a kind of knot for Interface integration server expansible based on message queue that one embodiment of the invention is provided
Structure schematic diagram;
Fig. 3 is a kind of Interface integration server expansible based on message queue that another embodiment of the present invention is provided
Structural representation;
Fig. 4 is a kind of interface expansible based on message queue including processing unit that one embodiment of the invention is provided
The structural representation of integrating server;
Fig. 5 is a kind of interface expansible based on message queue including processing unit that one embodiment of the invention is provided
The structural representation of integrated system;
Fig. 6 is a kind of stream for Interface integration method expansible based on message queue that another embodiment of the present invention is provided
Journey schematic diagram.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiments of the invention provide a kind of Interface integration method expansible based on message queue, the party
Method may comprise steps of:
Step 101:Configure message queue, and on-premise network service;
Step 102:The message packets of external data sender transmission are received using the message queue;
Step 103:By the message queue, the message packets are transmitted to each outside data receiver,
So that each described data receiver parses the content of the message packets, and send call request;
Step 104:Receive the call request that each described data receiver sends;
Step 105:The network service is called according to each described call request;
Step 106:The corresponding data of the message packets are obtained using the network service, and by the data transfer
To data receiver each described.
According to embodiment as shown in Figure 1, by configuring message queue, and on-premise network service.Then configuration is utilized
Message queue receive data sender transmission message packets.Then message queue again passes the message packets received
Each data receiver is defeated by, so that each data receiver parses the content of message packets, and call request is sent.Receive
The call request that each data receiver sends, the network service of deployment is then called according to each call request, network is utilized
The corresponding data of service acquisition message packets, and transfer data to each data receiver.Pass through said process, sheet
In scheme when data sender and each data receiver carry out data transmission, data sender is only needed to by message queue
Just the data transfer with each data receiver can be completed, and does not need data sender to enter respectively with each data receiver
The point-to-point docking of row, therefore, the embodiment that the present invention is provided can reduce the close coupling of data transfer.
In an embodiment of the invention, the configuration message team involved by the step 101 in flow chart shown in above-mentioned Fig. 1
Row, can include:
Build Message Queuing Services program, and open queue service;
Determine user name, password, access path and the port numbers of the message queue;
The user name, the password, the access path and the port numbers are sent respectively to the data hair
The side of sending and each described data receiver, so that the data sender is according to the user name, the password, the access road
Footpath and the port numbers transmit the message packets to the message queue, so that each described data receiver is according to institute
State user name, the password, the access path and the port numbers and receive the message packets.
In the present embodiment, building the specific pattern of Message Queuing Services program can determine according to business need.Such as
The Message Queuing Services program built is ActiveMQ.Wait after the completion of building, to data sender and each data receiver
Open queue is serviced, so that data sender and each data receiver can carry out data interaction using Message Queuing Services.
In the present embodiment, after the completion for the treatment of that messenger service queue service is built, it is thus necessary to determine that the user name of message queue, close
Code, access path and port numbers.The specific pattern of wherein user name, password, access path and port numbers can basis
Business need is determined.The user entitled 001 that such as determines, password are that 123456, access path can be used:Between network mutually
Agreement ip addresses even or Hostname the form of catalogue, the port numbers of file be 3000.
, can be according to the user name of the message queue of acquisition, password, access when data sender sends message packets
Message packets are sent to message queue by path and port numbers.And when message packets are sent to respectively by message queue
During individual data receiver, user name, password, access path and the port numbers that each data receiver need to match Message queue are
It is no consistent with the user name obtained before, password, access path and port numbers.When it is determined that when consistent, just receiving message data
Bag.And each data receiver can be sent out by the user name of acquisition, password, access path and port numbers for message queue
Call request is sent, to call network service to obtain the corresponding data of message packets.
According to above-described embodiment, Message Queuing Services program, open queue service are built first.It is then determined that building message
User name, password, access path and the port numbers of queue service, and user name, password, access path and port numbers are divided
Be not sent to data sender and each data receiver so that data sender and each data receiver according to user name,
Password, access path and port numbers carry out data interaction.Because data sender and each data receiver can be by disappearing
Cease queue consumers name, password, access path and port numbers and carry out data interaction, therefore, the accuracy of data interaction is higher.
In an embodiment of the invention, the step 102 in flow chart shown in above-mentioned Fig. 1 is received using the message queue
The message packets of external data sender transmission, can include:
The message packets of the setting transformat of data sender's transmission are received using the message queue, its
In, the transformat includes:Any one in JSON, XML, EXCEL and TXT.
In the present embodiment, the specific pattern of transformat can be determined according to business need.JSON, XML, EXCEL and
Any one in TXT, simply a kind of preferred mode, can also choose other patterns according to business need.
In the present embodiment, data sender before message packets are sent into message queue, it is necessary to according to will disappear
Breath packet is converted to the transformat of setting.When the transformat such as set is JSON, can arrange type of message is:
DepartmentInfo, arranging filter condition is:TypeName=DepartmentChange.According to agreement type of message and
Message packets are converted to JSON transformats by filter condition, are then sent to the message packets of JSON transformats and are disappeared
Queue is ceased, and the JSON transmission format information packets that data sender is transmitted are received using message queue.
According to above-described embodiment, the message data of the setting transformat of data sender's transmission is received using message queue
Bag.Due to transformat of the message packets for setting, therefore message queue to message packets when being received and transmitted,
Because uniform format without entering the operations such as row format conversion again, therefore efficiency of transmission is higher.
In an embodiment of the invention, the step 102 in flow chart shown in above-mentioned Fig. 1 is connect using the message queue
After the message packets for receiving external data sender transmission, it may further include:
Determine the message content that the message packets include;
Judge whether the message content meets content format set in advance, wherein, the content format includes:Data
Mark, type of message, summary info and transmission time;
If it is, performing step 103 by the message queue, the message packets are transmitted to number each described
According to recipient;
If not, abandoning the message packets.
In the present embodiment, the content format of setting can be determined according to business need.Such as content format includes:Number
According to mark, type of message, summary info and transmission time, it can be expressed as in program code { " ID ":" ", " Type ":" ", "
Desc":" ", " Date ":""}.Wherein, Data Identification ID can be for calling network service, and utilizes network service acquisition pair
The data answered;It is newly-increased data that type of message Type, which can define message, deletes data and still changes data, and the newly-increased number of regulation
Represented according to Add, deleting data and being represented with Delete, change data are represented with Update;Summary info Desc can describe to disappear
The data of breath;Transmission time Date is the time that data sender sends message packets.
In the present embodiment, the message content that message packets include will include:Data Identification, type of message, summary
Information and transmission time.It can not lack, because when missing each data receiver can be caused to be carried out to message packets
Correct parsing, so that the corresponding data of message packets can not be transferred correctly.Data sender is with each data receiver's
Data interaction will fail.
According to above-described embodiment, after message queue receives the message packets of data side's transmission, it may be determined that message
The message content that packet includes.Only when it is determined that message content meets content format set in advance, just by message count
Transmitted according to bag to each data receiver, otherwise will give up message packets.Therefore data sender and each number can be improved
According to the probability of receiving side data interaction success.
In an embodiment of the invention, it may further include in flow chart shown in above-mentioned Fig. 1:Record the message team
Row service condition information;
In the present embodiment, the service condition information of message queue can include:Receive type, the content of message packets
And receive the time;The mark ID and address information of the data sender of message packets;Each data receiver of message packets
The mark ID and address information of side;The situation for calling network service acquisition data of each data receiver;And by acquisition
Data are sent to the transmission information of each data receiver.
In the present embodiment, message queue service condition information is recorded, can be recorded in the form of journal file.When
When needing the transmission reception condition of query message data bag and calling network service situation, it can be looked into by the journal file
Ask specific information.
, can be with the transmission of query message data bag by recording message queue service condition information according to above-described embodiment
Reception condition and network service situation is called, so that business personnel can be with according to record message queue service condition information
The service condition for accurately understanding message queue is understood, it is possible to according to record message queue service condition information to message
Queue is safeguarded.
In an embodiment of the invention, message queue involved in flow chart shown in above-mentioned Fig. 1 can include:
Any one in ActiveMQ, RabbitMQ, Redis, ZeroMQ and Kafka;
In the present embodiment, the pattern of the message queue of configuration can be determined according to business need.Message queue can be
Any one in ActiveMQ, RabbitMQ, Redis, ZeroMQ and Kafka, a kind of simply preferred mode can be with
Other message queue patterns are selected according to business need.
According to above-described embodiment, message queue can be selected according to business need ActiveMQ, RabbitMQ, Redis,
Any one in ZeroMQ and Kafka.Due to that can select different types of message queue, thus business applicability compared with
By force.
In an embodiment of the invention, network service involved in flow chart shown in above-mentioned Fig. 1 can include:
WebService services any one in being serviced with WCF.
In the present embodiment, the pattern of the network service of deployment can be determined according to business need.Such as can be
WebService is serviced or WCF services.Wherein, network service uses WebService services or WCF services to be a kind of preferred
Ground mode, can also select the network service of other patterns according to business need.
In the present embodiment, it should be noted that the network with data sender and between each data receiver
Agreement, will match with the network service pattern of selection.So that the transmission that message packets and data can be well on.
According to above-described embodiment, network service can select WebService services or WCF to service according to business need.By
In can select different types of network service, therefore business is with strong applicability.
As shown in Fig. 2 the embodiments of the invention provide a kind of Interface integration server expansible based on message queue, should
Server includes:
Configuration and deployment unit 201, for configuring message queue, and on-premise network service;
Message packets receiving unit 202, for the message queue configured using the configuration and deployment unit 201
Receive the message packets of external data sender transmission;
Transmission unit 203, for the message queue configured by the configuration and deployment unit 201, disappears described
The message packets that breath packet receiving unit 202 is received are transmitted to each outside data receiver, so that each institute
State data receiver and parse the content of the message packets, and send call request;
Call request receiving unit 204, for receiving the call request that each described data receiver sends;
Call unit 205, each described call request for being received according to the call request receiving unit 204 is called
The network service that the configuration and deployment unit 201 are disposed;
Obtain and transmission unit 206, for the network service that is called using the call unit 205 obtain described in disappear
The corresponding data of packet are ceased, and the data are transferred to each data receiver.
According to embodiment as shown in Figure 2, the message that message packets receiving unit is configured using configuration and deployment unit
Queue receive data sender transmission message packets, then transmission unit by configure and deployment unit configure message team
Arrange the message packets for receiving message packets receiving unit to transmit to each data receiver, so that each data receiver
The content of message packets is parsed, and sends call request.Then each data receiver is received using call request receiving unit
The call request that side is sent, and each call request received using call unit according to call request receiving unit calls configuration
And the network service of deployment unit deployment.Then the network service that acquisition and transmission unit are called using call unit is obtained
The corresponding data of message packets, and transfer data to each data receiver.By said process, in this programme when
When data sender and each data receiver carry out data transmission, data sender is only needed to by configuring and deployment unit is matched somebody with somebody
The message queue put just can complete the data transfer with each data receiver, and do not need data sender respectively with each
Data receiver carries out point-to-point docking, therefore, and the embodiment that the present invention is provided can reduce the close coupling of data transfer.
In an embodiment of the invention, as shown in figure 3, can include in the configuration and deployment unit 201:Build son
Unit 301, determination subelement 302, transmission sub-unit 303;
It is described to build subelement 301, for building Message Queuing Services program, and open queue service;
The determination subelement 302, for determining the user for building the message queue that subelement 301 is built
Name, password, access path and port numbers;
The transmission sub-unit 303, for the user name for determining the determination subelement 302, the password, institute
State access path and the port numbers are sent respectively to the data sender and each described data receiver, so that described
Data sender passes according to the user name, the password, the access path and the port numbers to the message queue
The defeated message packets so that each described data receiver according to the user name, the password, the access path with
And the port numbers receive the message packets.
In an embodiment of the invention, the message packets receiving unit 202, for utilizing the configuration and deployment
The message queue that unit 201 is configured receives the message packets of the setting transformat of data sender's transmission, its
In, the transformat includes:Any one in JSON, XML, EXCEL and TXT.
In an embodiment of the invention, as shown in figure 4, the Interface integration server expansible based on message queue
It may further include:Processing unit 401;
The processing unit 401, for determining the message packets that the message packets receiving unit 202 is received
The message content included;Judge whether the message content meets content format set in advance, wherein, the content format
Including:Data Identification, type of message, summary info and transmission time;If it is, triggering the transmission unit 203 by described
Configuration and the message queue of deployment unit configuration, the message packets are transmitted to data receiver each described;Such as
It is really no, abandon the message packets.
In an embodiment of the invention, the Interface integration server expansible based on message queue can be further
Including:Recording unit,
The recording unit, for recording the message queue service condition information.
A kind of computer-readable recording medium is provided in one embodiment of the invention, the computer-readable recording medium includes:Execute instruction, when storage control
Described in the computing device of device processed during execute instruction, the storage control is performed can based on message queue described in any of the above-described
The Interface integration method of extension.
A kind of storage control is provided in one embodiment of the invention, the storage control includes:Processor, memory
And bus;The memory is used to store execute instruction;The processor is connected with the memory by the bus;Work as institute
When stating storage control operation, the execute instruction of memory storage described in the computing device, so that the storage control
Device processed is performed described in any of the above-described based on the expansible Interface integration method of message queue.
As shown in figure 5, the embodiments of the invention provide a kind of Interface integration system expansible based on message queue, this is
System includes:
Data sender 501, any of the above-described described Interface integration server 502 expansible based on message queue, with
And at least one data receiver 503;
The data sender 501, is connected with the Interface integration server 502 expansible based on message queue, uses
It is described based on the expansible Interface integration server 502 of message queue in message packets are transferred to;
Each described data receiver 503, with Interface integration server 502 phase expansible based on message queue
Even, for receiving the message packets that the Interface integration server 502 expansible based on message queue is transmitted, and solve
The content of the message packets is analysed, and sends call request to the Interface integration server expansible based on message queue
502;Receive the number corresponding to the call request that the Interface integration server 502 expansible based on message queue is transmitted
According to.
According to embodiment as shown in Figure 5, the system includes:Data sender, based on the expansible interface of message queue
Integrating server and at least one data receiver;Message packets are transferred to by data sender can based on message queue
The Interface integration server of extension;Then each data receiver is received based on the expansible Interface integration server of message queue
Message packets of transmission, and parse the content of message packets, send call request to connecing based on message queue is expansible
Mouthful integrating server, then receives the call request that corresponds to based on the expansible Interface integration server transport of message queue
Data.By said process, in this programme when data sender and each data receiver carry out data transmission, data
Sender is only needed to by that just can be completed and each data receiver based on the expansible Interface integration server of message queue
Data transfer, and do not need data sender carried out respectively with each data receiver it is point-to-point dock, it is therefore, of the invention
The scheme of offer can reduce the close coupling of data transfer.
In an embodiment of the invention, each data receiver enters according to transformat set in advance and filter condition
Row message is monitored, after the message packets based on the expansible Interface integration server transport of message queue are listened to, solution
Analyse the content in message packets.Content in wherein parsing can include Data Identification, type of message, summary info and transmission
Time, and call instruction is generated according to the content that parses, and call instruction is sent to connect based on message queue is expansible
Mouth integrating server, to obtain data corresponding with call instruction.After data are obtained, data are carried out according to type of message
The operations such as deletion, renewal or increase.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned server and system, due to the present invention
Embodiment of the method is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
Below to include data sender 1 based on the expansible Interface integration system of message queue for human resources system
System, data receiver A are exemplified by Enterprise Resource Planning, data receiver B are material Management System.Expansion explanation base
In the expansible Interface integration method of message queue, as shown in fig. 6, be somebody's turn to do based on the expansible Interface integration method of message queue,
It may include steps of:
Step 601:Network service is disposed in the Interface integration server expansible based on message queue.
In this step, disposed according to business need in the Interface integration server expansible based on message queue
WebService is serviced.
Step 602:Message Queuing Services program is built in the Interface integration server expansible based on message queue, and
Open queue is serviced.
In this step, ActiveMQ message queues are built in the Interface integration server expansible based on message queue
Service routine, and open queue service.
Step 603:Utilize the user name, close that message queue is determined based on the expansible Interface integration server of message queue
Code, access path and port numbers.
In this step, it is that 123456, access path can to determine the user entitled 001 of ActiveMQ message queues, password
To use:192.168.0.0 shuju, port numbers be 3000.
Step 604:Using based on the expansible Interface integration server of message queue by user name, password, access path
And port numbers are sent respectively to data sender and each data receiver.
In this step, using based on the expansible Interface integration server of message queue by the use determined in step 603
Name in an account book 001, password 123456, access path 192.168.0.0 shuju, port numbers 3000 be sent respectively to data sender
1st, data receiver A, data receiver B.
Step 605:When data sender 1 determines that data send change, organize data into preset transmission lattice
The message packets of formula.
In this step, transformat set in advance is JSON forms.When the human resource system of data sender 1 determines
When its data is changed, the data of change are organized into as the message packets of JSON forms.
Step 606:Message packets are sent to based on the expansible Interface integration service of message queue by data sender 1
Device.
Step 607:Data sender 1 is received based on the expansible Interface integration server by utilizing message queue of message queue
The message packets of transmission.
Step 608:The message that message packets include is determined based on the expansible Interface integration server of message queue
Content.
In this step, it is determined that the message content that includes of message packets be that Data Identification 011, type of message are new
Increase data, summary info employee A information and send the time 2017/1/10.
Step 609:Judge whether message content meets based on the expansible Interface integration server of message queue to set in advance
Fixed content format, if it is, performing step 610;Otherwise, step 611 is performed.
In this step, the message content determined in judgment step 608 meet content format Data Identification set in advance,
Type of message, summary info and transmission time.Therefore step 610 is performed.
Step 610:Based on the expansible Interface integration server of message queue by message queue, message packets are passed
Each data receiver is transported to, and performs step 612.
In this step, message packets are transferred to data receiver A ERP systems, data receiver's B handlings of goods and materials
System.
Step 611:Message packets are abandoned, and terminate current process.
Step 612:Each data receiver is received based on disappearing that the expansible Interface integration server of message queue is sent
Packet is ceased, and parses the content of message packets.
In this step, data receiver A ERP systems, data receiver's B material Management Systems parse message count respectively
Content in is that Data Identification 011, type of message are newly-increased data, summary info employee A information and the transmission time 2017/
1/10。
Step 613:It is expansible to message queue is based on that each data receiver sends call request according to the content of parsing
Interface integration server.
Step 614:The tune of each data receiver transmission is received based on the expansible Interface integration server of message queue
With request.
In this step, receive what data receiver A ERP systems, data receiver B material Management Systems were sent respectively
Call request.
Step 615:Network is called to take according to each call request based on the expansible Interface integration server of message queue
Business.
In step, serviced according to WebService is disposed in call request invocation step 601.
Step 616:Message packets are obtained based on the expansible Interface integration server by utilizing network service of message queue
Corresponding data, and transfer data to each data receiver.
It is using the WebService service acquisitions Data Identification 011, the type of message that are called in step 616 in this step
Newly-increased data, summary info employee A information and the data for sending the corresponding employee A of time 2017/1/10.
Step 617:Each data receiver receives data, and is carried out more using the data of the data received and itself storage
New operation.
In this step, data receiver A ERP systems, data receiver B material Management Systems receive employee A's respectively
Data, and because employee A data are newly-increased data, directly store employee A data.
In summary, each embodiment of the invention can at least realize following beneficial effect:
1st, in embodiments of the present invention, by configuring message queue, and on-premise network service.Then disappearing using configuration
Cease the message packets that queue receives data sender's transmission.Then the message packets received are transferred to by message queue again
Each data receiver, so that each data receiver parses the content of message packets, and sends call request.Receive each
The call request that data receiver sends, the network service of deployment is then called according to each call request, network service is utilized
The corresponding data of message packets are obtained, and transfer data to each data receiver.Pass through said process, this programme
In when data sender and each data receiver carry out data transmission, data sender only needs to just may be used by message queue
To complete the data transfer with each data receiver, and data sender is not needed to carry out point with each data receiver respectively
Docking to point, therefore, the embodiment that the present invention is provided can reduce the close coupling of data transfer.
2nd, in embodiments of the present invention, Message Queuing Services program, open queue service are built first.It is then determined that building
User name, password, access path and the port numbers of Message Queuing Services, and by user name, password, access path and port
Number data sender and each data receiver are sent respectively to, so that data sender and each data receiver are according to user
Name, password, access path and port numbers carry out data interaction.Because data sender and each data receiver can pass through
Message queue user name, password, access path and port numbers carry out data interaction, and therefore, the accuracy of data interaction is higher.
3rd, in embodiments of the present invention, the message of the setting transformat of data sender's transmission is received using message queue
Packet.It is the transformat set due to message packets, therefore message queue is being received and sent out to message packets
When sending, because uniform format without entering the operations such as row format conversion again, therefore efficiency of transmission is higher.
4th, in embodiments of the present invention, after message queue receives the message packets of data side's transmission, it may be determined that
The message content that message packets include.Only when it is determined that message content meets content format set in advance, it will just disappear
Breath packet is transmitted to each data receiver, otherwise will give up message packets.Therefore data sender can be improved and each
The probability of individual data receiving side data interaction success.
5th, in embodiments of the present invention, can be with query message data bag by recording message queue service condition information
Send reception condition and call network service situation, so that business personnel can be according to record message queue service condition information
The service condition that message queue can accurately be understood is understood, it is possible to according to record message queue service condition information pair
Message queue is safeguarded.
6th, in embodiments of the present invention, message queue can according to business need select ActiveMQ, RabbitMQ,
Any one in Redis, ZeroMQ and Kafka.Due to that can select different types of message queue, therefore business is applicable
Property is stronger.
7th, in embodiments of the present invention, network service can select WebService services or WCF to take according to business need
Business.Due to that can select different types of network service, therefore business is with strong applicability.
8th, in embodiments of the present invention, the message queue that message packets receiving unit is configured using configuration and deployment unit
The message packets of data sender's transmission are received, then transmission unit will by the message queue configured and deployment unit is configured
The message packets that message packets receiving unit is received are transmitted to each data receiver, so that each data receiver parses
The content of message packets, and send call request.Then each data receiver hair is received using call request receiving unit
The call request sent, and each call request received using call unit according to call request receiving unit calls configuration and portion
Affix one's name to the network service of unit deployment.Then the network service that acquisition and transmission unit are called using call unit obtains message
The corresponding data of packet, and transfer data to each data receiver.By said process, work as data in this programme
When sender and each data receiver carry out data transmission, data sender is only needed to by configuring and deployment unit configures
Message queue just can complete the data transfer with each data receiver, and do not need data sender respectively with each data
Recipient carries out point-to-point docking, therefore, and the embodiment that the present invention is provided can reduce the close coupling of data transfer.
9th, in embodiments of the present invention, the system includes:Data sender, based on the expansible Interface integration of message queue
Server and at least one data receiver;Message packets are transferred to expansible based on message queue by data sender
Interface integration server;Then each data receiver is received based on the expansible Interface integration server transport of message queue
Message packets, and parse the content of message packets, send call request to based on the expansible sets of interfaces of message queue
Into server, the number corresponding to call request based on the expansible Interface integration server transport of message queue is then received
According to.By said process, in this programme when data sender and each data receiver carry out data transmission, data hair
The side of sending is only needed to by that just can be completed with each data receiver's based on the expansible Interface integration server of message queue
Data transfer, and do not need data sender respectively with each data receiver carry out it is point-to-point dock, therefore, the present invention is carried
The scheme of confession can reduce the close coupling of data transfer.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity
Or operation makes a distinction with another entity or operation, and not necessarily require or imply exist between these entities or operation
Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non-
It is exclusive to include, so that process, method, article or equipment including a series of key elements not only include those key elements,
But also other key elements including being not expressly set out, or also include solid by this process, method, article or equipment
Some key elements.In the absence of more restrictions, the key element limited by sentence " including one ", is not arranged
Except also there is other identical factor in the process including the key element, method, article or equipment.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
Programmed instruction related hardware is completed, and foregoing program can be stored in the storage medium of embodied on computer readable, the program
Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:ROM, RAM, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, the skill of the present invention is merely to illustrate
Art scheme, is not intended to limit the scope of the present invention.Any modification for being made within the spirit and principles of the invention,
Equivalent substitution, improvement etc., are all contained in protection scope of the present invention.
Claims (10)
1. a kind of Interface integration method expansible based on message queue, it is characterised in that configuration message queue, and deployment net
Network is serviced, in addition to:
The message packets of external data sender transmission are received using the message queue;
By the message queue, the message packets are transmitted to each outside data receiver, so that described in each
Data receiver parses the content of the message packets, and sends call request;
Receive the call request that each described data receiver sends;
The network service is called according to each described call request;
The corresponding data of the message packets are obtained using the network service, and the data are transferred to each number
According to recipient.
2. according to the method described in claim 1, it is characterised in that
The configuration message queue, including:
Build Message Queuing Services program, and open queue service;
Determine user name, password, access path and the port numbers of the message queue;
The user name, the password, the access path and the port numbers are sent respectively to the data sender
With data receiver each described so that the data sender according to the user name, the password, the access path with
And the port numbers transmit the message packets to the message queue, so that each described data receiver uses according to described
Name in an account book, the password, the access path and the port numbers receive the message packets.
3. according to the method described in claim 1, it is characterised in that
The message packets that external data sender transmission is received using the message queue, including:
The message packets of the setting transformat of data sender's transmission are received using the message queue, wherein, institute
Stating transformat includes:In Object Markup Language JSON, expandable mark language XML, form EXCEL and text document TXT
Any one.
4. method according to claim 3, it is characterised in that
After the message packets that external data sender transmission is received using the message queue, further comprise:
Determine the message content that the message packets include;
Judge whether the message content meets content format set in advance, wherein, the content format includes:Data mark
Knowledge, type of message, summary info and transmission time;
If it is, by the message queue, the message packets are transmitted to data receiver each described;
If not, abandoning the message packets.
5. according to any described method of Claims 1-4, it is characterised in that
Further comprise:
Record the message queue service condition information;
And/or,
The message queue, including:Any one in ActiveMQ, RabbitMQ, Redis, ZeroMQ and Kafka;
And/or,
The network service, including:WebService services any one in being serviced with WCF.
6. a kind of Interface integration server expansible based on message queue, it is characterised in that including:
Configuration and deployment unit, for configuring message queue, and on-premise network service;
Message packets receiving unit, external number is received for the message queue using the configuration and deployment unit configuration
The message packets transmitted according to sender;
Transmission unit, for the message queue configured by the configuration and deployment unit, the message packets are connect
The message packets for receiving unit reception are transmitted to each outside data receiver, so that each described data receiver's solution
The content of the message packets is analysed, and sends call request;
Call request receiving unit, for receiving the call request that each described data receiver sends;
Call unit, each described call request for being received according to the call request receiving unit call it is described configuration and
The network service of deployment unit deployment;
Obtain and transmission unit, the network service for being called using the call unit obtains the message packets pair
The data answered, and the data are transferred to each data receiver.
7. server according to claim 6, it is characterised in that
The configuration and deployment unit, including:Build subelement, determination subelement, transmission sub-unit;
It is described to build subelement, for building Message Queuing Services program, and open queue service;
The determination subelement, for determining the user name for building the message queue that subelement is built, password, access
Path and port numbers;
The transmission sub-unit, for the user name for determining the determination subelement, the password, the access path
And the port numbers are sent respectively to the data sender and each described data receiver, so that the data sender
According to the user name, the password, the access path and the port numbers message is transmitted to the message queue
Packet, so that each described data receiver is according to the user name, the password, the access path and the port
Number receive the message packets.
8. server according to claim 6, it is characterised in that
The message packets receiving unit, institute is received for the message queue using the configuration and deployment unit configuration
The message packets of the setting transformat of data sender's transmission are stated, wherein, the transformat includes:JSON、XML、
Any one in EXCEL and TXT.
9. server according to claim 8, it is characterised in that
Further comprise:Processing unit;
The processing unit, for determining that what message packets that the message packets receiving unit is received included disappears
Cease content;Judge whether the message content meets content format set in advance, wherein, the content format includes:Data
Mark, type of message, summary info and transmission time;If it is, it is single by the configuration and deployment to trigger the transmission unit
The message queue of member configuration, the message packets are transmitted to data receiver each described;If not, abandoning described
Message packets.
10. a kind of Interface integration system expansible based on message queue, it is characterised in that including:
Any described Interface integration server expansible based on message queue of data sender, claim 6 to 9 and
At least one data receiver;
The data sender, is connected with the Interface integration server expansible based on message queue, for by message count
It is transferred to according to bag described based on the expansible Interface integration server of message queue;
Each described data receiver, is connected with the Interface integration server expansible based on message queue, for connecing
The message packets based on the expansible Interface integration server transport of message queue are received, and parse the message count
According to the content of bag, call request is sent to the Interface integration server expansible based on message queue;It is based on described in receiving
The data corresponding to the call request of the expansible Interface integration server transport of message queue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710301636.3A CN107070782A (en) | 2017-05-02 | 2017-05-02 | A kind of Interface integration method, server and the system expansible based on message queue |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710301636.3A CN107070782A (en) | 2017-05-02 | 2017-05-02 | A kind of Interface integration method, server and the system expansible based on message queue |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107070782A true CN107070782A (en) | 2017-08-18 |
Family
ID=59603888
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710301636.3A Pending CN107070782A (en) | 2017-05-02 | 2017-05-02 | A kind of Interface integration method, server and the system expansible based on message queue |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107070782A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762953A (en) * | 2018-05-25 | 2018-11-06 | 连云港杰瑞电子有限公司 | A kind of message queue implementation method |
CN109246092A (en) * | 2018-08-22 | 2019-01-18 | 北京旷视科技有限公司 | Interface managerial method, device, system, computer readable storage medium |
CN109710435A (en) * | 2019-01-03 | 2019-05-03 | 山东浪潮通软信息科技有限公司 | A kind of message delivery method based on the more message queues of support |
CN109766195A (en) * | 2018-12-13 | 2019-05-17 | 平安普惠企业管理有限公司 | The method and Related product of loss of data in supervisory messages queue |
CN110138753A (en) * | 2019-04-26 | 2019-08-16 | 中国工商银行股份有限公司 | Distributed message service system, method, equipment and computer readable storage medium |
CN110674004A (en) * | 2019-08-28 | 2020-01-10 | 北京奇艺世纪科技有限公司 | Queue message recording method, system, electronic equipment and storage medium |
CN111797166A (en) * | 2020-06-29 | 2020-10-20 | 中国工商银行股份有限公司 | Quasi-real-time resume data synchronization method and device, electronic equipment and medium |
CN115982074A (en) * | 2023-03-20 | 2023-04-18 | 深圳市欣博跃电子有限公司 | Docking station data processing method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103152433A (en) * | 2013-01-14 | 2013-06-12 | 广东电子工业研究院有限公司 | Distributed server side framework and use, interaction and request processing method thereof |
CN105472042A (en) * | 2016-01-15 | 2016-04-06 | 中煤电气有限公司 | WEB terminal controlled message middleware system and data transmission method thereof |
CN105657000A (en) * | 2015-12-25 | 2016-06-08 | 北京奇虎科技有限公司 | Message transmission method and device |
CN105871966A (en) * | 2015-09-22 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Message distribution method, device and system |
US20170078365A1 (en) * | 2014-01-14 | 2017-03-16 | International Business Machines Corporation | Message switch file sharing |
-
2017
- 2017-05-02 CN CN201710301636.3A patent/CN107070782A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103152433A (en) * | 2013-01-14 | 2013-06-12 | 广东电子工业研究院有限公司 | Distributed server side framework and use, interaction and request processing method thereof |
US20170078365A1 (en) * | 2014-01-14 | 2017-03-16 | International Business Machines Corporation | Message switch file sharing |
CN105871966A (en) * | 2015-09-22 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Message distribution method, device and system |
CN105657000A (en) * | 2015-12-25 | 2016-06-08 | 北京奇虎科技有限公司 | Message transmission method and device |
CN105472042A (en) * | 2016-01-15 | 2016-04-06 | 中煤电气有限公司 | WEB terminal controlled message middleware system and data transmission method thereof |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762953A (en) * | 2018-05-25 | 2018-11-06 | 连云港杰瑞电子有限公司 | A kind of message queue implementation method |
CN108762953B (en) * | 2018-05-25 | 2022-03-15 | 连云港杰瑞电子有限公司 | Message queue realizing method |
CN109246092A (en) * | 2018-08-22 | 2019-01-18 | 北京旷视科技有限公司 | Interface managerial method, device, system, computer readable storage medium |
CN109246092B (en) * | 2018-08-22 | 2021-08-10 | 北京旷视科技有限公司 | Interface management method, device, system and computer readable storage medium |
CN109766195A (en) * | 2018-12-13 | 2019-05-17 | 平安普惠企业管理有限公司 | The method and Related product of loss of data in supervisory messages queue |
CN109710435A (en) * | 2019-01-03 | 2019-05-03 | 山东浪潮通软信息科技有限公司 | A kind of message delivery method based on the more message queues of support |
CN110138753A (en) * | 2019-04-26 | 2019-08-16 | 中国工商银行股份有限公司 | Distributed message service system, method, equipment and computer readable storage medium |
CN110674004A (en) * | 2019-08-28 | 2020-01-10 | 北京奇艺世纪科技有限公司 | Queue message recording method, system, electronic equipment and storage medium |
CN111797166A (en) * | 2020-06-29 | 2020-10-20 | 中国工商银行股份有限公司 | Quasi-real-time resume data synchronization method and device, electronic equipment and medium |
CN111797166B (en) * | 2020-06-29 | 2023-08-18 | 中国工商银行股份有限公司 | Method and device for synchronizing quasi-real-time resume data, electronic equipment and medium |
CN115982074A (en) * | 2023-03-20 | 2023-04-18 | 深圳市欣博跃电子有限公司 | Docking station data processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107070782A (en) | A kind of Interface integration method, server and the system expansible based on message queue | |
CN110351342A (en) | Service order processing method, device, computer equipment and storage medium | |
CN108989372A (en) | Method, registration center and the equipment of service discovery | |
CN110310034A (en) | A kind of service orchestration applied to SaaS, business flow processing method and apparatus | |
CN107113232A (en) | The method and apparatus that NFV manages layout | |
CN112511218B (en) | Satellite ground station monitoring system based on microservice | |
JP2008532119A5 (en) | ||
CN105530666B (en) | Binding session method and system | |
CN108134830A (en) | Load-balancing method, system, device and storage medium based on message queue | |
CN111339145A (en) | Process integration method and platform, and computer-readable storage medium | |
CN107222530A (en) | Service asynchronous exchange method, equipment, system and computer-readable recording medium | |
CN109300217A (en) | Queuing management method, computer storage medium, queuing server and system | |
CN109379326A (en) | XML message rule method of calibration, equipment and storage medium | |
CN110380992A (en) | Message processing method, device and network flow acquire equipment | |
CN109327511A (en) | A kind of data request method and server based on http protocol | |
CN110213380A (en) | A kind of information push method, device, computer equipment and storage medium | |
CN108933946A (en) | Live streaming concern method, storage medium, electronic equipment and system based on acoustic control | |
CN105847179B (en) | The method and device that Data Concurrent reports in a kind of DPI system | |
CN114025027B (en) | Method and device for running data transmission script, storage medium and electronic device | |
CN108306934A (en) | A kind of cross-server document transmission method and system | |
CN107040613A (en) | A kind of message transmitting method and system | |
CN110381058A (en) | Request transmission method and device based on full-duplex communication protocol Web Socket | |
CN103473106B (en) | Method and system for generating page | |
TW501024B (en) | Method and apparatus for customizing and forwarding parameters in a network processor | |
JP4516594B2 (en) | Message transmission control method, message transmission control device, and message transmission control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170818 |