CN103747035A - Message middleware multi-target routing and copying technology based on rule - Google Patents

Message middleware multi-target routing and copying technology based on rule Download PDF

Info

Publication number
CN103747035A
CN103747035A CN201310713530.6A CN201310713530A CN103747035A CN 103747035 A CN103747035 A CN 103747035A CN 201310713530 A CN201310713530 A CN 201310713530A CN 103747035 A CN103747035 A CN 103747035A
Authority
CN
China
Prior art keywords
message
service
middleware
configuration information
service identification
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
Application number
CN201310713530.6A
Other languages
Chinese (zh)
Inventor
田雪
徐丹丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jin Zheng Science And Technology Co Ltd Of Shenzhen
Original Assignee
Jin Zheng Science And Technology Co Ltd Of Shenzhen
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jin Zheng Science And Technology Co Ltd Of Shenzhen filed Critical Jin Zheng Science And Technology Co Ltd Of Shenzhen
Priority to CN201310713530.6A priority Critical patent/CN103747035A/en
Publication of CN103747035A publication Critical patent/CN103747035A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention is applicable to the technical field of computers and provides a message middleware multi-target routing and copying technology based on a rule. The method includes: a middleware receives a message sent by a client; and the middleware analyzing a service identification carried by the message if service configuration information is configured, wherein the service configuration information includes a service field, a preset service identification and a plurality of target addresses; the middleware copying the message if the service identification matches the preset service identification of the service configuration information; and the middleware forwarding the message according to the plurality of target addresses. The message middleware multi-target routing and copying technology based on the rule realizes support of multi-target copying and forwarding of messages of a plurality of kinds of service protocols through a plug-in method and does not limit service protocols.

Description

The rule-based multi-object routing of message-oriented middleware and reproduction technology
Technical field
The invention belongs to field of computer technology, relate in particular to the rule-based multi-object routing of message-oriented middleware and reproduction technology.
Background technology
At present, message one-to-many transmission mode between service end and client is publish/subscribe pattern, as the publish/subscribe in IBMWebSphere MQ, client only needs issue (or subscription) message of a certain theme of issue (or subscription), just can realize one-to-many, the many-one of message, the transmission of multi-to-multi, from room and time decoupling zero publisher and subscriber.
But publish/subscribe pattern is based on application program, need application layer to be used in conjunction with, and need to realize the contact between message by theme, this and we wish just message transmission merely, irrelevant with service protocol, and service end is inconsistent without the hope of transformation client while changing.
Summary of the invention
The embodiment of the present invention provides the rule-based multi-object routing of message-oriented middleware and reproduction technology, is intended to solve the service protocol of existing massage pattern restriction of message, when service end changes, needs client to coordinate, the problem that upgrade cost is high.
On the one hand, provide a kind of method of message copy and forwarding, described method comprises:
Middleware receives the message that client sends;
If configured service configuration information, described middleware is resolved the service identification that described message is carried, and described service configuration information comprises service fields, default service identification and several destination addresses;
If described service identification mates with the default service identification of described service configuration information, described middleware copies described message;
Described middleware forwards described message according to described several destination addresses.
On the other hand, provide the middleware of a kind of message copy and forwarding, described middleware comprises:
Message sink unit, the message sending for receiving client;
Message parse unit, if for having configured service configuration information, resolve the service identification that described message is carried, described service configuration information comprises service fields, default service identification and several destination addresses;
Message copy unit, if mate with the default service identification of described service configuration information for described service identification, copies described message;
Dispatch Unit, for forwarding described message according to described several destination addresses.
In the embodiment of the present invention, middleware receives the message that client sends; If configured service configuration information, described middleware is resolved the service identification that described message is carried, and described service configuration information comprises service fields, default service identification and several destination addresses; If described service identification mates with the default service identification of described service configuration information, described middleware copies described message; Described middleware forwards described message according to described several destination addresses, and the present invention has realized by plug-in unit mode and supported multiple targets of the message of multiple business agreement to copy and forward, not limit service agreement.
Accompanying drawing explanation
Fig. 1 is the realization flow figure of the method for the message copy that provides of the embodiment of the present invention one and forwarding;
Fig. 2 is the realization flow figure of the method for the message copy that provides of the embodiment of the present invention two and forwarding;
Fig. 3 is the structured flowchart of the middleware of the message copy that provides of the embodiment of the present invention three and forwarding.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
In embodiments of the present invention, middleware receives the message that client sends; If configured service configuration information, described middleware is resolved the service identification that described message is carried, and described service configuration information comprises service fields, default service identification and several destination addresses; If described service identification mates with the default service identification of described service configuration information, described middleware copies described message; Described middleware forwards described message according to described several destination addresses.
Below in conjunction with specific embodiment, realization of the present invention is described in detail:
Embodiment mono-
Fig. 1 shows the realization flow of the method for message copy that the embodiment of the present invention one provides and forwarding, and details are as follows:
In step S101, middleware receives the message that client sends.
In the present embodiment, described client is the computer that operation system has been installed, and refers in particular to the computer that security, financial industry operation system have been installed.Described message is the message of miscellaneous service agreement mutual between the operation system of two clients.Middleware receives the message that client sends.
Preferably, before this step S101, also comprise and from configuration file, read configuration information, described middleware is resolved described configuration information, obtains wherein effectively service configuration information.
Wherein, configuration file is that recording messages copies the text that forwards configuration information, and wherein, the quantity of configuration information can arbitrary disposition.Described service configuration information is the information that middleware that user arranges can be processed business protocol type, article one, service configuration information is corresponding with a kind of service protocol, in same configuration file, also can there be many service configuration informations corresponding with a kind of service protocol, service configuration information comprises service fields, default service identification and several destination addresses, service fields is the field of identification service kind, default service identification is the conditional expression that the value of identification service kind or identification service copy forwarding, destination address is the address of the object middleware of message forwarding, service fields in each service configuration information, default service identification and corresponding destination address all can on-the-fly modify.Middleware reads configuration information from configuration file, resolve form wherein accurately not with the effective traffic configuration information of resolving service configuration information and repeating, if configuration information service fields repeats, middleware is only resolved once this service fields, can't repeated resolution, thus the efficiency of resolving improved.Preferably, described service configuration information is explained with expression formula form, user can configure certain or some service fields according to practical business and meet what rule, its expression formula comprises and adds+, subtract-, take advantage of *, except/or ||, with & &, equate==, common operator and the User Defined operator such as non-unequal to, as certain service configuration information is explained with expression formula@funcid==400400, wherein funcid is service fields, and 400400 is default service identification.For the configuration of service configuration information, can be configured by user flexibility, the increase of new service protocol or minimizing, be completely compatible for user, without any upgrade cost.
In step S102, if configured service configuration information, described middleware is resolved the service identification that described message is carried, and described service configuration information comprises service fields, default service identification and several destination addresses.
In the present embodiment, if configured service configuration information in the configuration file of middleware, described middleware is resolved the service identification that described message is carried, and wherein said service configuration information comprises service fields, default service identification and several destination addresses.Concrete, resolve and adopt Inverse Polish notation algorithm, if configured following service configuration information in configuration file :@funcid==400400, if carried service identification 400400 in message, thinks that this middleware can process described message according to this service configuration information.
As a preferred version, before this step, also comprise:
In described middleware judges configuration file, whether configured described service configuration information, if not, described middleware is not processed described message.
In step S103, if described service identification mates with the default service identification of described service configuration information, described middleware copies described message.
In the present embodiment, after resolving the service identification that described message carries, middleware need to judge whether service identification described in message mates with default service identification described in configuration service information, if both do not mate, do not copy or forward described message, if both couplings, middleware copies this message according to service configuration information.
In step S104, described middleware forwards described message according to described several destination addresses.
In the present embodiment, middleware forwards described message to operation system corresponding to destination address according to several destination addresses.Realized one to one, the message of one-to-many forwards.Preferably, after this step, can also record described several destination addresses by described middleware, so that forwarding messages record can be looked into.
As a preferred version, while having the message of new business agreement to forward if also comprise, described middleware configures service configuration information corresponding to described new business agreement in configuration file.
Concrete, middleware is without restriction to the service protocol of message, while having the message of new business agreement to forward, only need to revise configuration file, and due to service protocol and platform independence, client does not need to revise, and there is no upgrade cost.
The present embodiment, by plug-in unit mode, support multiple targets of the message of multiple business agreement to copy and forward, simultaneously user can free configuration service protocol type and destination, not limit service agreement, do not need modification and the cooperation of client yet, for user, be completely compatible, without any upgrade cost.
Embodiment bis-
Fig. 2 shows the realization flow of the method for message copy that the embodiment of the present invention two provides and forwarding, and being applicable to same service protocol in configuration file has the situation of many service configuration informations, and details are as follows:
In step S201, receive the message that client sends.
In step S202, if configured service configuration information, resolve the service identification of the corresponding business of service fields of service configuration information described in described message, described service configuration information comprises service fields, default service identification and several destination addresses.
In step S203, if described service identification mates with the default service identification of described service configuration information, copy described message.
In the present embodiment, the implementation of the step S101~S103 in the execution of step S201~S203 and above-described embodiment one is similar, and details are referring to the description of above-described embodiment one.
In step S204, judge whether also to have configured other service configuration informations, if so, perform step S203, if not, execution step S205
In step S205, according to several destination addresses, forward described message.
In the present embodiment, realized complete to message copy after, then forwarding messages.
The present embodiment, by plug-in unit mode, support multiple targets of the message of multiple business agreement to copy and forward, simultaneously user can free configuration service protocol type and destination, not limit service agreement, do not need modification and the cooperation of client yet, for user, be completely compatible, without any upgrade cost.
Embodiment tri-
Fig. 3 shows the concrete structure block diagram of the middleware of message copy that the embodiment of the present invention three provides and forwarding, for convenience of explanation, only shows the part relevant to the embodiment of the present invention.In the present embodiment, the middleware of this message copy and forwarding comprises: message sink unit 31, message parse unit 32, message copy unit 33, Dispatch Unit 34, the first judging unit 35, the second interpretation unit 36, dispensing unit 37 and configuration reading unit 38.
Wherein, message sink unit 31, the message sending for receiving client;
Message parse unit 32, if for having configured service configuration information, resolve the service identification that described message is carried, described service configuration information comprises service fields, default service identification and several destination addresses;
Message copy unit 33, if mate with the default service identification of described service configuration information for described service identification, copies described message;
Dispatch Unit 34, for forwarding described message according to described several destination addresses.
Further, described middleware also comprises:
The first judging unit 35, for judging whether configuration file has configured described service configuration information, if not, does not process described message.
Further, described middleware also comprises:
The second interpretation unit 36, has also configured other service configuration informations for judging whether, if if so, described service identification mates with the default service identification of described service configuration information, copies described message.
Further, described middleware also comprises:
Dispensing unit 37 if when having the message of new business agreement to forward, configures service configuration information corresponding to described new business agreement in configuration file.
Further, described middleware also comprises:
Configuration reading unit 38, for reading configuration information from configuration file, resolves described configuration information, obtains wherein effectively service configuration information.
The message copy that the embodiment of the present invention provides and the middleware of forwarding can be applied in the embodiment of the method one and two of aforementioned correspondence, and details, referring to the description of above-described embodiment one and two, do not repeat them here.
It should be noted that in said system embodiment, included unit is just divided according to function logic, but is not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional unit also, just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In addition, one of ordinary skill in the art will appreciate that all or part of step realizing in the various embodiments described above method is can carry out the hardware that instruction is relevant by program to complete, corresponding program can be stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a method for message copy and forwarding, is characterized in that, described method comprises:
Middleware receives the message that client sends;
If configured service configuration information, described middleware is resolved the service identification that described message is carried, and described service configuration information comprises service fields, default service identification and several destination addresses;
If described service identification mates with the default service identification of described service configuration information, described middleware copies described message;
Described middleware forwards described message according to described several destination addresses.
2. the method for claim 1, is characterized in that, if at the described service configuration information that configured, described middleware also comprises before resolving the service identification that described message carries:
In described middleware judges configuration file, whether configure described service configuration information, if not, do not processed described message.
3. method as claimed in claim 1 or 2, is characterized in that, described middleware also comprises after forwarding described message according to described several destination addresses:
Whether described middleware judges has also configured other service configuration informations, if if so, described service identification mates with the default service identification of described service configuration information, copies described message.
4. the method for claim 1, is characterized in that, described method also comprises:
If while having the message of new business agreement to forward, described middleware configures service configuration information corresponding to described new business agreement in configuration file.
5. method as claimed in claim 4, is characterized in that, before the message that described reception client sends, also comprises:
From configuration file, read configuration information, described middleware is resolved described configuration information, obtains wherein effectively service configuration information.
6. a middleware for message copy and forwarding, is characterized in that, described middleware comprises:
Message sink unit, the message sending for receiving client;
Message parse unit, if for having configured service configuration information, resolve the service identification that described message is carried, described service configuration information comprises service fields, default service identification and several destination addresses;
Message copy unit, if mate with the default service identification of described service configuration information for described service identification, copies described message;
Dispatch Unit, for forwarding described message according to described several destination addresses.
7. middleware as claimed in claim 6, is characterized in that, described middleware also comprises:
The first judging unit, for judging whether configuration file has configured described service configuration information, if not, does not process described message.
8. the middleware as described in claim 6 or 7, is characterized in that, described middleware also comprises:
The second interpretation unit, has also configured other service configuration informations for judging whether, if if so, described service identification mates with the default service identification of described service configuration information, copies described message.
9. middleware as claimed in claim 6, is characterized in that, described middleware also comprises:
Dispensing unit if when having the message of new business agreement to forward, configures service configuration information corresponding to described new business agreement in configuration file.
10. middleware as claimed in claim 9, is characterized in that, described middleware also comprises:
Configuration reading unit, for reading configuration information from configuration file, resolves described configuration information, obtains wherein effectively service configuration information.
CN201310713530.6A 2013-12-20 2013-12-20 Message middleware multi-target routing and copying technology based on rule Pending CN103747035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310713530.6A CN103747035A (en) 2013-12-20 2013-12-20 Message middleware multi-target routing and copying technology based on rule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310713530.6A CN103747035A (en) 2013-12-20 2013-12-20 Message middleware multi-target routing and copying technology based on rule

Publications (1)

Publication Number Publication Date
CN103747035A true CN103747035A (en) 2014-04-23

Family

ID=50504022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310713530.6A Pending CN103747035A (en) 2013-12-20 2013-12-20 Message middleware multi-target routing and copying technology based on rule

Country Status (1)

Country Link
CN (1) CN103747035A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654386A (en) * 2016-01-07 2016-06-08 深圳市金证科技股份有限公司 ID information automatic acquisition method and device
CN107368334A (en) * 2017-07-24 2017-11-21 北京奇艺世纪科技有限公司 A kind of business plug-in unit interactive system and method
CN111708568A (en) * 2020-05-06 2020-09-25 福建天泉教育科技有限公司 Component development decoupling method and terminal
CN113542122A (en) * 2020-04-16 2021-10-22 中移物联网有限公司 Internet of things equipment data forwarding method and system
CN113641507A (en) * 2020-04-27 2021-11-12 北京京东振世信息技术有限公司 Message middleware access method, message processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025593A (en) * 2009-09-21 2011-04-20 中国移动通信集团公司 Distributed user access system and method
CN102497425A (en) * 2011-12-12 2012-06-13 山东电力研究院 Malicious software detecting system based on transparent proxy and method thereof
CN102510341A (en) * 2011-10-26 2012-06-20 国家广播电影电视总局广播科学研究院 Dataflow processing method and system as well as control node unit
CN102523069A (en) * 2011-11-21 2012-06-27 天津中兴软件有限责任公司 Method for sending message
CN103095479A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Method and device of business configuration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025593A (en) * 2009-09-21 2011-04-20 中国移动通信集团公司 Distributed user access system and method
CN102510341A (en) * 2011-10-26 2012-06-20 国家广播电影电视总局广播科学研究院 Dataflow processing method and system as well as control node unit
CN103095479A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Method and device of business configuration
CN102523069A (en) * 2011-11-21 2012-06-27 天津中兴软件有限责任公司 Method for sending message
CN102497425A (en) * 2011-12-12 2012-06-13 山东电力研究院 Malicious software detecting system based on transparent proxy and method thereof

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654386A (en) * 2016-01-07 2016-06-08 深圳市金证科技股份有限公司 ID information automatic acquisition method and device
CN107368334A (en) * 2017-07-24 2017-11-21 北京奇艺世纪科技有限公司 A kind of business plug-in unit interactive system and method
CN107368334B (en) * 2017-07-24 2020-08-28 北京奇艺世纪科技有限公司 Business plug-in interaction system and method
CN113542122A (en) * 2020-04-16 2021-10-22 中移物联网有限公司 Internet of things equipment data forwarding method and system
CN113641507A (en) * 2020-04-27 2021-11-12 北京京东振世信息技术有限公司 Message middleware access method, message processing method and device
CN111708568A (en) * 2020-05-06 2020-09-25 福建天泉教育科技有限公司 Component development decoupling method and terminal
CN111708568B (en) * 2020-05-06 2023-07-07 福建天泉教育科技有限公司 Modularized development decoupling method and terminal

Similar Documents

Publication Publication Date Title
CN103747035A (en) Message middleware multi-target routing and copying technology based on rule
US20150215405A1 (en) Methods of managing and storing distributed files based on information-centric network
CN101841520B (en) Domain name system and information processing method and device for domain name system
US9081818B2 (en) SAS fabric discovery
US20100250646A1 (en) Mechanism for geo distributing application data
CN102843426B (en) Based on Web cache resources shared system and the method for intelligent father node
EP3076307A1 (en) Method and device for responding to a request, and distributed file system
CN111143093B (en) Asynchronous message distributed processing method, device, equipment and storage medium
CN109032803B (en) Data processing method and device and client
US20140025713A1 (en) Unified file and object data storage
CN103761141A (en) Method and device for realizing message queue
CN103544077A (en) Data processing method and device and shared memory device
US9059883B2 (en) Method and apparatus for facilitating content distribution
US8682954B2 (en) Replication in a network environment
CN102012899A (en) Method, system and equipment for updating data
US20170192964A1 (en) Distributed file system and operating method of the same
CN107277028B (en) Method, device, equipment and storage medium for transmitting chat emoticons among applications
CN102142032A (en) Method and system for reading and writing data of distributed file system
CN102316043A (en) Port virtualization method, switch and communication system
CN109547243B (en) DDS-based cross-network-segment communication method
US20130232124A1 (en) Deduplicating a file system
CN109145053B (en) Data processing method and device, client and server
CN105187517A (en) Metadata clustering method and metadata cluster
CN110365587B (en) Inter-device communication method, device and storage medium
JP6640858B2 (en) Method and apparatus for processing a transaction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140423

RJ01 Rejection of invention patent application after publication