CN104579905A - Message passing method and system, MOM (message oriented middleware) server and receiving terminal - Google Patents

Message passing method and system, MOM (message oriented middleware) server and receiving terminal Download PDF

Info

Publication number
CN104579905A
CN104579905A CN201310481661.6A CN201310481661A CN104579905A CN 104579905 A CN104579905 A CN 104579905A CN 201310481661 A CN201310481661 A CN 201310481661A CN 104579905 A CN104579905 A CN 104579905A
Authority
CN
China
Prior art keywords
message
follower
splitter
notice
list
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.)
Granted
Application number
CN201310481661.6A
Other languages
Chinese (zh)
Other versions
CN104579905B (en
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.)
Advanced New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201310481661.6A priority Critical patent/CN104579905B/en
Publication of CN104579905A publication Critical patent/CN104579905A/en
Application granted granted Critical
Publication of CN104579905B publication Critical patent/CN104579905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

An embodiment of the invention discloses a message passing method and system, an MOM server and a receiving terminal. The message passing method comprises steps as follows: a publisher publishes a message to the MOM server; the MOM server receives the message published by the publisher and puts the received message in a queue; the message receiver monitors the queue on the MOM server, gets back the message on the queue after the message on the queue is monitored and informs a message splitter; after the message splitter receives the message, the message splitter acquires a message follower list and informs followers in the follower list; each informed follower sends the message to a message processor corresponding to the follower. With adoption of the embodiment of the invention, the pressure of the MOM server can be relieved.

Description

Message delivery method and system and MOM server, receiving terminal
Technical field
The application relates to data communication technology field, particularly a kind of message delivery method and system and MOM server, receiving terminal.
Background technology
In data communication technology field, message between object, is often utilized to carry out reciprocation and communicate.The basic mode of message communicating comprises a kind of method of synchronization.In the method for synchronization, must carry out synchronous between the object of two communications.This just means that the service of each object must be normal operation.Like this, the transmission program (a kind of service) in sending object and the reception program (being a kind of service equally) received in object are in running status all always, and carry out the preparation intercomed mutually at any time.After transmission program initiates a message to reception program, transmission program will block the current process of sending object.Therefore, sending object can not be applied (also referred to as application program) and carry out any communication and mutual with other, can only the response of wait-receiving mode program.After sending object obtains the message that reception program returns, sending object just can continue downward operation, carries out next step Business Processing.The basic mode of message communicating also comprises a kind of asynchronous system.In asynchronous system, can wait for online between the objects of two communications, either party only need process oneself business simultaneously.Such as sending object sends after message need not the response of only wait-receiving mode side, but then can also process other task.The recipient of message also need not process the message received immediately.
Along with the development of technology, there is middleware (Middleware) technology.As the one of asynchronous communications, middleware is typically based on distributed processing environment, and the most outstanding feature is its data communication function.Also can think that middleware is the generic service between platform and application, these services have routine interface and the agreement of standard.
Message-oriented middleware (Message Oriented Middleware, MOM, also referred to as message-oriented middleware) technology, provides a kind of middleware mechanism of carrying out Message Transmission with loosely-coupled flexi mode.Fig. 1 shows a kind of schematic diagram utilizing message-oriented middleware technology to carry out Message Transmission.As shown in Figure 1, application A and application program B communicate by using the application programming interface of MOM (Application Programming Interface, API) to send message.Like this, MOM can realize the communication between different platform, and it is often used to mask the characteristic between various platform and agreement, realizes working in coordination with between application program.The message-oriented middleware product of current main flow comprises International Business Machine Corporation (IBM) (International Business Machines Corporation, IBM) MQSeries, Bank of East Asia Ltd. (Bank of East Asia, the Java messenger service (Java Message Service, JMS) etc. of MessageQ BEA) and Sun Company, Inc. (Sun).
MOM comprises based on the Asynchronous message transfer between storage with the application forwarded or synchronization message transmission.In Asynchronous message transfer, not direct communication each other between application, but with the MOM server communication as intermediary.Asynchronous middleware Technology comprises again broadcast mode and Publish-subscribe mode two class.
Fig. 2 shows the systematic schematic diagram of Publish-subscribe mode.As shown in Figure 2, adopt the MOM of publish-subscribe architecture to utilize and be called that the content of theme (topic) is to complete transmission and the reception of message.Send application program (hereinafter referred to as publisher) and issue oneself message, what point out message semantic definition is about certain topic(is generally to should publisher) information.Wish that the application program (hereinafter referred to as subscriber) receiving these message have subscribed this topic.The subscriber subscribing to this topic can receive the message about this theme.MOM server plays a part agency, an announced Message routing of theme is given all subscribers of this theme.
For the mode of the asynchronous issue of above-mentioned employing, need by the current message stores also do not sent in MOM server, send successfully in message and just message is deleted from MOM server.Concrete, message can be sent to MOM server by sender, and message in certain or some queues, is transmitted to recipient again by message deposit by MOM server in suitable.Queues different on the general corresponding MOM server of different subscribers.
In prior art, a kind of MOM of utilization carries out the system model of Message Transmission as shown in Figure 3.As in Fig. 3, comprise a publisher, a MOM server, three subscribers.Aforementionedly to mention, queues different on the general corresponding MOM server of different subscribers.Therefore, such as exist as in Fig. 3 when three subscribers here, MOM server comprises respectively three of correspondence different queues with it.Its detailed process comprises: S1, and publisher gives out information; S2, MOM server receives the message that described publisher issues, and by this message copy 3 parts, every portion is placed in a queue; S3, each subscriber monitors each self-corresponding queue on described MOM server, and after the queue listening to correspondence has message, subscriber sends the request of fetching; S4, MOM server receive subscriber fetch request after, by the described Message routing in queue corresponding for this subscriber to described in send the subscriber of the request of fetching.
Realizing in the application's process, inventor finds that in prior art, at least there are the following problems:
In the MOM practical application of publish-subscribe architecture, different subscribers is corresponding different application often.Further, these different application, often corresponding different operation system.In some comprehensive business system, there is operation systems different in a large number.For the situation that there is a large number of services system, according to the implementation of above-mentioned prior art, need to configure a large amount of queue corresponding with it in MOM server, such as, for M operation system, just need to configure M queue.The every a message copied by this message copy, is placed in a queue after receiving the message of described publisher issue by MOM server.Like this, for M queue, just need to copy M part, and the every portion copied is placed in a queue.And then, obtain the message of subscription Subscriber request after, the subscriber that the Message routing in queue is extremely asked by MOM server.For the situation that M numeric ratio is larger, when namely there is a large number of services system, need in MOM server to arrange more queue.More queue will occupy the larger memory space of MOM server, thus increases the pressure of MOM server.
Summary of the invention
The object of the embodiment of the present application is to provide a kind of message delivery method and system and MOM server, receiving terminal, to reduce the pressure of MOM server.
For solving the problems of the technologies described above, the embodiment of the present application provides a kind of message delivery method and system and MOM service, receiving terminal is achieved in that
A kind of message delivery method, comprising:
Publisher gives out information message-oriented middleware server;
Message-oriented middleware server receives the message that described publisher issues, and the message of this reception is placed in queue;
Message receiver monitors the queue on described message-oriented middleware server, and after listening to described queue has message, the message in described queue is fetched, and notification message splitter;
Message splitter obtains message follower list after receiving described notice, and notifies the follower in follower's list;
Message is sent to message handling device corresponding to this follower by notified follower.
A kind of messaging system, comprises publisher, message-oriented middleware server, message receiver, message splitter, at least two followers, wherein,
Publisher, for the message-oriented middleware server that gives out information;
Message-oriented middleware server, for receiving the message that described publisher issues, and is placed in queue by the message of this reception;
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to message handling device corresponding to this follower by message after receiving the notice that message splitter sends.
A kind of messaging system, comprises publisher, message-oriented middleware server, message receiver, message splitter, at least two followers, wherein,
Publisher, for the message-oriented middleware server that gives out information;
Message-oriented middleware server, for receiving the message that described publisher issues, and is placed in queue by the message of this reception;
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to database after follower's mark on message being added after receiving the notice that message splitter sends;
Database, for storing the message sent;
Task dispatcher, the message on polling data storehouse, and message is sent to corresponding message handling device.
A kind of receiving terminal, comprising: message receiver, message splitter, at least two followers, wherein,
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to message handling device corresponding to this follower by message after receiving the notice that message splitter sends.
A kind of receiving terminal, comprising: message receiver, message splitter, at least two followers, wherein,
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to database after follower's mark on message being added after receiving the notice that message splitter sends;
Database, for storing the message sent;
Task dispatcher, the message on polling data storehouse, and message is sent to corresponding message handling device.
The technical scheme provided from above the embodiment of the present application, owing to not carrying out book copying to this message, but only by receive message stores in the queue of MOM server, therefore will take the few memory space of MOM server relative to prior art, thus significantly reduce the pressure of MOM server.Or in the embodiment of the present application, MOM server is starkly lower than the number of subscriber's quantity to the message copy received, and is stored in queue.Like this, will the less memory space of MOM server be taken relative to prior art, thus also mitigate the pressure of MOM server compared with prior art.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, the accompanying drawing that the following describes is only some embodiments recorded in the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic diagram utilizing message-oriented middleware technology to carry out Message Transmission;
Fig. 2 is the middleware system schematic diagram of Publish-subscribe mode;
Fig. 3 is that in prior art, a kind of MOM of utilization carries out the system model of Message Transmission as figure;
Fig. 4 is a module map of the application's messaging system embodiment;
Fig. 5 is another module map of the application's messaging system embodiment;
Fig. 6 is the flow chart of the application's message delivery method embodiment;
Fig. 7 is a module map of another embodiment of the application's messaging system;
Fig. 8 is another module map of another embodiment of the application's messaging system;
Fig. 9 is the flow chart of another embodiment of the application's message delivery method;
Figure 10 is that of the application's messaging system implements scene module figure;
Figure 11 is another enforcement scene module figure of the application's messaging system.
Embodiment
The embodiment of the present application provides a kind of message delivery method and system and MOM server, receiving terminal.
Technical scheme in the application is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
First an embodiment of the application's messaging system is introduced.
Fig. 4 shows the module map of the application's messaging system embodiment.As shown in Figure 4, this system comprises publisher 410, MOM server 420, message receiver 430, message splitter 440, at least two followers (number consecutively is 451,452 ...), at least two message handling devices (number consecutively is 461,462 ...).Each message handling device is corresponding with a follower.
Publisher 410, for the MOM server that gives out information.
MOM server 420, for receiving the message that described publisher issues, and is placed in queue by the message of this reception.
Message receiver 430, for monitoring the queue on described MOM server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter.
Message splitter 440, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver 430 sends.
Follower, for being sent to message handling device corresponding to this follower by message after receiving the notice that message splitter sends.
Described follower can be understood as the logical partitioning of subscriber in the event of concern aspect, can exist in the form of software modules, also can exist in the form of dedicated hardware, or exist with the form of special software+hardware.
Similar, described message receiver 430, message splitter 440, message handling device also can be exist in the form of software modules, also can exist in the form of dedicated hardware, or exists with the form of special software+hardware.
Through above-mentioned process, the message that message handling device can be sent follower performs respective handling.
Described message receiver 430, message splitter 440, follower and message handling device can be arranged in same system.Concrete, be such as positioned in the middle of same system level/application layer software, or be arranged in same property server, or be arranged in the server zone with same function.Certainly, also can arrange message receiver 430 flexibly, message splitter 440, follower and message handling device are positioned on different logical blocks or entity.Subsequent embodiment is when non-special declaration, similar.
Described MOM server can be a property server, also can be the logic body of software program for execution, and need not be an independent entity, then or can be the logic body of execution particular software application in cluster computer.This application is not limited.
Described follower's list can be stored on follower's manager, such as, be present in the follower's manager list safeguarded by follower's manager.Follower in follower's list, can be follower when registering to follower's manager when system starts, the follower of registration be recorded in follower's list by follower's manager.Subsequent embodiment is when non-special declaration, similar herein.
Described message splitter, can as the annexation in Fig. 4.In this figure, the notice that the message receiver that message splitter receives is sent, can comprise described message.Correspondingly, message splitter is sent to the notice of follower, also can comprise this message.Like this, the notice received from message splitter due to follower comprises message, therefore follower next step this message directly can be sent to message handling device corresponding to this follower.
Message receiver informs the event type that can comprise the message that message receiver receives in the content of message splitter.
Message splitter 440 notify follower's list in follower, can be the follower corresponding with the event type of message in follower's list, and need not comprise in follower's list with notice in the incoherent follower of message event type.Like this, the message handling device that message is sent to follower corresponding by follow-up notified follower processes.Obvious, such mode avoids unnecessary notification procedure, and such as the unnecessary notice to some follower, can save program like this, can also saving resource.
Follower in follower's list that message splitter 440 notifies, also can be all followers in follower's list, namely except notifying the follower corresponding with the event type of the notified middle message of message splitter in follower's list, also notify in follower's list with notice in the incoherent follower of message event type.In this situation, message receiver informs the event type that also can not comprise the message that message receiver receives in the content of message splitter.Like this, notified each follower can analyze message content respectively, such as, determine the event type of the message received.And then if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.Certainly, message receiver informs the event type that still can comprise the message that message receiver receives in the content of message splitter.Notified each follower can analyze message content respectively, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for determining whether to pay close attention to the foundation of this message.And then if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.
Mention above, described message receiver 430, message splitter 440, follower and message handling device can be arranged in same system, this system can be see residing receiving terminal with above-mentioned messaging perspective in the application's book embodiment, so also can distinguish with the total system shown in Fig. 4.
Need it is noted that, described message splitter, also can as the annexation in Fig. 5.In this figure, the notice that the message receiver that message splitter receives is sent, can not comprise described message, and just brief notice.Correspondingly, message splitter is sent to the notice of follower, also can not comprise message (as shown in phantom in Figure 5).Like this, follower can obtain message after receiving the notice that message splitter sends to message receiver, and the message of this acquisition is sent to message handling device corresponding to this follower.In described short notice, can event type be comprised, also can not comprise event type.If described short notice comprises event type, then in above process, follower in follower's list that message splitter 440 notifies, can be the follower corresponding with the event type of message in follower's list, and need not comprise in follower's list with notice in the incoherent follower of message event type.Notified follower can obtain message from message receiver 430, and this message is sent to message handling device corresponding to follower, thus performs subsequent treatment.If described short notice does not comprise event type, then in above process, the follower in follower's list that message splitter 440 notifies can be the whole followers in follower's list.Follower can obtain message from message receiver 430, and then analyzes message content, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for decision and whether pay close attention to the foundation of this message.Further, if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.This all class situation is no longer separately stated with independent accompanying drawing.
Below introduce an embodiment of the application's message delivery method.
Fig. 6 shows the flow chart of an embodiment of the application's message delivery method.As shown in Figure 6, this embodiment comprises the steps:
S600: publisher gives out information MOM server.
S610:MOM server receives the message that described publisher issues, and the message of this reception is placed in queue.
S620: message receiver monitors the queue on described MOM server, and after listening to described queue has message, the message in described queue is fetched, and notification message splitter.
S630: message splitter obtains message follower list after receiving described notice, and notifies the follower in follower's list.
Concrete, follower's list can be stored in follower's manager.Accordingly, message splitter can obtain follower's list from follower's manager.
Follower in follower's list, can be follower when registering to follower's manager when system starts, the follower of registration be recorded in follower's list by follower's manager.
The notice that the message receiver that in S620, message splitter receives is sent, can comprise described message.Correspondingly, message splitter is sent to the notice of follower, also can comprise this message.Like this, the notice received from message splitter due to follower comprises message, therefore follower next step in S640, this message directly can be sent to message handling device corresponding to this follower.Said process can the system embodiment of reference diagram 4 correspondence.
The notification message of message receiver described in S620 splitter, concrete, the event type of the message that message receiver receives can be comprised in the content of notice.
Notify the follower in follower's list described in S630, concrete, can be the follower corresponding with the event type of message notified in follower's list, and need not notify in follower's list with notice in the incoherent follower of message event type.Like this, the message handling device that message is sent to follower corresponding by follow-up notified follower processes.Obvious, such mode avoids unnecessary notification procedure, and such as the unnecessary notice to some follower, can save program like this, can also saving resource.
Follower in follower's list that in S630, message splitter notifies, also can be all followers in follower's list, namely in fact except notifying the follower corresponding with the event type of the notified middle message of message splitter in follower's list, also notify in follower's list with notice in the incoherent follower of message event type.In this situation, message receiver informs the event type that also can not comprise the message that message receiver receives in the content of message splitter.Like this, notified each follower can analyze message content respectively, such as, determine the event type of the message received.And then if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.Certainly, message receiver informs the event type that still can comprise the message that message receiver receives in the content of message splitter.Notified each follower can analyze message content respectively, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for determining whether to pay close attention to the foundation of this message.And then if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.
Need it is noted that, the notice sent of message receiver that message splitter receives, also can not comprise described message, and just brief notice.Correspondingly, message splitter is sent to the notice of follower, also can not comprise message.Like this, follower can obtain message after receiving the notice that message splitter sends to message receiver, and the message of this acquisition is sent to message handling device corresponding to this follower.In described short notice, can event type be comprised, also can not comprise event type.If described short notice comprises event type, then in above process, follower in follower's list of message splitter notice, can be the follower corresponding with the event type of message in follower's list, and need not comprise in follower's list with notice in the incoherent follower of message event type.Notified follower can obtain message from message receiver 430, and this message is sent to message handling device corresponding to follower, thus performs subsequent treatment.If described short notice does not comprise event type, then in above process, the follower in follower's list that message splitter 440 notifies can be the whole followers in follower's list.Follower can obtain message from message receiver, and then analyzes message content, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for decision and whether pay close attention to the foundation of this message.Further, if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.This all class situation is no longer separately stated with independent accompanying drawing.
S640: message is sent to message handling device corresponding to this follower by notified follower.
Like this, the message that message handling device can be sent follower performs respective handling.
If message splitter notifies the follower corresponding with the event type of message in follower's list in S630, and and fail to give notice in follower's list with notice in the incoherent follower of message event type, then in S640, the message handling device that message is sent to follower corresponding by notified follower processes.
If message splitter notifies all followers in follower's list in S630, namely except notifying the follower corresponding with the event type of the notified middle message of message splitter in follower's list, also notify in follower's list with notice in the incoherent follower of message event type, then in S640, notified each follower can analyze message content respectively, if certain follower determines to need to pay close attention to this message, then the message handling device that the message that these needs are paid close attention to is sent to this follower corresponding by this follower processes.
Certain follower described determines to need to pay close attention to this message, can be determined by follower according to the affair logic processed needed for affiliated subscriber.This point is introduced at the follow-up example in conjunction with concrete scene.
The implementation procedure of above-mentioned the application's embodiment of the method is described below in conjunction with concrete scene.Can be understood in conjunction with Figure 10.
Online transaction service provider, the insurance business be also provided with in online trading system for transaction had.The feature of this insurance business is to intersect with each bargain link of online transaction.Insurance in this type of online transaction is insured also referred to as cross.As previously mentioned, the operation of cross insurance is closely related with commodity transaction link.Particularly proceed to different nodes in transaction flow, such as proceed to that buyer takes commodity, buyer's payment, system creation order, seller's delivery, buyer confirm to receive, Transaction Success, buyer requirements reimbursement, the transaction different node such as closedown time, different types of insurance products has respective operation flow and responds.Such as, the insurance of freight charges class goes out declaration form on seller delivers this node, makes lapse of policy in Transaction Success or transaction closed node.Such as, and the insurance of prolonging of mobile phone/electrical type commodity is after Transaction Success, just go out declaration form, makes lapse of policy to termination of risk.
The kind of insurance that existing online transaction service provider provides reaches tens kinds to tens kinds, but also constantly has new insurance kind to add, and this extensibility to system, maintainability, team development efficiency etc. propose very large challenge.
Here, in conjunction with the flow process shown in above-mentioned Fig. 5, publisher can be such as trading server, issues corresponding message to MOM server when transaction proceeds to different node.Here S600 concrete example in this way a certain trading server issue one about creating the message of order to MOM server.Corresponding S610, MOM server receives the establishment order messages that this trading server is issued, and this message is placed in queue.Distinguish with prior art, MOM server will this message copy many parts, and every portion is placed in a queue corresponding with subscriber.Contrary, in the embodiment of the present application, this message can be placed in a queue by MOM server, or copies and be placed in the queue being significantly less than subscriber's quantity.Concrete, the number of described queue can be 1; Or the number of described queue can be greater than 1 and be less than subscriber's number simultaneously.In other each embodiment of the application, the queue number related to all can set according to this.
Like this, owing to not carrying out book copying to this message, but only by receive message stores in the queue of MOM server, therefore will take the few memory space of MOM server relative to prior art, thus significantly reduce the pressure of MOM server.
Or in the embodiment of the present application, MOM server is starkly lower than the number of subscriber's quantity to the message copy received, and is stored in queue.Like this, will the less memory space of MOM server be taken relative to prior art, thus also mitigate the pressure of MOM server compared with prior art.The embodiment of the present application can be greater than the situation of 1 for subscriber.Correspondingly, the number of queues be stored into will be 1 or be greater than 1, but be less than subscriber's number.
Further, corresponding S620, the message receiver in insurance system (corresponding receiving terminal) monitors the queue on described MOM server, and after listening to described queue has message, the message in described queue is got back in message receiver.Afterwards, corresponding S630, the message splitter in insurance system obtains message follower list, and notifies the follower in follower's list.
Described follower is the division paying close attention to event about subscriber.Such as subscriber comprises 3, is the situation of subscriber 1, subscriber 2 and subscriber 3 respectively.These three subscribers such as respectively insurance kind 1 of corresponding insurance system, insurance kind 2 and insurance kind 3.Again such as, establishment order, payment and delivery three events can be comprised for the event paid close attention to.The logical block that then insurance kind 1 to insurance kind 3 is responsible for each event paid close attention to is called a follower.Like this, insurance kind 1 comprises three followers, is the corresponding follower creating order event respectively, the payment follower of event and the follower of shipping events.Can be these three followers in addition ID mark respectively of insurance kind 1, such as, respectively be 11,12 and 13.Similar, insurance kind 2 correspondence creates the follower 21 of order event, the payment follower 22 of event and the follower 23 of shipping events; Insurance kind 3 correspondence creates the follower 31 of order event, the payment follower 32 of event and the follower 33 of shipping events.
As previously mentioned, described message follower list can be stored in follower's manager.Follower's list in follower's list can be that follower is registered to when system starts in follower's management.Such as create the follower 11 of order event, to follower's manager, perform registration when insurance system starts, thus in manager's list of follower's manager, have the follower 11 creating order event.All the other followers are similar, repeat no more.
Corresponding S640, message is sent to message handling device corresponding to this follower by notified each follower, to perform Message Processing.
Concrete, if the notice that the message splitter in insurance system receives comprises message and event type, the message that this can comprise by message splitter and event type notice, to all followers in follower's list, also can be sent to the part follower in list.For the part follower be sent to, can be the follower corresponding with the event type of message.Such as, the message that message splitter receives creates order messages, and event type creates order.And in each follower, ID second is 1 is only and pays close attention to the follower creating order, namely corresponding with the event type of message follower.Therefore, the notice comprising message and event type can be sent to the follower of these correspondences by message splitter.The message this comprised for message splitter and event type are sent to the situation of all followers in follower's list, notified each follower, the event type of message and the event type self paid close attention to can be compared, message is sent to corresponding message handling device by the consistent follower of comparison result.
If the notice that the message splitter in insurance system receives comprises message, the message informing that this can comprise by message splitter, to all followers in follower's list, also can be sent to the part follower in list.For the part follower be sent to, can be the follower corresponding with the event type of message.Such as, the message that message splitter receives creates order messages, and message splitter can be analyzed this message, thus obtains the event type of this message.Such as whether comprise specific function name by analyzing it, or analyze the event type field of this message and obtain.Such as analyzing the event type obtained is create order.As previously mentioned, in each follower, ID second is 1 is only and pays close attention to the follower creating order, namely corresponding with the event type of message follower.Therefore, the notice comprising message and event type can be sent to the follower of these correspondences by message splitter.The message this comprised for message splitter is sent to the situation of all followers in follower's list, notified each follower, the event type obtaining message can be analyzed, such as whether comprise specific function name by analyzing this message, or extract the event type field of this message and obtain its event type, and the event type of this message and the event type self paid close attention to are compared, message is sent to corresponding message handling device by the consistent follower of comparison result.
If the notice that the message splitter in insurance system receives comprises event type, the message informing that this can comprise by message splitter, to all followers in follower's list, also can be sent to the part follower in list.For the part follower be sent to, can be the follower corresponding with the event type of message.This situation is relatively clearer and more definite, repeats no more.The event type this comprised for message splitter is sent to the situation of all followers in follower's list, notified each follower, the event type of this message and the event type self paid close attention to can be compared, message is sent to corresponding message handling device by the consistent follower of comparison result.
If do not comprise event type and message in the notice that receives of message splitter in insurance system, the notice that this can not comprised message and event type by message splitter is sent to all followers in follower's list.Follower can obtain message from message receiver, and then analyzes message content, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for decision and whether pay close attention to the foundation of this message.Further, if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.This all class situation is no longer separately stated with independent accompanying drawing.
Details in other specific implementation process, can execute example in conjunction with aforementioned system and method and obtain, not repeat them here.
Such for actual central similar insurance system, the situation that in insurance system, the kind of insurance increases, the maintenance of prior art can become increasingly complex, and development efficiency reduces.This is because in prior art, each insurance kind needs singly to read configuration messages monitoring queue, also will avoid the message queue receiving other insurance kinds simultaneously.If certain message by its insurance kind garbled-reception not corresponding, then really needs the insurance kind processing this message may will cannot receive this message.Like this, the mistake of system can be caused, carrying out smoothly of impact transaction.Adopt the mode of the above embodiments of the present application, in message processing procedure, MOM server only need send a piece of news, and MOM server does not need the recipient being concerned about this message.Which can realize, to the confirmation of message by the message processor processes of follower and correspondence thereof, reducing MOM server stress by message splitter or by follower.New insurance kind is being had to produce, can according to insurance kind own service logic, the follower that increase is corresponding and message handling device just can realize the monitoring process to this message, and be very easy to expansion, development efficiency also significantly improves.Or when having the concern relation of insurance kind to need to change, the own service logic after changing according to insurance kind, revises corresponding follower and message handling device, just can realize the correct monitoring process to message, be also very easy to expansion, development efficiency also significantly improves.
Below introduce another embodiment of the application's messaging system.
Fig. 7 shows the module map of another embodiment of the application's messaging system.As shown in Figure 7, this system comprises publisher 410, MOM server 420, message receiver 430, message splitter 440, at least two followers (number consecutively is 451,452 ...), at least two message handling devices (number consecutively is 461,462 ...).Each message handling device is corresponding with a follower.
Publisher 410, for the MOM server that gives out information.
MOM server 420, for receiving the message that described publisher issues, and is placed in queue by the message of this reception.
Message receiver 430, for monitoring the queue on described MOM server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter.
Message splitter 440, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver 430 sends.
Follower, for being sent to database 470 after follower ID on the message needing to pay close attention to being added after receiving the notice that message splitter sends.
Database 470, for storing the message sent.
This database can be the cache level memory cell for system, such as, level cache in CPU, L2 cache be three grades of buffer memorys even, also can be the buffer unit of software level, also can be the database of software level, can also be that there is the software of special memory function and/or the unit of hardware, not limit at this.
Task dispatcher 480, for the message on polling data storehouse 470, and message handling device message being sent to correspondence processes.
Through above-mentioned process, the message that message handling device can be sent follower performs respective handling.
Described message receiver 430, message splitter 440, follower and message handling device can be arranged in same system.Concrete, be such as positioned in the middle of same system level/application layer software, or be arranged in same property server, or be arranged in the server zone with same function.Certainly, also can arrange message receiver 430 flexibly, such as message splitter 440, follower, database 470, the part in task dispatcher 480 and message handling device is positioned on same logical block or entity.Subsequent embodiment is when non-special declaration, similar.
Described MOM server can be a property server, also can be the logic body of software program for execution, and need not be an independent entity, then or can be the logic body of execution particular software application in cluster computer.This application is not limited.
Described follower's list can be stored on follower's manager, such as, be present in the follower's manager list safeguarded by follower's manager.Follower in follower's list, can be follower when registering to follower's manager when system starts, the follower of registration be recorded in follower's list by follower's manager.Subsequent embodiment is when non-special declaration, similar herein.
Described message splitter, can as the annexation in Fig. 4.In this figure, the notice that the message receiver that message splitter receives is sent, can comprise described message.Correspondingly, message splitter is sent to the notice of follower, also can comprise message.Like this, the notice received from message splitter due to follower comprises message, therefore follower next step this message directly can be sent to message handling device corresponding to this follower.
Message receiver informs the event type that can comprise the message that message receiver receives in the content of message splitter.Correspondingly, follower in follower's list that message splitter 440 notifies, can be the follower corresponding with the event type of the notified middle message of message splitter in follower's list, and need not comprise in follower's list with notice in the incoherent follower of message event type.Like this, the message handling device that message is sent to follower corresponding by follow-up notified follower processes.Obvious, such mode avoids unnecessary notification procedure, and such as the unnecessary notice to some follower, can save program like this, can also saving resource.
Follower in follower's list that message splitter 440 notifies, also can be all followers in follower's list, namely except notifying the follower corresponding with the event type of the notified middle message of message splitter in follower's list, also notify in follower's list with notice in the incoherent follower of message event type.In this situation, message receiver informs the event type that also can not comprise the message that message receiver receives in the content of message splitter.Like this, notified each follower can analyze message content respectively, such as, determine the event type of the message received.And then if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.Certainly, message receiver informs the event type that still can comprise the message that message receiver receives in the content of message splitter.Notified each follower can analyze message content respectively, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for determining whether to pay close attention to the foundation of this message.And then if certain follower determines to need to pay close attention to this message, then the message handling device that this follower also can realize the message that these needs are paid close attention to be sent to this follower corresponding processes.
Mention above, described message receiver 430, message splitter 440, follower and message handling device can be arranged in same system, this system can be see residing receiving terminal with above-mentioned messaging perspective in the application's book embodiment, so also can distinguish with the total system shown in Fig. 4.
In said system, the message can sent by follower's receipt message splitter, and needed the message paid close attention to adds follower ID by follower, and the message after this adder ID is sent to database 470.Which can contact relational implementation as shown in Figure 7.
Also can as the annexation in Fig. 8, follower is receipt message not, but by message splitter, message is sent to database.In this situation, follower ID can be sent to message splitter by follower, and indicates the message needing to add.Follower ID on being added in the message of correspondence by message splitter.
Need it is noted that, although native system embodiment shows Fig. 7, Fig. 8 two kinds of situations, also can annexation as in fig. 5 between described message splitter and message receiver.In this situation, the notice that the message receiver that message splitter receives is sent, can not comprise described message, and just brief notice.Correspondingly, message splitter is sent to the notice of follower, also can not comprise message.Like this, follower can obtain message after receiving the notice that message splitter sends to message receiver, and the message of this acquisition is sent to database.
Fig. 9 shows the flow chart of another embodiment of the application's message delivery method.As shown in Figure 9, this embodiment comprises the steps:
S900: publisher gives out information.
S910:MOM server receives the message that described publisher issues, and the message of this reception is placed in queue.
S920: message receiver monitors the queue on described MOM server, and after listening to described queue has message, the message in described queue is fetched, and notification message splitter.
S930: message splitter obtains message follower list after receiving described notice, and notifies the follower in follower's list.
Concrete, follower's list can be stored in follower's manager.Accordingly, message splitter can obtain follower's list from follower's manager.
Follower in follower's list, can be follower when registering to follower's manager when system starts, the follower of registration be recorded in follower's list by follower's manager.
The notice that the message receiver that in S920, message splitter receives is sent, can comprise described message.Correspondingly, message splitter is sent to the notice of follower, also can comprise this message.Like this, the notice received from message splitter due to follower comprises message, therefore follower next step can need follower ID being stored in database on the message marking paid close attention in S940.Said process can the system embodiment of reference diagram 7 correspondence.
The notification message of message receiver described in S920 splitter, concrete, the event type of the message that message receiver receives can be comprised in the content of notice.
Notify the follower in follower's list described in S930, concrete, can be the follower corresponding with the event type of message notified in follower's list, and need not notify in follower's list with notice in the incoherent follower of message event type.Like this, follow-up notified follower will need follower ID on the message marking of concern and be stored in database.Obvious, such mode avoids unnecessary notification procedure, and such as the unnecessary notice to some follower, can save program like this, can also saving resource.
Follower in follower's list that in S930, message splitter notifies, also can be all followers in follower's list, namely in fact except notifying the follower corresponding with the event type of the notified middle message of message splitter in follower's list, also notify in follower's list with notice in the incoherent follower of message event type.In this situation, message receiver informs the event type that also can not comprise the message that message receiver receives in the content of message splitter.Like this, notified each follower can analyze message content respectively, such as, determine the event type of the message received.And then if certain follower determines to need to pay close attention to this message, then this follower also can will need follower ID on the message marking of concern and be stored in database.Certainly, message receiver informs the event type that still can comprise the message that message receiver receives in the content of message splitter.Notified each follower can analyze message content respectively, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for determining whether to pay close attention to the foundation of this message.And then if certain follower determines to need to pay close attention to this message, then this follower also can realize follower ID on the message marking needing to pay close attention to and be stored in database.
Need it is noted that, the notice sent of message receiver that message splitter receives, also can not comprise described message, and just brief notice.Correspondingly, message splitter is sent to the notice of follower, also can not comprise message.Like this, follower can obtain message after receiving the notice that message splitter sends to message receiver, and will need follower ID on the message marking paid close attention to and be stored in database.In described short notice, can event type be comprised, also can not comprise event type.If described short notice comprises event type, then in above process, follower in follower's list of message splitter notice, can be the follower corresponding with the event type of message in follower's list, and need not comprise in follower's list with notice in the incoherent follower of message event type.Notified follower can obtain message from message receiver 430, and this message is sent to message handling device corresponding to follower, thus performs subsequent treatment.If described short notice does not comprise event type, then in above process, the follower in follower's list that message splitter 440 notifies can be the whole followers in follower's list.Follower can obtain message from message receiver, and then analyzes message content, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for decision and whether pay close attention to the foundation of this message.Further, if certain follower determines to need to pay close attention to this message, then this follower also can realize follower ID on the message marking needing to pay close attention to and be stored in database.This all class situation is no longer separately stated with independent accompanying drawing.
S940: the message that these needs are paid close attention to by notified follower is sent in database after adding upper follower ID.
If message splitter notifies the follower corresponding with the event type of message in follower's list in S930, and and fail to give notice in follower's list with notice in the incoherent follower of message event type, then in S940, notified follower is sent in database after adding upper follower ID.
If message splitter notifies all followers in follower's list in S930, namely except notifying the follower corresponding with the event type of message in follower's list, also notify the incoherent follower in follower's list, then in S940, notified each follower can analyze message content respectively, if certain follower determines to need to pay close attention to this message, then the message handling device that the message that these needs are paid close attention to is sent to this follower corresponding by this follower processes.
Certain follower described determines to need to pay close attention to this message, can be determined by follower according to the affair logic processed needed for affiliated subscriber.This point provides introduction at preceding sections, repeats no more.
S950: task dispatcher is timed to poll in database, if there is the message of storage, then reads the follower ID that this message marks, and searches according to the follower ID that this message marks and notify corresponding message handling device.
In fact, follower ID and message handling device have one-to-one relationship.That is, a certain message handling device, is exclusively used in the message that a certain follower of process pays close attention to.In order to realize this corresponding relation, can also add an ID for each message handling device, the ID of this message handling device is identical with the ID of corresponding follower.
S960: mark corresponding in notified message processor processes database has the message of follower ID.
S970: if described message handling device performs Message Processing success, then the treatment state of this message in database is updated to successfully; If described message handling device performs Message Processing failure, then the treatment state of this message in database is updated to failure, the time of next retry processing is set, and the number of retries of this message accumulative.
It should be noted that, if the situation of two kinds in S970, can not possess simultaneously.That is, one wherein can be selected to perform.
S980: the treatment state of each message is inquired about in database timing, be that successful message performs delete processing for treatment state, message number of retries being met or exceeded to predetermined value then sends system alarm.
It should be noted that, in S980, the treatment state of each message is inquired about in database timing, for treatment state be successful message perform delete processing, then send system alarm with message number of retries being met or exceeded to predetermined value, can not possess simultaneously.That is, one wherein can be selected to perform.And S980 does not rely on the execution of S970 and performs.
The implementation procedure of above-mentioned the application's embodiment of the method is described below in conjunction with concrete scene, and main introduction is different from the last detailed process in conjunction with concrete scene, identical or similar part no longer describes or no longer specifically describes.Can be understood in conjunction with Figure 11.
Remaining the insurance business for being provided with in online trading system for transaction, being illustrated in conjunction with the flow process shown in above-mentioned Fig. 9 here.Similar with previous example, MOM server will this message copy many parts, and every portion is placed in a queue corresponding with subscriber.Contrary, this message can be placed in a queue by MOM server, or copies and be placed in the queue being significantly less than subscriber's quantity.Like this, owing to not carrying out book copying to this message, but only by receive message stores in the queue of MOM server, therefore will take the few memory space of MOM server relative to prior art, thus significantly reduce the pressure of MOM server.Or in the embodiment of the present application, MOM server is starkly lower than the number of subscriber's quantity to the message copy received, and is stored in queue.Like this, will the less memory space of MOM server be taken relative to prior art, thus also mitigate the pressure of MOM server compared with prior art.The embodiment of the present application can be greater than the situation of 1 for subscriber.Correspondingly, the number of queues be stored into will be 1 or be greater than 1, but be less than subscriber's number.
Further, corresponding S920, the message receiver in insurance system (corresponding receiving terminal) monitors the queue on described MOM server, and after listening to described queue has message, the message in described queue is got back in message receiver.Afterwards, corresponding S930, the message splitter in insurance system obtains message follower list, and notifies the follower in follower's list.
As previously mentioned, described message follower list can be stored in follower's manager.Follower's list in follower's list can be that follower is registered to when system starts in follower's management.Such as create the follower 11 of order event, to follower's manager, perform registration when insurance system starts, thus in manager's list of follower's manager, have the follower 11 creating order event.All the other followers are similar, repeat no more.
Corresponding S940, the message that these needs are paid close attention to by notified each follower is sent in database after adding upper follower ID.
Concrete, if the notice that the message splitter in insurance system receives comprises message and event type, the message that this can comprise by message splitter and event type notice, to all followers in follower's list, also can be sent to the part follower in list.For the part follower be sent to, can be the follower corresponding with the event type of message.Such as, the message that message splitter receives creates order messages, and event type creates order.And in each follower, ID second is 1 is only and pays close attention to the follower creating order, namely corresponding with the event type of message follower.Therefore, the notice comprising message and event type can be sent to the follower of these correspondences by message splitter.The message this comprised for message splitter and event type are sent to the situation of all followers in follower's list, notified each follower, the event type of message and the event type self paid close attention to can be compared, the message that these needs are paid close attention to by the consistent follower of comparison result is sent in database after adding upper follower ID.
If the notice that the message splitter in insurance system receives comprises message, the message informing that this can comprise by message splitter, to all followers in follower's list, also can be sent to the part follower in list.For the part follower be sent to, can be the follower corresponding with the event type of message.Such as, the message that message splitter receives creates order messages, and message splitter can be analyzed this message, thus obtains the event type of this message.Such as whether comprise specific function name by analyzing it, or analyze the event type field of this message and obtain.Such as analyzing the event type obtained is create order.As previously mentioned, in each follower, ID second is 1 is only and pays close attention to the follower creating order, namely corresponding with the event type of message follower.Therefore, the notice comprising message and event type can be sent to the follower of these correspondences by message splitter.The message this comprised for message splitter is sent to the situation of all followers in follower's list, notified each follower, the event type obtaining message can be analyzed, such as whether comprise specific function name by analyzing this message, or extract the event type field of this message and obtain its event type, and the event type of this message and the event type self paid close attention to are compared, be sent in database after the message that these needs are paid close attention to by the consistent follower of comparison result adds upper follower ID.
If the notice that the message splitter in insurance system receives comprises event type, the message informing that this can comprise by message splitter, to all followers in follower's list, also can be sent to the part follower in list.For the part follower be sent to, can be the follower corresponding with the event type of message.This situation is relatively clearer and more definite, repeats no more.The event type this comprised for message splitter is sent to the situation of all followers in follower's list, notified each follower, the event type of this message and the event type self paid close attention to can be compared, the message that these needs are paid close attention to by the consistent follower of comparison result is sent in database after adding upper follower ID.
If do not comprise event type and message in the notice that receives of message splitter in insurance system, the notice that this can not comprised message and event type by message splitter is sent to all followers in follower's list.Follower can obtain message from message receiver, and then analyzes message content, such as, determine the event type of the message received, and analyzes the message event type that obtains with follower oneself for decision and whether pay close attention to the foundation of this message.Further, if certain follower determines to need to pay close attention to this message, be then sent in database after the message that this follower also can realize these needs to pay close attention to adds upper follower ID.This all class situation is no longer separately stated with independent accompanying drawing.
Details in other specific implementation process, can execute example in conjunction with aforementioned system and method and obtain, not repeat them here.
Such for actual central similar insurance system, the situation that in insurance system, the kind of insurance increases, the maintenance of prior art can become increasingly complex, and development efficiency reduces.This is because in prior art, each insurance kind needs singly to read configuration messages monitoring queue, also will avoid the message queue receiving other insurance kinds simultaneously.If certain message by its insurance kind garbled-reception not corresponding, then really needs the insurance kind processing this message may will cannot receive this message.Like this, the mistake of system can be caused, carrying out smoothly of impact transaction.Adopt the mode of the above embodiments of the present application, in message processing procedure, MOM server only need send a piece of news, and MOM server does not need the recipient being concerned about this message.Which can realize, to the confirmation of message by the message processor processes of follower and correspondence thereof, reducing MOM server stress by message splitter or by follower.New insurance kind is being had to produce, can according to insurance kind own service logic, the follower that increase is corresponding and message handling device just can realize the monitoring process to this message, and be very easy to expansion, development efficiency also significantly improves.Or when having the concern relation of insurance kind to need to change, the own service logic after changing according to insurance kind, revises corresponding follower and message handling device, just can realize the correct monitoring process to message, be also very easy to expansion, development efficiency also significantly improves.
Follow-up, the mode of asynchronous process can being adopted, namely making follower need not make response immediately when having learnt that message arrives, but response can be made to the message arrived again in other moment.The benefit of this asynchronous process mode is apparent.Concrete, can by the message stores that will arrive in database, the such as step of aforementioned corresponding S940; Afterwards, the step of corresponding S950, S960 is performed.
In addition, the follow-up process that can also perform corresponding S970, S980, this kind of process can ensure the success rate of Message Processing, and provides warning to the message that temporarily success processes, thus the system that is beneficial to is follow-up takes further step.And, to the message that success processes, delete from database after confirming successfully process, be beneficial to the utilance keeping storage space of database.
System, device, module or unit that above-described embodiment is illustrated, specifically can be realized by computer chip or entity, or be realized by the product with certain function.
For convenience of description, various unit is divided into describe respectively with function when describing above device.Certainly, the function of each unit can be realized in same or multiple software and/or hardware when implementing the application.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the application can add required general hardware platform by software and realizes.Based on such understanding, the technical scheme of the application can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the application or embodiment.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
The application can be used in numerous general or special purpose computing system environment or configuration.Such as: personal computer, server computer, handheld device or portable set, laptop device, multicomputer system, system, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, the distributed computing environment (DCE) comprising above any system or equipment etc. based on microprocessor.
The application can describe in the general context of computer executable instructions, such as program module.Usually, program module comprises the routine, program, object, assembly, data structure etc. that perform particular task or realize particular abstract data type.Also can put into practice the application in a distributed computing environment, in these distributed computing environment (DCE), be executed the task by the remote processing devices be connected by communication network.In a distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium comprising memory device.
Although depict the application by embodiment, those of ordinary skill in the art know, the application has many distortion and change and do not depart from the spirit of the application, and the claim appended by wishing comprises these distortion and change and do not depart from the spirit of the application.

Claims (24)

1. a message delivery method, is characterized in that, comprising:
Publisher gives out information message-oriented middleware server;
Message-oriented middleware server receives the message that described publisher issues, and the message of this reception is placed in queue;
Message receiver monitors the queue on described message-oriented middleware server, and after listening to described queue has message, the message in described queue is fetched, and notification message splitter;
Message splitter obtains message follower list after receiving described notice, and notifies the follower in follower's list;
Message is sent to message handling device corresponding to this follower by notified follower.
2. the method for claim 1, is characterized in that, the notice that described message splitter receipt message receiver is sent, and specifically comprises:
The notice comprising message that message splitter receipt message receiver is sent; Or,
The notice comprising message and event type that message splitter receipt message receiver is sent; Or,
The notice comprising event type that message splitter receipt message receiver is sent; Or
The notice not comprising message and event type that message splitter receipt message receiver is sent.
3. method as claimed in claim 1 or 2, it is characterized in that, described message splitter notifies the follower in follower's list, specifically comprises:
Message splitter notifies the follower corresponding with the event type of message in follower's list; Or,
Message splitter notifies the whole followers in follower's list.
4. the method for claim 1, is characterized in that, message is sent to message handling device corresponding to this follower by described notified follower, specifically comprises:
The message that these needs are paid close attention to by notified follower is sent in database after adding upper follower's mark;
Task dispatcher is timed to poll in database, if there is the message of storage, then reads follower's mark that this message marks, and according to follower's identifier lookup that this message marks message handling device that also notice is corresponding.
5. the method for claim 1, is characterized in that, described notified follower also comprises after message being sent to message handling device corresponding to this follower:
If described message handling device performs Message Processing success, then the treatment state of this message in database is updated to successfully; Or,
If described message handling device performs Message Processing failure, then the treatment state of this message in database is updated to failure, the time of next retry processing is set, and the number of retries of this message accumulative.
6. method as claimed in claim 5, it is characterized in that, described method also comprises:
The treatment state of each message is inquired about in database timing, is that successful message performs delete processing for treatment state; Or message number of retries being met or exceeded to predetermined value sends system alarm.
7. method as claimed in claim 5, is characterized in that:
The number of described queue is 1; Or,
The number of described queue is greater than 1, is less than subscriber's number.
8. a messaging system, is characterized in that, comprises publisher, message-oriented middleware server, message receiver, message splitter, at least two followers, wherein,
Publisher, for the message-oriented middleware server that gives out information;
Message-oriented middleware server, for receiving the message that described publisher issues, and is placed in queue by the message of this reception;
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to message handling device corresponding to this follower by message after receiving the notice that message splitter sends.
9. system as claimed in claim 8, is characterized in that, the notice that the message receiver that described message splitter receives is sent specifically comprises:
Comprise the notice of message; Or,
Comprise the notice of message and event type; Or,
Comprise the notice of event type; Or
Do not comprise the notice of message and event type.
10. the system according to any one of claim 8-9, is characterized in that, described message splitter notifies the follower in follower's list, specifically comprises:
The follower corresponding with the event type of message; Or,
Whole followers in follower's list.
11. systems as claimed in claim 8, is characterized in that:
The number of described queue is 1; Or,
The number of described queue is greater than 1, is less than subscriber's number.
12. 1 kinds of messaging systems, is characterized in that, comprise publisher, message-oriented middleware server, message receiver, message splitter, at least two followers, wherein,
Publisher, for the message-oriented middleware server that gives out information;
Message-oriented middleware server, for receiving the message that described publisher issues, and is placed in queue by the message of this reception;
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to database after follower's mark on message being added after receiving the notice that message splitter sends;
Database, for storing the message sent;
Task dispatcher, the message on polling data storehouse, and message is sent to corresponding message handling device.
13. systems as claimed in claim 12, is characterized in that, the notice that the message receiver that described message splitter receives is sent, and specifically comprise:
Comprise the notice of message; Or,
Comprise the notice of message and event type; Or,
Comprise the notice of event type; Or
Do not comprise the notice of message and event type.
14. systems according to any one of claim 12-13, it is characterized in that, described message splitter notifies the follower in follower's list, specifically comprises:
The follower corresponding with the event type of message; Or,
Whole followers in follower's list.
15. systems as claimed in claim 12, is characterized in that:
The number of described queue is 1; Or,
The number of described queue is greater than 1, is less than subscriber's number.
16. 1 kinds of receiving terminals, is characterized in that, comprising: message receiver, message splitter, at least two followers, wherein,
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to message handling device corresponding to this follower by message after receiving the notice that message splitter sends.
17. receiving terminals as claimed in claim 16, is characterized in that, the notice that the message receiver that described message splitter receives is sent, and specifically comprise:
Comprise the notice of message; Or,
Comprise the notice of message and event type; Or,
Comprise the notice of event type; Or
Do not comprise the notice of message and event type.
18. receiving terminals according to any one of claim 16-17, it is characterized in that, described message splitter notifies the follower in follower's list, specifically comprises:
The follower corresponding with the event type of message; Or,
Whole followers in follower's list.
19. receiving terminals as claimed in claim 16, is characterized in that:
The number of described queue is 1; Or,
The number of described queue is greater than 1, is less than subscriber's number.
20. 1 kinds of receiving terminals, is characterized in that, comprising: message receiver, message splitter, at least two followers, wherein,
Message receiver, for monitoring the queue on described message-oriented middleware server, and after listening to described queue has message, fetches the message in described queue, and notification message splitter;
Message splitter, obtains message follower list, and notifies the follower in follower's list after receiving notice that message receiver sends;
Follower, for being sent to database after follower's mark on message being added after receiving the notice that message splitter sends;
Database, for storing the message sent;
Task dispatcher, the message on polling data storehouse, and message is sent to corresponding message handling device.
21. receiving terminals as claimed in claim 20, is characterized in that, the notice that the message receiver that described message splitter receives is sent, and specifically comprise:
Comprise the notice of message; Or,
Comprise the notice of message and event type; Or,
Comprise the notice of event type; Or
Do not comprise the notice of message and event type.
22. receiving terminals according to any one of claim 20-21, it is characterized in that, described message splitter notifies the follower in follower's list, specifically comprises:
The follower corresponding with the event type of message; Or,
Whole followers in follower's list.
23. systems as claimed in claim 20, is characterized in that:
The number of described queue is 1; Or,
The number of described queue is greater than 1, is less than subscriber's number.
24. 1 kinds of message-oriented middleware servers, is characterized in that, are applied to subscriber's number and are greater than in the system of 1, the message that described message-oriented middleware server is issued for receiving publisher, and the message of this reception is placed in queue;
Described number of queues is 1; Or,
Described number of queues is greater than 1, is less than subscriber's number.
CN201310481661.6A 2013-10-15 2013-10-15 Message delivery method and system and MOM servers, receiving terminal Active CN104579905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310481661.6A CN104579905B (en) 2013-10-15 2013-10-15 Message delivery method and system and MOM servers, receiving terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310481661.6A CN104579905B (en) 2013-10-15 2013-10-15 Message delivery method and system and MOM servers, receiving terminal

Publications (2)

Publication Number Publication Date
CN104579905A true CN104579905A (en) 2015-04-29
CN104579905B CN104579905B (en) 2018-11-06

Family

ID=53095153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310481661.6A Active CN104579905B (en) 2013-10-15 2013-10-15 Message delivery method and system and MOM servers, receiving terminal

Country Status (1)

Country Link
CN (1) CN104579905B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371697A (en) * 2016-08-31 2017-02-01 蒋欣飏 Digital information forwarding method
CN106487569A (en) * 2015-09-02 2017-03-08 阿里巴巴集团控股有限公司 A kind of service message processing method and device
CN106557970A (en) * 2015-09-29 2017-04-05 北京京东尚科信息技术有限公司 A kind of method and apparatus for processing VAT invoice reimbursement information
CN106792234A (en) * 2016-12-31 2017-05-31 天脉聚源(北京)科技有限公司 A kind of method and apparatus of display activity follower message information
CN107465735A (en) * 2017-07-31 2017-12-12 杭州多麦电子商务股份有限公司 Distributed information system
CN107688489A (en) * 2016-08-03 2018-02-13 北京京东尚科信息技术有限公司 A kind of method and system of scheduler task
CN108196961A (en) * 2017-12-28 2018-06-22 广东蜂助手网络技术股份有限公司 A kind of asynchronous message processing method, terminal, system and storage medium
WO2018171543A1 (en) * 2017-03-24 2018-09-27 阿里巴巴集团控股有限公司 Method and device for broadcasting messages
CN110471780A (en) * 2019-08-21 2019-11-19 北京百佑科技有限公司 Distributed event processing unit, terminal and computer storage medium
CN110784354A (en) * 2019-10-30 2020-02-11 北京大米未来科技有限公司 Data processing method, device, system and readable storage medium
CN111866191A (en) * 2020-09-24 2020-10-30 深圳市易博天下科技有限公司 Message event distribution method, distribution platform, system and server
CN112671877A (en) * 2020-12-16 2021-04-16 中国建设银行股份有限公司 Data processing method and device
CN115269235A (en) * 2022-09-28 2022-11-01 深圳华锐分布式技术股份有限公司 Message carrying method, device, equipment and medium based on components of different versions

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089856A (en) * 2007-07-20 2007-12-19 李沫南 Method for abstracting network data and web reptile system
CN101183377A (en) * 2007-12-10 2008-05-21 华中科技大学 High availability data-base cluster based on message middleware
CN101340400A (en) * 2008-08-29 2009-01-07 中兴通讯股份有限公司 Asynchronous message processing method and system
CN103218724A (en) * 2013-04-18 2013-07-24 北京京东尚科信息技术有限公司 System and method for providing information updating in communication network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089856A (en) * 2007-07-20 2007-12-19 李沫南 Method for abstracting network data and web reptile system
CN101183377A (en) * 2007-12-10 2008-05-21 华中科技大学 High availability data-base cluster based on message middleware
CN101340400A (en) * 2008-08-29 2009-01-07 中兴通讯股份有限公司 Asynchronous message processing method and system
CN103218724A (en) * 2013-04-18 2013-07-24 北京京东尚科信息技术有限公司 System and method for providing information updating in communication network

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487569A (en) * 2015-09-02 2017-03-08 阿里巴巴集团控股有限公司 A kind of service message processing method and device
CN106557970A (en) * 2015-09-29 2017-04-05 北京京东尚科信息技术有限公司 A kind of method and apparatus for processing VAT invoice reimbursement information
CN107688489B (en) * 2016-08-03 2021-01-26 北京京东尚科信息技术有限公司 Method and system for scheduling tasks
CN107688489A (en) * 2016-08-03 2018-02-13 北京京东尚科信息技术有限公司 A kind of method and system of scheduler task
CN106371697A (en) * 2016-08-31 2017-02-01 蒋欣飏 Digital information forwarding method
CN106792234A (en) * 2016-12-31 2017-05-31 天脉聚源(北京)科技有限公司 A kind of method and apparatus of display activity follower message information
WO2018171543A1 (en) * 2017-03-24 2018-09-27 阿里巴巴集团控股有限公司 Method and device for broadcasting messages
US11003514B2 (en) 2017-03-24 2021-05-11 Advanced New Technologies Co., Ltd. Methods and devices for broadcasting messages
RU2730039C1 (en) * 2017-03-24 2020-08-14 Алибаба Груп Холдинг Лимитед Method and device for broadcasting messages
US10824485B2 (en) 2017-03-24 2020-11-03 Alibaba Group Holding Limited Methods and devices for broadcasting messages
CN107465735B (en) * 2017-07-31 2020-08-14 杭州多麦电子商务股份有限公司 Distributed messaging system
CN107465735A (en) * 2017-07-31 2017-12-12 杭州多麦电子商务股份有限公司 Distributed information system
CN108196961B (en) * 2017-12-28 2020-05-12 蜂助手股份有限公司 Asynchronous message processing method, terminal, system and storage medium
CN108196961A (en) * 2017-12-28 2018-06-22 广东蜂助手网络技术股份有限公司 A kind of asynchronous message processing method, terminal, system and storage medium
CN110471780A (en) * 2019-08-21 2019-11-19 北京百佑科技有限公司 Distributed event processing unit, terminal and computer storage medium
CN110471780B (en) * 2019-08-21 2022-04-26 北京百佑科技有限公司 Distributed event processing apparatus, terminal, and computer storage medium
CN110784354A (en) * 2019-10-30 2020-02-11 北京大米未来科技有限公司 Data processing method, device, system and readable storage medium
CN111866191A (en) * 2020-09-24 2020-10-30 深圳市易博天下科技有限公司 Message event distribution method, distribution platform, system and server
CN112671877A (en) * 2020-12-16 2021-04-16 中国建设银行股份有限公司 Data processing method and device
CN115269235A (en) * 2022-09-28 2022-11-01 深圳华锐分布式技术股份有限公司 Message carrying method, device, equipment and medium based on components of different versions

Also Published As

Publication number Publication date
CN104579905B (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN104579905A (en) Message passing method and system, MOM (message oriented middleware) server and receiving terminal
CN108449410B (en) Message management method, system and related device in cloud platform
CN102469033B (en) Message subscription system and message sending method
US8843580B2 (en) Criteria-based message publication control and feedback in a publish/subscribe messaging environment
CN112788074B (en) Data transmitting method, processing method, receiving method, apparatus thereof, and storage medium
US8615580B2 (en) Message publication feedback in a publish/subscribe messaging environment
US8793322B2 (en) Failure-controlled message publication and feedback in a publish/subscribe messaging environment
CN112667414A (en) Message queue-based message consumption method and device, computer equipment and medium
US8484281B2 (en) System and method for callbacks based on web service addressing
CN101917394B (en) Middleware system for sharing data in mobile phone equipment and working method
CN113179324B (en) Block chain link point and service processing method executed by block chain link point
CN112783672A (en) Remote procedure call processing method and system
CN113364852A (en) File transmission method and device and server
JP2005346573A (en) Web service providing method, server device and client terminal in web service system, web service system, web service program, and recording medium
CN111510493A (en) Distributed data transmission method and device
CN111124717A (en) Message delivery method, system and computer storage medium
JP2009026221A (en) Business process operation management system, method, process operation management device, and its program
CN116684468B (en) Data processing method, device, equipment and storage medium
CN112910987A (en) Message pushing method, system, device, equipment and storage medium
CN113765871A (en) Fortress management method and device
CN113645260A (en) Service retry method, device, storage medium and electronic equipment
CN112187916B (en) Cross-system data synchronization method and device
CN111049938B (en) Message notification method and device, electronic equipment and readable storage medium
CN110247808B (en) Information transmission method, device, equipment and readable storage medium
CN113779021A (en) Data processing method, device, computer system and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191218

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, British Cayman Islands

Patentee after: Innovative advanced technology Co., Ltd

Address before: Greater Cayman, British Cayman Islands

Patentee before: Alibaba Group Holding Co., Ltd.