CN106254445A - Message method and service end - Google Patents

Message method and service end Download PDF

Info

Publication number
CN106254445A
CN106254445A CN201610616151.9A CN201610616151A CN106254445A CN 106254445 A CN106254445 A CN 106254445A CN 201610616151 A CN201610616151 A CN 201610616151A CN 106254445 A CN106254445 A CN 106254445A
Authority
CN
China
Prior art keywords
message
service
transmitting terminal
described service
service message
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
CN201610616151.9A
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.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201610616151.9A priority Critical patent/CN106254445A/en
Publication of CN106254445A publication Critical patent/CN106254445A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services

Abstract

The invention discloses a kind of message method, described message method is applied to message-oriented middleware, described message-oriented middleware is built-in with service end, it is connected with the transmitting terminal accessing described message-oriented middleware and receiving terminal respectively, the method includes: described service end receives the service message that described transmitting terminal sends, and stores described service message;Described service message is sent to described receiving terminal, processes described service message for described receiving terminal, after described receiving terminal has processed described service message, return the first confirmation message;After receiving the described first confirmation message that described receiving terminal returns, delete the described service message stored.The invention also discloses a kind of service end.This invention ensures that the receiving terminal of message-oriented middleware product can be successfully received the service message that described transmitting terminal sends, and be further ensured that described receiving terminal can be successfully processed described service message.

Description

Message method and service end
Technical field
The present invention relates to network communication technology field, particularly relate to a kind of message method and service end.
Background technology
Message-oriented middleware is a kind of middleware Technology being made up of message transfer mechanism or SMS queue's pattern, utilizes efficiently Message passing mechanism carries out platform-independent data exchange reliably, and carries out the collection of distributed system based on data communication Become.In general, message-oriented middleware is not required for system and possesses a reliable lower transport layer, but by the shape with message Formula transmitting-receiving application data connects the application program running in different system.Message-oriented middleware mainly has a following characteristics: 1) distributed;2) reliability;3) asynchronous;4) loose coupling;5) event-driven.For message-oriented middleware, reliability is several In feature very important one.
In existing technology, most message-oriented middleware product only solves the reliability of one way message, only from transmission The angle of end and service end goes to consider, the angle from transmitting terminal to receiving terminal does not goes to consider, causes ensureing receiving terminal energy Enough receive the message that transmitting terminal sends.
Summary of the invention
Present invention is primarily targeted at a kind of message method of offer and service end, it is intended to solve in existing message Between part product cannot ensure the technical problem of service message that receiving terminal is able to receive that transmitting terminal sends.
For achieving the above object, a kind of message method that the present invention provides, described message method is applied to disappear Breath middleware, is built-in with service end in described message-oriented middleware, respectively with transmitting terminal and the reception accessing described message-oriented middleware End connects, and described message method includes:
Described service end receives the service message that described transmitting terminal sends, and stores described service message;
Described service message is sent to described receiving terminal, processes described service message for described receiving terminal, when described After receiving terminal has processed described service message, return the first confirmation message;
After receiving the described first confirmation message that described receiving terminal returns, delete the described service message stored.
Preferably, the service message that described receiving end/sending end sends, after storing described service message step, also include:
Transmission the second confirmation message is to described transmitting terminal, when receiving described second confirmation message for described transmitting terminal, Delete described service message;
Wherein, when described transmitting terminal does not receives described second confirmation message in Preset Time, described transmitting terminal weight The described service message of new transmission is to described service end.
Preferably, described transmission second confirms that message, to described transmitting terminal, receives described second for described transmitting terminal When confirming message, the step deleting described service message includes:
Described service message is synchronized in described service end at least two from node by the host node of described service end;
When receive arbitrary from node send the 3rd confirmation message time, send second confirmation message to described transmitting terminal, Receive described second for described transmitting terminal and confirm message, delete described service message.
Preferably, described service end receives the service message that described transmitting terminal sends, and stores the step of described service message Including:
Described service end receives the service message that described transmitting terminal sends, and detects the integrity of described service message;
If described service message is complete, then store described service message.
Preferably, described service end receives the service message that described transmitting terminal sends, and detects the complete of described service message After the step of whole property, also include:
If described service message is imperfect, then deletes incomplete service message, and do not send the second confirmation message to institute State transmitting terminal, so that described transmitting terminal resends described service message to described service end.
Additionally, for achieving the above object, the present invention also provides for a kind of service end, and described service end is built in message-oriented middleware In, it being connected with the transmitting terminal accessing described message-oriented middleware and receiving terminal respectively, described service end includes:
Memory module, the service message sent for receiving end/sending end, store described service message;
Sending module, for described service message is sent to described receiving terminal, processes described industry for described receiving terminal Business message, after described receiving terminal has processed described service message, returns the first confirmation message;
Removing module, for after receiving the described first confirmation message that described receiving terminal returns, deletion is stored Described service message.
Preferably, described sending module, it is additionally operable to send the second confirmation message to described transmitting terminal, for described transmitting terminal When receiving described second confirmation message, delete described service message;
Wherein, when described transmitting terminal does not receives described second confirmation message in Preset Time, described transmitting terminal weight The described service message of new transmission is to described service end.
Preferably, described sending module includes:
Lock unit, for being synchronized in described service end at least two from node by described service message;
Transmitting element, for when receive arbitrary from node send the 3rd confirmation message time, send second confirmation message To described transmitting terminal, receive described second for described transmitting terminal and confirm message, delete described service message.
Preferably, described memory module includes:
Detector unit, for receiving the service message that described transmitting terminal sends, detects the integrity of described service message;
Memory element, if complete for described service message, then stores described service message.
Preferably, described memory module also includes:
Delete unit, if imperfect for described service message, then delete incomplete service message, and do not send second Confirmation message gives described transmitting terminal, so that described transmitting terminal resends described service message to described service end.
The present invention is by accessing described transmitting terminal and described receiving terminal in described message-oriented middleware, and by described transmitting terminal It is connected with the service end in described message-oriented middleware with described receiving terminal, when described service end receives the industry that described transmitting terminal sends During business message, described service end stores described service message, and described service message is sent to described receiving terminal, for described After receiving terminal has processed described service message, return the first confirmation message;Return when described service end receives described receiving terminal Described first confirm after message, delete the described service message stored.Achieve according to whether described service end receives The first confirmation message that described receiving terminal returns judges whether described receiving terminal is successfully received the industry that described transmitting terminal sends Business message, only receives described service message when described receiving terminal, and after being successfully processed described service message, described service end Just can delete the described service message of storage, it is ensured that the receiving terminal of message-oriented middleware product can be successfully received described transmission The service message that end sends, and it is further ensured that described receiving terminal can be successfully processed described service message.
Accompanying drawing explanation
Fig. 1 is a kind of overall architecture schematic diagram of message-oriented middleware of the present invention;
Fig. 2 is the schematic flow sheet of the first embodiment of message method of the present invention;
Fig. 3 is the schematic flow sheet of the second embodiment of message method of the present invention;
Fig. 4 is the schematic flow sheet of the 3rd embodiment of message method of the present invention;
Fig. 5 is the high-level schematic functional block diagram of the preferred embodiment of service end of the present invention;
Fig. 6 is a kind of high-level schematic functional block diagram of memory module in the embodiment of the present invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further referring to the drawings.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
With reference to a kind of overall architecture schematic diagram that Fig. 1, Fig. 1 are message-oriented middleware of the present invention.
From described Fig. 1, described transmitting terminal 300 and described receiving terminal 200 access in the operation system of message-oriented middleware, It is connected with described message-oriented middleware, communicates.Specifically, described transmitting terminal 300 and described receiving terminal 200 disappear with described respectively In breath middleware, built-in service end 100 connects.It is understood that described service end 100 is in described message-oriented middleware A part.Described message-oriented middleware also includes Admin and Controller;Described Admin is the management of described message-oriented middleware Controller, described Admin includes Topic Mgmt, User Mgmt and Permission Mgmt.Described Topic Mgmt is responsible for The establishment of service message type and amendment;The described User Mgmt described transmitting terminal 300 He to accessing in described message-oriented middleware Described receiving terminal 200 is managed;The described Permission Mgmt described transmitting terminal to accessing in described message-oriented middleware 300 and the authority of described receiving terminal 200 be managed.Described Controller is responsible for safeguarding the list in described service end 100 And route, monitor the ruuning situation of described service end 100, so that described receiving terminal 200 and described transmitting terminal 300 are from described Controller obtains the ruuning situation of described service end 100.Described Controller include RoutingInfo and Scheduler, described RoutingInfo represent the routing iinformation of described service message type;Described Scheduler is to described clothes In business end 100, host node and the switching from node are managed.What described service end 100 was responsible for described service message connects sending and receiving Send and store, described service end 100 include Permission, HA (High Available, high availability clusters) Switcher, Remoting, Message Routing, Meta data mgmt, Message Store, Stat, Console and Log.Described Transmitting terminal 300 and receiving terminal 200 that Permission control has permission access in described service end 100;Described HA Switcher It is responsible for controlling host node and the automatic switchover from node in described service end 100;Described Remoting is responsible for described service end 100 Telecommunication;Described Message Routing is responsible for described service end 100 and receives and send service message;Described Meta Data mgmt is to the management of metadata in described service end 100;Described service end 100 is received by described Message Store Service message store;Described Stat is for adding up the service message that described service end 100 receives and sends;Described Console is responsible for receiving the control command that described Admin sends;Described Log is for output and described service end 100 operation conditions Relevant daily record.
Overall architecture schematic diagram based on above-mentioned message-oriented middleware, the described present invention provide a kind of message method and Service end.
Schematic flow sheet with reference to the first embodiment that Fig. 2, Fig. 2 are message method of the present invention.
In the present embodiment, described message method includes:
Step S10, the service message that service end 100 receiving end/sending end 300 sends, store described service message;
Described service end 100 receives the service message that described transmitting terminal 300 sends, and stores described service message to depositing In reservoir.Further, when described transmitting terminal 300 needs to send service message to described service end 100, described transmitting terminal 300 first cache described service message, and use asynchronous mode to be sent to described service end 100, i.e. when described transmitting terminal 300 After sending a service message to described service end 100, the transmission thread of described transmitting terminal 300 withouts waiting for, and can continue Send other service message.
Step S20, is sent to described service message described receiving terminal 200, processes described industry for described receiving terminal 200 Business message, after described receiving terminal has processed described service message, returns the first confirmation message;
After described service end 100 stores described service message, described service message is sent to institute by described service end 100 State receiving terminal 200, receive described service message for described receiving terminal 200.When described receiving terminal 200 receives described service end After 100 service messages sent, described receiving terminal 200 processes described service message, i.e. consumes described service message.Connect when described After receiving end 200 is successfully processed described service message, described receiving terminal 200 returns the first confirmation message to described service end 100.As When described service message for open an account application instruction time, receive when described receiving terminal 200 described in open an account application instruction, and successfully hold When application of opening an account described in row instructs, described receiving terminal 200 returns the first confirmation message to described service end 100.
Step S30, after receiving the described first confirmation message that described receiving terminal 200 returns, deletes the institute stored State service message.
After described service end 100 receives the described first confirmation message that described receiving terminal 200 returns, described service end 100 delete described service message in memory.
Further, after described service message is sent to described receiving terminal 200 by described service end 100, described service End 100 judges whether to receive the first confirmation message that described receiving terminal 200 returns in Preset Time.If described service end 100 do not receive the first confirmation message that described receiving terminal 200 returns in described Preset Time, and described service end 100 then weighs Newly described service message is sent to described receiving terminal 200.If described service end 100 receives described in described Preset Time The first confirmation message that receiving terminal 200 returns, described service end 100 deletes described service message in memory.Ensure that Described service message will not be lost because described receiving terminal 200 processes exception.Described Preset Time can be according to specific needs And arrange.
The present embodiment is by accessing described transmitting terminal 300 and described receiving terminal 200 in described message-oriented middleware, and by institute State transmitting terminal 300 and described receiving terminal 200 to be connected with described service end 100, when described service end 100 receives described transmitting terminal During the service message that 300 send, described service end 100 stores described service message, and is sent to by described service message described Receiving terminal 200, after having processed described service message for described receiving terminal 200, returns the first confirmation message;When described service end After 100 receive the described first confirmation message that described receiving terminal 200 returns, delete the described service message stored.Realize Whether receive, according to described service end 100, the first confirmation message that described receiving terminal 200 returns and judge described receiving terminal Whether 200 be successfully received the service message that described transmitting terminal 300 sends, and only receives described industry when described receiving terminal 200 Business message, and after being successfully processed described service message, described service end 100 just can delete the described service message of storage, it is ensured that The receiving terminal 200 of message-oriented middleware product can be successfully received the service message that described transmitting terminal 300 sends, and further Ensure that described receiving terminal 200 can be successfully processed described service message.
With reference to the schematic flow sheet of the second embodiment that Fig. 3, Fig. 3 are message method of the present invention, implement based on first Example proposes the second embodiment of message method of the present invention.
In the present embodiment, described message method also includes:
Step S40, sends the second confirmation message to described transmitting terminal 300, receives described for described transmitting terminal 300 During two confirmation message, delete described service message;
Wherein, when described transmitting terminal 300 does not receives described second confirmation message in Preset Time, described transmitting terminal 300 resend described service message to described service end 100.
After described service end 100 successfully stores the service message that described transmitting terminal 300 sends, described service end 100 Send the second confirmation message to described transmitting terminal 300, described to point out service end 100 described in described transmitting terminal 300 to be properly received Service message.When described transmitting terminal 300 receives the second confirmation message that described service end 100 sends, described transmitting terminal 300 delete the service message stored.
In the present embodiment, when described transmitting terminal 300 uses asynchronous mode to receive described second confirmation message, i.e. described Transmitting terminal 300 need not confirm after message receiving described second, just sends another service message to described service end 100, Solve and existing message-oriented middleware needs synchronization etc. to be confirmed, the problem affecting described message-oriented middleware service feature.
Further, after described service message is sent to described service end 100 by described transmitting terminal 300, described transmission End 300 judges whether to receive the second confirmation message that described service end 100 sends in Preset Time.If described transmitting terminal 300 do not receive the second confirmation message that described service end 100 sends in described Preset Time, and described transmitting terminal 300 then weighs The described service message of new transmission is to described service end 100;If described transmitting terminal 300 receives described clothes in described Preset Time The second confirmation message that business end 100 sends, described transmitting terminal 300 then deletes the service message stored.
It should be noted that the Preset Time in the present embodiment can be identical with the Preset Time in first embodiment, also Can be different.
Further, described step S40 includes:
Step a, described service message is synchronized in described service end 100 at least two by the host node of described service end 100 Individual from node;
Step b, when receive arbitrary from node send the 3rd confirmation message time, send second confirmation message to described Sending end 300, receives described second for described transmitting terminal 300 and confirms message, delete described service message.
Further, when described service end 100 receives the service message that described transmitting terminal 300 sends, i.e. when described When the host node of service end 100 receives the service message that described transmitting terminal 300 sends, the host node of described service end 100 will Described service message is synchronized in described service end 100 at least two from node.When in described service end 100 any one from When node receives described service message, receive described service message stores described service message from node, and sends the Three confirm that message is to described host node.When described host node receive the described 3rd confirm message time, described host node sends the Two confirm that message, to described transmitting terminal 300, receives described second for described transmitting terminal 300 and confirms message, delete described industry Business message.
It should be noted that in described service end 100, a host node and at least two can be there is from node, work as institute State the host node in service end 100 normal time, in described service end 100 receive service message and send service message operation all It is to be completed by the host node of described service end 100;When host node exception in described service end 100, in described service end 100 Send service message operation by completing from node in described service end 100, to ensure what described service end 100 was received Service message will not be lost, and can be successfully sent to described receiving terminal 200.
The present embodiment, by after described service end 100 receives described service message, returns the second confirmation message to institute State transmitting terminal 300, when described transmitting terminal 300 does not receives described second confirmation message in Preset Time, described transmitting terminal 300 can resend described service message to described service end 100.Ensure that described service end 100 can be properly received described The service message that transmitting terminal 300 is sent.
With reference to the schematic flow sheet of the 3rd embodiment that Fig. 4, Fig. 4 are message method of the present invention, implement based on first Example proposes the 3rd embodiment of message method of the present invention.
In the present embodiment, described step S10 includes:
Step S11, described service end 100 receives the service message that described transmitting terminal 300 sends, detects described service message Integrity;
Step S12, if described service message is complete, then stores described service message.
After described service end 100 receives the service message that described transmitting terminal 300 sends, described service end 100 detects The integrity of the service message that described transmitting terminal 300 is sent.When described service end 100 detects that described service message is complete Time, described service end 100 stores described service message.Described service end 100 can pass through CRC (Cyclic Redundancy Code, cyclic redundancy check (CRC)) function detects the integrity of described service message.Described CRC function is a kind of according to network number Produce a kind of hash function of brief fixing figure place check code according to data such as bag or computer documents, be mainly used to detect or verify The mistake being likely to occur after data transmission or preservation.
Described message method also includes:
Step S50, if described service message is imperfect, then deletes incomplete service message, and does not send the second confirmation Message gives described transmitting terminal 300, so that described transmitting terminal 300 resends described service message to described service end 100.
When described service end 100 judges that described service message is imperfect, described service end 100 is deleted described incomplete Service message, and do not send described second and confirm that message is to described transmitting terminal 300.When described transmitting terminal 300 is not when default In when receiving the second confirmation message that described service end 100 sent, described transmitting terminal 300 resends described business and disappears Breath is to described service end 100.
Further, when described service end 100 receives normal out code, refer to as user calls kill-15pid Described service end 100 is closed in order, and now, the controller Server of described service end 100 can receive described out code, closes Described service end 100.After described service end 100 receives described service message, described service end 100 can be first by described business Message caches a period of time in memory, before described service end 100 normal switching-off, by service message in described memorizer In write disk, and the service message stored in described memorizer is deleted.
When the abnormal closedown of described service end 100, when receiving Kill-9 instruction such as described service end 100, the most illegally close When closing described service end 100, the most described last received service message of service end 100 may be imperfect.If described business Message is imperfect, then it cannot be guaranteed that incomplete service message can be with in normal storage to described memorizer.But at described clothes Business end 100 is abnormal closes, and described service end 100 still can be complete by stored in described memorizer before abnormal closedown Service message by sync order write described disk in.
When the service end 100 carrying out service message transmission with described transmitting terminal 300 in described message-oriented middleware is When system collapse or power down, described transmitting terminal 300 does not receives the second confirmation message that this service end 100 sends.Now, described By described Controller, transmitting terminal 300 can know that this service end 100 system has been collapsed or occurred in that power-down conditions, Another service end 100 that described service message can be sent in described message-oriented middleware by described transmitting terminal 300 again, so that institute State receiving terminal 200 another service end 100 from described message-oriented middleware and obtain described service message, it is ensured that described transmitting terminal The transmission of service message between 300 and described receiving terminal 200, it is ensured that described receiving terminal 200 can be properly received described transmitting terminal 300 service messages sent.
The present embodiment, by after described service end 100 receives described service message, detects the complete of described service message Whole property, it is ensured that the service message that transmitting terminal 300 is sent can intactly send to described receiving terminal 200.
The present invention further provides a kind of service end.Described service end is built in described message-oriented middleware, respectively with connect The transmitting terminal 300 and the receiving terminal 200 that enter described message-oriented middleware connect, and carry out communication.
High-level schematic functional block diagram with reference to the preferred embodiment that Fig. 5, Fig. 5 are service end of the present invention.
In the present embodiment, described service end includes:
Memory module 10, the service message sent for receiving end/sending end 300, store described service message;
Described service end 100 receives the service message that described transmitting terminal 300 sends, and stores described service message to depositing In reservoir.Further, when described transmitting terminal 300 needs to send service message to described service end 100, described transmitting terminal 300 first cache described service message, and use asynchronous mode to be sent to described service end 100, i.e. when described transmitting terminal 300 After sending a service message to described service end 100, the transmission thread of described transmitting terminal 300 withouts waiting for, and can continue Send other service message.
Sending module 20, for being sent to described receiving terminal 200 by described service message, at described receiving terminal 200 Manage described service message, after described receiving terminal has processed described service message, return the first confirmation message;
After described service end 100 stores described service message, described service message is sent to institute by described service end 100 State receiving terminal 200, receive described service message for described receiving terminal 200.When described receiving terminal 200 receives described service end After 100 service messages sent, described receiving terminal 200 processes described service message, i.e. consumes described service message.Connect when described After receiving end 200 is successfully processed described service message, described receiving terminal 200 returns the first confirmation message to described service end 100.As When described service message for open an account application instruction time, receive when described receiving terminal 200 described in open an account application instruction, and successfully hold When application of opening an account described in row instructs, described receiving terminal 200 returns the first confirmation message to described service end 100.
Removing module 30, for, after receiving the described first confirmation message that described receiving terminal 200 returns, deleting and deposited The described service message of storage.
After described service end 100 receives the described first confirmation message that described receiving terminal 200 returns, described service end 100 delete described service message in memory.
Further, after described service message is sent to described receiving terminal 200 by described service end 100, described service End 100 judges whether to receive the first confirmation message that described receiving terminal 200 returns in Preset Time.If described service end 100 do not receive the first confirmation message that described receiving terminal 200 returns in described Preset Time, and described service end 100 then weighs Newly described service message is sent to described receiving terminal 200.If described service end 100 receives described in described Preset Time The first confirmation message that receiving terminal 200 returns, described service end 100 deletes described service message in memory.Ensure that Described service message will not be lost because described receiving terminal 200 processes exception.Described Preset Time can be according to specific needs And arrange.
The present embodiment is by accessing described transmitting terminal 300 and described receiving terminal 200 in described message-oriented middleware, and by institute State transmitting terminal 300 and described receiving terminal 200 to be connected with described service end 100, when described service end 100 receives described transmitting terminal During the service message that 300 send, described service end 100 stores described service message, and is sent to by described service message described Receiving terminal 200, after having processed described service message for described receiving terminal 200, returns the first confirmation message;When described service end After 100 receive the described first confirmation message that described receiving terminal 200 returns, delete the described service message stored.Realize Whether receive, according to described service end 100, the first confirmation message that described receiving terminal 200 returns and judge described receiving terminal Whether 200 be successfully received the service message that described transmitting terminal 300 sends, and only receives described industry when described receiving terminal 200 Business message, and after being successfully processed described service message, described service end 100 just can delete the described service message of storage, it is ensured that The receiving terminal 200 of message-oriented middleware product can be successfully received the service message that described transmitting terminal 300 sends, and further Ensure that described receiving terminal 200 can be successfully processed described service message.
With continued reference to Fig. 5, described sending module 20, it is additionally operable to send the second confirmation message to described transmitting terminal 300, for When described transmitting terminal 300 receives described second confirmation message, delete described service message;
Wherein, when described transmitting terminal 300 does not receives described second confirmation message in Preset Time, described transmitting terminal 300 resend described service message to described service end 100.
After described service end 100 successfully stores the service message that described transmitting terminal 300 sends, described service end 100 Send the second confirmation message to described transmitting terminal 300, described to point out service end 100 described in described transmitting terminal 300 to be properly received Service message.When described transmitting terminal 300 receives the second confirmation message that described service end 100 sends, described transmitting terminal 300 delete the service message stored.
In the present embodiment, when described transmitting terminal 300 uses asynchronous mode to receive described second confirmation message, i.e. described Transmitting terminal 300 need not confirm after message receiving described second, just sends another service message to described service end 100, Solve and existing message-oriented middleware needs synchronization etc. to be confirmed, the problem affecting described message-oriented middleware service feature.
Further, after described service message is sent to described service end 100 by described transmitting terminal 300, described transmission End 300 judges whether to receive the second confirmation message that described service end 100 sends in Preset Time.If described transmitting terminal 300 do not receive the second confirmation message that described service end 100 sends in described Preset Time, and described transmitting terminal 300 then weighs The described service message of new transmission is to described service end 100;If described transmitting terminal 300 receives described clothes in described Preset Time The second confirmation message that business end 100 sends, described transmitting terminal 300 then deletes the service message stored.
It should be noted that the Preset Time in the present embodiment can be identical with the Preset Time in first embodiment, also Can be different.
Further, described sending module 20 includes:
Lock unit, for being synchronized in described service end 100 at least two from node by described service message;
Transmitting element, for when receive arbitrary from node send the 3rd confirmation message time, send second confirmation message To described transmitting terminal 300, receive described second for described transmitting terminal 300 and confirm message, delete described service message.
Further, when described service end 100 receives the service message that described transmitting terminal 300 sends, i.e. when described When the host node of service end 100 receives the service message that described transmitting terminal 300 sends, the host node of described service end 100 will Described service message is synchronized in described service end 100 at least two from node.When in described service end 100 any one from When node receives described service message, receive described service message stores described service message from node, and sends the Three confirm that message is to described host node.When described host node receive the described 3rd confirm message time, described host node sends the Two confirm that message, to described transmitting terminal 300, receives described second for described transmitting terminal 300 and confirms message, delete described industry Business message.
It should be noted that in described service end 100, a host node and at least two can be there is from node, work as institute State the host node in service end 100 normal time, in described service end 100 receive service message and send service message operation all It is to be completed by the host node of described service end 100;When host node exception in described service end 100, in described service end 100 Send service message operation by completing from node in described service end 100, to ensure what described service end 100 was received Service message will not be lost, and can be successfully sent to described receiving terminal 200.
The present embodiment, by after described service end 100 receives described service message, returns the second confirmation message to institute State transmitting terminal 300, when described transmitting terminal 300 does not receives described second confirmation message in Preset Time, described transmitting terminal 300 can resend described service message to described service end 100.Ensure that described service end 100 can be properly received described The service message that transmitting terminal 300 is sent.
With reference to a kind of high-level schematic functional block diagram that Fig. 6, Fig. 6 are memory module in the embodiment of the present invention, based on above-mentioned enforcement Example proposes the present embodiment.
In the present embodiment, described memory module 10 includes:
Detector unit 11, for receiving the service message that described transmitting terminal 300 sends, detects the complete of described service message Property;
Memory element 12, if complete for described service message, then stores described service message.
After described service end 100 receives the service message that described transmitting terminal 300 sends, described service end 100 detects The integrity of the service message that described transmitting terminal 300 is sent.When described service end 100 detects that described service message is complete Time, described service end 100 stores described service message.Described service end 100 can pass through CRC (Cyclic Redundancy Code, cyclic redundancy check (CRC)) function detects the integrity of described service message.Described CRC function is a kind of according to network number Produce a kind of hash function of brief fixing figure place check code according to data such as bag or computer documents, be mainly used to detect or verify The mistake being likely to occur after data transmission or preservation.
Delete unit 13, if imperfect for described service message, then delete incomplete service message, and do not send the Two confirmation message give described transmitting terminal 300, so that described transmitting terminal 300 resends described service message to described service end 100。
When described service end 100 judges that described service message is imperfect, described service end 100 is deleted described incomplete Service message, and do not send described second and confirm that message is to described transmitting terminal 300.When described transmitting terminal 300 is not when default In when receiving the second confirmation message that described service end 100 sent, described transmitting terminal 300 resends described business and disappears Breath is to described service end 100.
Further, when described service end 100 receives normal out code, refer to as user calls kill-15pid Described service end 100 is closed in order, and now, the controller Server of described service end 100 can receive described out code, closes Described service end 100.After described service end 100 receives described service message, described service end 100 can be first by described business Message caches a period of time in memory, before described service end 100 normal switching-off, by service message in described memorizer In write disk, and the service message stored in described memorizer is deleted.
When the abnormal closedown of described service end 100, when receiving Kill-9 instruction such as described service end 100, the most illegally close When closing described service end 100, the most described last received service message of service end 100 may be imperfect.If described business Message is imperfect, then it cannot be guaranteed that incomplete service message can be with in normal storage to described memorizer.But at described clothes Business end 100 is abnormal closes, and described service end 100 still can be complete by stored in described memorizer before abnormal closedown Service message by sync order write described disk in.
When the service end 100 carrying out service message transmission with described transmitting terminal 300 in described message-oriented middleware is When system collapse or power down, described transmitting terminal 300 does not receives the second confirmation message that this service end 100 sends.Now, described By described Controller, transmitting terminal 300 can know that this service end 100 system has been collapsed or occurred in that power-down conditions, Another service end 100 that described service message can be sent in described message-oriented middleware by described transmitting terminal 300 again, so that institute State receiving terminal 200 another service end 100 from described message-oriented middleware and obtain described service message, it is ensured that described transmitting terminal The transmission of service message between 300 and described receiving terminal 200, it is ensured that described receiving terminal 200 can be properly received described transmitting terminal 300 service messages sent.
The present embodiment, by after described service end 100 receives described service message, detects the complete of described service message Whole property, it is ensured that the service message that transmitting terminal 300 is sent can intactly send to described receiving terminal 200.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.By above embodiment party The description of formula, those skilled in the art it can be understood that can add required general to above-described embodiment method by software The mode of hardware platform realizes, naturally it is also possible to by hardware, but a lot of in the case of the former is more preferably embodiment.Based on Such understanding, the part that prior art is contributed by technical scheme the most in other words can be with software product Form embody, this computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, CD), including Some instructions are with so that a station terminal equipment (can be mobile phone, computer, server, or the network equipment etc.) performs this Method described in each embodiment bright.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every utilize this Equivalent structure or equivalence flow process that bright description and accompanying drawing content are made convert, or are directly or indirectly used in other relevant skills Art field, is the most in like manner included in the scope of patent protection of the present invention.

Claims (10)

1. a message method, it is characterised in that described message method is applied to message-oriented middleware, in described message Between part is built-in with service end, is connected with the transmitting terminal accessing described message-oriented middleware and receiving terminal respectively, the transmission of described message Method includes:
Described service end receives the service message that described transmitting terminal sends, and stores described service message;
Described service message is sent to described receiving terminal, processes described service message for described receiving terminal, when described reception After end has processed described service message, return the first confirmation message;
After receiving the described first confirmation message that described receiving terminal returns, delete the described service message stored.
2. message method as claimed in claim 1, it is characterised in that the service message that described receiving end/sending end sends, After storing described service message step, also include:
Send the second confirmation message to described transmitting terminal, when receiving described second confirmation message for described transmitting terminal, deletion Described service message;
Wherein, when described transmitting terminal does not receives described second confirmation message in Preset Time, described transmitting terminal is sent out again Send described service message to described service end.
3. message method as claimed in claim 2, it is characterised in that described transmission second confirms that message is to described transmission End, when receiving described second confirmation message for described transmitting terminal, the step deleting described service message includes:
Described service message is synchronized in described service end at least two from node by the host node of described service end;
When receive arbitrary from the 3rd confirmation message that node sends time, send the second confirmation message to described transmitting terminal, for Described transmitting terminal receives described second and confirms message, deletes described service message.
4. the message method as described in any one of claims 1 to 3, it is characterised in that described service end receives described sending out The service message that sending end sends, the step storing described service message includes:
Described service end receives the service message that described transmitting terminal sends, and detects the integrity of described service message;
If described service message is complete, then store described service message.
5. message method as claimed in claim 4, it is characterised in that described service end receives what described transmitting terminal sent After service message, and the step of the integrity detecting described service message, also include:
If described service message is imperfect, then deletes incomplete service message, and do not send the second confirmation message to described Sending end, so that described transmitting terminal resends described service message to described service end.
6. a service end, it is characterised in that described service end is built in message-oriented middleware, respectively with access in described message Between the transmitting terminal of part and receiving terminal connect, described service end includes:
Memory module, the service message sent for receiving end/sending end, store described service message;
Sending module, for described service message is sent to described receiving terminal, processes described business for described receiving terminal and disappears Breath, after described receiving terminal has processed described service message, returns the first confirmation message;
Removing module, for after receiving the described first confirmation message that described receiving terminal returns, it is described that deletion is stored Service message.
7. service end as claimed in claim 6, it is characterised in that described sending module, is additionally operable to send the second confirmation message To described transmitting terminal, when receiving described second confirmation message for described transmitting terminal, delete described service message;
Wherein, when described transmitting terminal does not receives described second confirmation message in Preset Time, described transmitting terminal is sent out again Send described service message to described service end.
8. service end as claimed in claim 7, it is characterised in that described sending module includes:
Lock unit, for being synchronized in described service end at least two from node by described service message;
Transmitting element, for when receive arbitrary from node send the 3rd confirmation message time, send second confirmation message to institute State transmitting terminal, receive described second for described transmitting terminal and confirm message, delete described service message.
9. the service end as described in any one of claim 6 to 8, it is characterised in that described memory module includes:
Detector unit, for receiving the service message that described transmitting terminal sends, detects the integrity of described service message;
Memory element, if complete for described service message, then stores described service message.
10. service end as claimed in claim 9, it is characterised in that described memory module also includes:
Delete unit, if imperfect for described service message, then delete incomplete service message, and do not send the second confirmation Message gives described transmitting terminal, so that described transmitting terminal resends described service message to described service end.
CN201610616151.9A 2016-07-29 2016-07-29 Message method and service end Pending CN106254445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610616151.9A CN106254445A (en) 2016-07-29 2016-07-29 Message method and service end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610616151.9A CN106254445A (en) 2016-07-29 2016-07-29 Message method and service end

Publications (1)

Publication Number Publication Date
CN106254445A true CN106254445A (en) 2016-12-21

Family

ID=57605473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610616151.9A Pending CN106254445A (en) 2016-07-29 2016-07-29 Message method and service end

Country Status (1)

Country Link
CN (1) CN106254445A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965457A (en) * 2018-08-02 2018-12-07 郑州云海信息技术有限公司 A kind of message delivery method of distributed cluster system, device, equipment and medium
WO2019114586A1 (en) * 2017-12-11 2019-06-20 华为技术有限公司 Information transmission method and device
CN112422670A (en) * 2020-11-10 2021-02-26 广州凡科互联网科技股份有限公司 Method for designing asynchronous push model based on intermediate message

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103117955A (en) * 2013-01-16 2013-05-22 华为技术有限公司 Method, device and system of message transmission
CN104202411A (en) * 2014-09-15 2014-12-10 中卓信(北京)科技有限公司 File transfer method and server
CN104717144A (en) * 2015-03-23 2015-06-17 中国科学技术大学 Reliable multicast method based on within-network caching and hop-by-hop confirmation
CN105242975A (en) * 2015-08-27 2016-01-13 浪潮软件股份有限公司 Message transmission method and message middleware

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103117955A (en) * 2013-01-16 2013-05-22 华为技术有限公司 Method, device and system of message transmission
CN104202411A (en) * 2014-09-15 2014-12-10 中卓信(北京)科技有限公司 File transfer method and server
CN104717144A (en) * 2015-03-23 2015-06-17 中国科学技术大学 Reliable multicast method based on within-network caching and hop-by-hop confirmation
CN105242975A (en) * 2015-08-27 2016-01-13 浪潮软件股份有限公司 Message transmission method and message middleware

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019114586A1 (en) * 2017-12-11 2019-06-20 华为技术有限公司 Information transmission method and device
CN108965457A (en) * 2018-08-02 2018-12-07 郑州云海信息技术有限公司 A kind of message delivery method of distributed cluster system, device, equipment and medium
CN112422670A (en) * 2020-11-10 2021-02-26 广州凡科互联网科技股份有限公司 Method for designing asynchronous push model based on intermediate message

Similar Documents

Publication Publication Date Title
US7584201B2 (en) Management of mobile-device data
CN103514386B (en) Permission control and management method of application program and electronic device
US20180373877A1 (en) Data quarantine and recovery
CN107005426B (en) Method and device for managing life cycle of virtual network function
CN101494572B (en) Remote management method and system for equipment alarm information
CN100433735C (en) Communication system
CN104137587A (en) Method and terminal sending and receiving user data
CN102740160A (en) Method and apparatus for recording failures of television software
CN102915249A (en) Method and device for remotely realizing firmware updating
CN100456701C (en) Apparatus and method for improving reliability of communication system and communication system thereof
CN106254445A (en) Message method and service end
CN101877848B (en) Mobile terminal, mobile terminal data protection method and mobile terminal monitoring system
CN103546555A (en) Method and system for data management of mobile terminal
CN104954433A (en) Picture data upload method for mobile equipment
CN105263132A (en) eUICC standby configuration file selection method and user terminal
CN102378136A (en) Short message processing method and device
CN106789279B (en) Gateway control method, remote control end control method and device
CN101227456A (en) System and method for implementing data synchronization
CN103167479A (en) Method, device and system for achieving remote inhibition and remote activation of terminal
CN104539618A (en) Mail management method, device and terminal
CN113645248A (en) Data exchange system and method under cross-network environment
WO2019042032A1 (en) Data transmission method, rlc entity and pdcp entity
CN110620798A (en) Control method, system, equipment and storage medium for FTP connection
CN103684837B (en) Backup processing method, system and the back-up processing server of communication information
CN103077134A (en) Method and device for achieving multi-pipe data transmission in embedded system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20161221