CN110225118A - Realize the message-oriented middleware auxiliary system and message transfer service that message is once sent to - Google Patents
Realize the message-oriented middleware auxiliary system and message transfer service that message is once sent to Download PDFInfo
- Publication number
- CN110225118A CN110225118A CN201910508969.2A CN201910508969A CN110225118A CN 110225118 A CN110225118 A CN 110225118A CN 201910508969 A CN201910508969 A CN 201910508969A CN 110225118 A CN110225118 A CN 110225118A
- Authority
- CN
- China
- Prior art keywords
- message
- oriented middleware
- module
- add
- unique code
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/562—Brokering proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of message-oriented middleware auxiliary systems and message transfer service for realizing that message is once sent to, and belong to business transmission field, and technical problems to be solved are how to realize once being sent to for message;Its structure includes: that message sends add-on module, the message sends add-on module and is used for by explaining specific adaptors to match message-oriented middleware, in the properties object for generating unique code when the client program of calling message-oriented middleware sends message and injecting message for unique yard;Message sink add-on module, the message sink add-on module is used for by explaining specific adaptors to match message-oriented middleware, for designated treatment logic when with memory type KV database connection failure, and for the unique code of duplicate removal before receiving message in the clinet program for calling message-oriented middleware.The system includes message-oriented middleware, operation system auxiliary system and memory type KV database.
Description
Technical field
The present invention relates to business to transmit field, specifically a kind of message-oriented middleware auxiliary realizing message and being once sent to
System and message transfer service.
Background technique
At present in internet area, there are many high performance message-oriented middlewares, purposes is the network friendship in high concurrent
In easy environment, the asynchronous primary responsibility being sent to of message is undertaken, in order to realize higher concurrent capability, the target of high-performance middleware
It is " guaranteeing that message is sent at least once " this semanteme, therefore does not have product can be realized in message-oriented middleware of increasing income and " guarantee only
Once it is sent to " this semanteme.
How to realize once being sent to for message, is the technical issues that need to address.
Summary of the invention
Technical assignment of the invention is against the above deficiency, it is auxiliary to provide a kind of message-oriented middleware for realizing that message is once sent to
Auxiliary system and message transfer service, to solve the problems, such as how to realize once being sent to for message.
In a first aspect, the present invention provides the message-oriented middleware auxiliary system for realizing that message is once sent to, comprising:
Message sends add-on module, and the message sends add-on module and is used for by explaining specific adaptors to match message
Middleware generates unique code when for sending message in the client program for calling message-oriented middleware and unique code is injected message
Properties object in;
Message sink add-on module, the message sink add-on module are used for by explaining specific adaptors to match message
Middleware, for designated treatment logic when with memory type KV database connection failure, and for calling message-oriented middleware
Clinet program receives the unique code of duplicate removal before message.
It is used to lead to when the client program for calling message-oriented middleware sends message preferably, message sends add-on module
The mode for crossing tangent plane programming generates unique code.
Preferably, unique code be by the way of the generation of UUID common-mode+combinational code of timestamp composition, when described
Between stamp be grade timestamp.
Preferably, message sink add-on module is used for before the client program for calling message-oriented middleware sends message
The unique code of duplicate removal is injected by way of tangent plane programming.
Preferably, message sink add-on module is for as follows in the client program for calling message-oriented middleware
The unique code of duplicate removal is injected by way of tangent plane programming before sending message:
Unique code is taken out from properties object;
Hold unique code, attempt in the unique code of memory type KV database purchase, and receives return code;
If return code is existing, interrupt processing process, if return code is to store successfully, the message enters
Business flow processing, if return code is miscommunication, according to specified when with memory type KV database connection failure
Handle logical process message.
Preferably, message sink add-on module by explaining for being referred to when with memory type KV database connection failure
Surely logic, and designated treatment logic are handled are as follows:
When fail_back, the fail_back expression encounter Communications failure, message in the message between block in part, until
Restore communication;
When fail_over, the fail_over expression encounter Communications failure, ignore duplicate removal logic, message is directly thrown to industry
Business processing.
Preferably, when message sends accessory module by explaining specific adaptors to match message-oriented middleware, adapter
At least support rocketmq and kafka;
When message sink accessory module is by explaining specific adaptors to match message-oriented middleware, adapter is at least supported
Rocketmq and kafka.
Second aspect, the present invention provide the message transfer service for realizing that message is once sent to, comprising:
Message-oriented middleware, the message-oriented middleware are open source message-oriented middleware;
Operation system, the operation system at least two pass through message-oriented middleware between operation system and dock;
Auxiliary system, the auxiliary system are in the message being once sent to such as the described in any item realization message of first aspect
Between part auxiliary system;
Memory type KV database, the memory type database are connect with message sink add-on module.
Preferably, operation system of the be set forth in operation system for Java exploitation, and 1.7 or more compiled version.
The message-oriented middleware auxiliary system and message transfer service that realization message of the invention is once sent to have following excellent
Point: the case where not increasing software investment, realizing idempotent duplicate removal when message transmission between operation system, eliminates software investment
Cost.
Detailed description of the invention
It, below will be to required in being described in embodiment in order to more clearly illustrate the technical solution in the embodiment of the present invention
The attached drawing used is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings
His attached drawing.
The following further describes the present invention with reference to the drawings.
Attached drawing 1 is the work block diagram for the message-oriented middleware auxiliary system that embodiment 1 realizes that message is once sent to.
Specific embodiment
The present invention will be further explained below with reference to the attached drawings and specific examples, so that those skilled in the art can be with
It more fully understands the present invention and can be practiced, but illustrated embodiment is not as a limitation of the invention, the case where not conflicting
Under, the technical characteristic in the embodiment of the present invention and embodiment can be combined with each other.
It is to be appreciated that in the description of the embodiment of the present invention, the vocabulary such as " first ", " second " are only used for distinguishing and retouch
The purpose stated, is not understood to indicate or imply relative importance, can not be interpreted as indication or suggestion sequence.In the present invention
" multiple " in embodiment, refer to two or more.
The embodiment of the present invention provides the message-oriented middleware auxiliary system and message transfer service for realizing that message is once sent to, and uses
The technical issues of being once sent to of message how is realized in solution.
Embodiment 1:
The message-oriented middleware auxiliary system that realization message of the invention is once sent to, including message send add-on module and disappear
Breath receives add-on module, message send add-on module and message sink add-on module assistance messages Middleware implementation operation system it
Between information once be sent to.
Message is sent add-on module and is developed using note mode, by explaining specific adaptors to match among message
Part, adapter at least support rocketmq and kafka.
Message sends add-on module and is used to generate unique code when the client program for calling message-oriented middleware sends message
And unique yard is injected in the properties object of message.Unique code is used to differentiate current message and other message,
In the present embodiment unique code be using UUID common-mode generation by the way of+timestamp composition combinational code, timestamp is millimeter
Grade timestamp also includes other modes generation in practical applications under high concurrent scene, makes a piece of news difference and other
The coding of message.
Message sink add-on module is developed using note mode, by explaining specific adaptors to match among message
Part, adapter at least support rocketmq and kafka.
Message sink add-on module should with designated treatment logic when memory type KV database connection failure, and in note
Specified, processing mode includes the following two kinds mode:
When fail_back, the fail_back expression encounter Communications failure, message in the message between block in part, until
Restore communication;
When fail_over, the fail_over expression encounter Communications failure, ignore duplicate removal logic, message is directly thrown to industry
Business processing.
Message sink add-on module passes through tangent plane programming before the client program for calling message-oriented middleware sends message
Mode inject the unique code message of duplicate removal, the unique code of duplicate removal is achieved by the steps of:
Unique code is taken out from properties object;
Hold unique code, attempt in the unique code of memory type KV database purchase, and receives return code;
If return code be it is existing, illustrate this message repeat, interrupt processing process, if return code be storage at
Function illustrates that this message is not consumed, and message enters business flow processing, if return code is miscommunication, illustrates memory type
KV database is unavailable, according to specified processing logical process message when with memory type KV database connection failure.
Embodiment 2:
The message transfer service that realization message of the invention is once sent to, including message-oriented middleware, operation system, auxiliary system
System, memory type KV database.
Message-oriented middleware is open source message-oriented middleware.
Operation system totally two, respectively the first operation system and the second operation system, the first operation system are used as transmission
End sends add-on module configured with message, and the second operation system is used as receiving end, configured with message sink add-on module, first
Operation system and the second operation system are docked by message-oriented middleware, and message sink add-on module and memory type KV database connect
It connects.
The operation system that above-mentioned two operation system is developed for Java, and 1.7 or more compiled version.
In practical application, it can be multiple that operation system, which is not limited to two, and message sends add-on module and is used for as hair
The operation system of sending end, message sink add-on module is for the operation system as receiving end, if an operation system conduct
Transmitting terminal is used as receiving end simultaneously, then sends add-on module and message sink additional mode configured with message simultaneously in the operation system
Block.
The message transfer service transmission mode are as follows:
Add-on module is sent by explaining specific adaptors type by message, is matched with message-oriented middleware;
When sending message by the client program that message sends add-on module calling message-oriented middleware, tangent plane programming is utilized
Mode inject unique code and generate logic, unique code is injected into the properties object of message after generating unique code, should
Unique code is by the way of general generating mode+timestamp (Millisecond) combination of UUID;
Type of adapter is specified in note by message sink add-on module, to match with message-oriented middleware;
Pass through the specified processing logic when connecting with memory type KV database of message sink add-on module, processing logic point
Not are as follows: fail_back, expression is when encountering connection failure, message in the message between block in part, until restoring to connect, fail_
Over, expression is when encountering Communications failure, ignores duplicate removal logic, and message is directly thrown to business processing;
When the client of message-oriented middleware receives message, the side using tangent plane programming is connect by message sink add-on module
Formula injects duplicate removal logic, and duplicate removal logic is as follows:
Unique code is taken out from properties object;
Hold unique code, attempt in the unique code of memory type KV database purchase, and receives return code;
If return code is existing, interrupt processing process, if return code is to store successfully, the message enters
Business flow processing, if return code is miscommunication, according to specified when with memory type KV database connection failure
Handle logical process message.
Embodiment described above is only to absolutely prove preferred embodiment that is of the invention and being lifted, protection model of the invention
It encloses without being limited thereto.Those skilled in the art's made equivalent substitute or transformation on the basis of the present invention, in the present invention
Protection scope within.Protection scope of the present invention is subject to claims.
Claims (9)
1. realizing the message-oriented middleware auxiliary system that message is once sent to, characterized by comprising:
Message sends add-on module, and the message sends add-on module and is used for by explaining specific adaptors to match among message
Part generates unique code when for sending message in the client program for calling message-oriented middleware and injects message for unique yard
In properties object;
Message sink add-on module, the message sink add-on module are used for by explaining specific adaptors to match among message
Part, for designated treatment logic when with memory type KV database connection failure, and for calling message-oriented middleware
Clinet program receives the unique code of duplicate removal before message.
2. the message-oriented middleware auxiliary system according to claim 1 realizing message and being once sent to, it is characterised in that message
Add-on module is sent to be used to generate by way of tangent plane programming when the client program for calling message-oriented middleware sends message
Unique code.
3. the message-oriented middleware auxiliary system according to claim 2 realizing message and being once sent to, it is characterised in that unique
Code for using UUID common-mode generation by the way of+timestamp composition combinational code, the timestamp be grade timestamp.
4. the message-oriented middleware auxiliary system according to claim 1 realizing message and being once sent to, it is characterised in that message
Add-on module is received to be used to infuse by way of tangent plane programming before the client program for calling message-oriented middleware sends message
Enter the unique code of duplicate removal.
5. the message-oriented middleware auxiliary system according to claim 4 realizing message and being once sent to, it is characterised in that message
Add-on module is received for passing through section before the client program for calling message-oriented middleware sends message as follows
The mode of programming injects the unique code of duplicate removal:
Unique code is taken out from properties object;
Hold unique code, attempt in the unique code of memory type KV database purchase, and receives return code;
If return code is existing, interrupt processing process, if return code is to store successfully, the message enters business
Flow processing, if return code is miscommunication, according to specified processing when with memory type KV database connection failure
Logical process message.
6. the message-oriented middleware auxiliary system according to claim 1 realizing message and being once sent to, it is characterised in that message
Receive add-on module for when with memory type KV database connection failure by explaining designated treatment logic, and designated treatment
Logic are as follows:
When fail_back, the fail_back expression encounter Communications failure, message in the message between block in part, until restoring
Communication;
Fail_over ignores duplicate removal logic, message is directly thrown at business when the fail_over expression encounters Communications failure
Reason.
7. the message-oriented middleware auxiliary system according to claim 1 realizing message and being once sent to, it is characterised in that message
Send accessory module by explain specific adaptors to match message-oriented middleware when, adapter at least supports rocketmq with
kafka;
When message sink accessory module is by explaining specific adaptors to match message-oriented middleware, adapter is at least supported
Rocketmq and kafka.
8. realizing the message transfer service that message is once sent to, characterized by comprising:
Message-oriented middleware, the message-oriented middleware are open source message-oriented middleware;
Operation system, the operation system at least two pass through message-oriented middleware between operation system and dock;
Auxiliary system, the auxiliary system are in the message being once sent to such as the described in any item realization message of claim 1-7
Between part auxiliary system;
Memory type KV database, the memory type database are connect with message sink add-on module.
9. the message transfer service according to claim 8 realizing message and being once sent to, it is characterised in that be set forth in business
The operation system that system is developed for Java, and 1.7 or more compiled version.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910508969.2A CN110225118A (en) | 2019-06-13 | 2019-06-13 | Realize the message-oriented middleware auxiliary system and message transfer service that message is once sent to |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910508969.2A CN110225118A (en) | 2019-06-13 | 2019-06-13 | Realize the message-oriented middleware auxiliary system and message transfer service that message is once sent to |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110225118A true CN110225118A (en) | 2019-09-10 |
Family
ID=67816819
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910508969.2A Pending CN110225118A (en) | 2019-06-13 | 2019-06-13 | Realize the message-oriented middleware auxiliary system and message transfer service that message is once sent to |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110225118A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110851413A (en) * | 2019-11-08 | 2020-02-28 | 深圳市元征科技股份有限公司 | Data synchronization method and device, electronic equipment and storage medium |
CN111611094A (en) * | 2020-05-26 | 2020-09-01 | 山东汇贸电子口岸有限公司 | Monitoring and managing method for abnormal MQ information |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533087A (en) * | 2013-10-31 | 2014-01-22 | 乐视网信息技术(北京)股份有限公司 | Cloud service platform middleware and cloud uploading method |
CN104092717A (en) * | 2013-12-13 | 2014-10-08 | 深圳市腾讯计算机系统有限公司 | Message processing method and system, message destination end device and distributed message system |
CN105812405A (en) * | 2014-12-29 | 2016-07-27 | 阿里巴巴集团控股有限公司 | Method, device and system for processing messages |
EP3206345A2 (en) * | 2016-02-12 | 2017-08-16 | Brocade Communications Systems, Inc. | Traffic deduplication in a visibility network |
CN107846447A (en) * | 2017-09-21 | 2018-03-27 | 烽火通信科技股份有限公司 | A kind of method of the home terminal access message-oriented middleware based on MQTT agreements |
CN108769099A (en) * | 2018-04-02 | 2018-11-06 | 武汉斗鱼网络科技有限公司 | A kind of implementation method of the message duplicate removal of message-oriented middleware |
US20180367632A1 (en) * | 2017-06-15 | 2018-12-20 | Electronics And Telecommunications Research Institute | Apparatus for providing cloud service using cloud service brokerage based on multiple clouds and method thereof |
CN109379432A (en) * | 2018-10-31 | 2019-02-22 | 腾讯科技(深圳)有限公司 | Data processing method, device, server and computer readable storage medium |
-
2019
- 2019-06-13 CN CN201910508969.2A patent/CN110225118A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533087A (en) * | 2013-10-31 | 2014-01-22 | 乐视网信息技术(北京)股份有限公司 | Cloud service platform middleware and cloud uploading method |
CN104092717A (en) * | 2013-12-13 | 2014-10-08 | 深圳市腾讯计算机系统有限公司 | Message processing method and system, message destination end device and distributed message system |
CN105812405A (en) * | 2014-12-29 | 2016-07-27 | 阿里巴巴集团控股有限公司 | Method, device and system for processing messages |
EP3206345A2 (en) * | 2016-02-12 | 2017-08-16 | Brocade Communications Systems, Inc. | Traffic deduplication in a visibility network |
US20180367632A1 (en) * | 2017-06-15 | 2018-12-20 | Electronics And Telecommunications Research Institute | Apparatus for providing cloud service using cloud service brokerage based on multiple clouds and method thereof |
CN107846447A (en) * | 2017-09-21 | 2018-03-27 | 烽火通信科技股份有限公司 | A kind of method of the home terminal access message-oriented middleware based on MQTT agreements |
CN108769099A (en) * | 2018-04-02 | 2018-11-06 | 武汉斗鱼网络科技有限公司 | A kind of implementation method of the message duplicate removal of message-oriented middleware |
CN109379432A (en) * | 2018-10-31 | 2019-02-22 | 腾讯科技(深圳)有限公司 | Data processing method, device, server and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
没有不忧伤的故事: "rocketmq-9消息重试,消息幂等去重,消息模式", 《CSDN》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110851413A (en) * | 2019-11-08 | 2020-02-28 | 深圳市元征科技股份有限公司 | Data synchronization method and device, electronic equipment and storage medium |
CN111611094A (en) * | 2020-05-26 | 2020-09-01 | 山东汇贸电子口岸有限公司 | Monitoring and managing method for abnormal MQ information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107147620B (en) | Message interaction processing method, client and server | |
CN106452841A (en) | Method for using transmission service quality in robot operating system | |
CN102006245B (en) | Date exchanging and sharing platform | |
CN110225118A (en) | Realize the message-oriented middleware auxiliary system and message transfer service that message is once sent to | |
CN104980450B (en) | A kind of message delivery method and system and message processing device | |
CN110968006A (en) | RPA robot control system and method based on mail system | |
CN102662778A (en) | Callback response method of inter-application communication on online application platform, application and online application platform | |
CN101605301A (en) | A kind of group system and request message distribution method that carries out the multinode transaction | |
CN212785977U (en) | Car light control module | |
CN111200653B (en) | Multi-platform communication method, multi-platform communication device and intermediate server | |
CN108429665A (en) | A kind of method of concurrent communication transmission data | |
CN105515947A (en) | Method, server and system for information intercommunication of heterogeneous terminal based on XMPP (Extensible Messaging and Presence Protocol) | |
CN113204436B (en) | Message processing method, device, equipment and computer readable storage medium | |
CN101471927B (en) | Method and device for processing document transmission and document transmission system | |
KR102363539B1 (en) | Communication module for electric vehicle charging system based on open charge point protocol and operation method of that | |
CN104243358A (en) | Loading method and device for PE software in VCF system | |
CN109582481B (en) | Transmission method, device and equipment of call result and storage medium | |
CN101860544A (en) | Transmitting system and method of session initiation protocol message | |
CN102646049B (en) | A kind of assembly synergistic method and system | |
CN112866383A (en) | Method and device for disconnecting connection | |
CN115174309B (en) | Block chain communication method, communication device and computer readable storage medium | |
CN116260859B (en) | Data configuration system | |
CN111522769A (en) | Multithreading SPI communication data transmission method | |
CN110377022B (en) | Control method and device for automatic guided vehicle | |
CN109600452A (en) | Server cluster, information push method and associated server |
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: 20190910 |