CN109391646A - Message-oriented middleware message acquisition method, device and system - Google Patents

Message-oriented middleware message acquisition method, device and system Download PDF

Info

Publication number
CN109391646A
CN109391646A CN201710658525.8A CN201710658525A CN109391646A CN 109391646 A CN109391646 A CN 109391646A CN 201710658525 A CN201710658525 A CN 201710658525A CN 109391646 A CN109391646 A CN 109391646A
Authority
CN
China
Prior art keywords
message
processing
target
progress
processing state
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
CN201710658525.8A
Other languages
Chinese (zh)
Other versions
CN109391646B (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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201710658525.8A priority Critical patent/CN109391646B/en
Publication of CN109391646A publication Critical patent/CN109391646A/en
Application granted granted Critical
Publication of CN109391646B publication Critical patent/CN109391646B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/2871Implementation details of single intermediate entities

Abstract

The present invention discloses a kind of message-oriented middleware message acquisition method, device and system.This method comprises: receiving the message that Message Processing end is sent pulls request, it includes target message position in request that wherein message, which pulls,;Obtain the processing progress of message queue, wherein the processing progress be current operation before message queue slider position, the message after processing progress was never acquired;Compare target message position and processing progress;If target message position is in after processing progress, the message processing state information of target message is generated, and the message processing state is stored in message processing state caching;Target message is pushed to Message Processing end.The present invention is by the state of the update message when completing processing stage, message processing state in query messages processing status caching, and the message that processing status is met is pushed to corresponding Message Processing end, avoids Message Processing end and carry out unnecessary message acquisition.

Description

Message-oriented middleware message acquisition method, device and system
Technical field
The present invention relates to technical field of data processing, in particular to a kind of message-oriented middleware message acquisition method, device and System.
Background technique
Message-oriented middleware refers to support and ensures the middle layer of messaging data between distributed application program, and message is sent out Connection between the side of sending and processing side is entirely loose coupling, and communication is non-obstruction.Common product have RabbitMQ (MQ's Full name is Message Queue, message queue), RocketMQ etc..
The basic functional principle of message-oriented middleware are as follows: message data is stored in the message queue of server-side, Message Processing End pulls message from message queue and is handled.
Fig. 1 is the schematic diagram of existing message-oriented middleware message acquisition method.As shown in Figure 1, disappearing for existing message-oriented middleware It ceases in acquisition methods:
1, Message Processing end batch pulls message from server-side, and server-side stores the processing progress of message queue.
2, the processing result of message and state are all stored in each Message Processing end.
If 3, when Message Processing does not complete, there is exception error or since business needs retries place in Message Processing end When managing message, is pulled to the batch of server-side and be likely to get the message for having handled completion, cause to reprocess.
4, it is difficult efficiently to obtain the real-time processing status of message in the matched management inquiry system of middleware.
Existing message-oriented middleware is usually suitable from message queue by batch mode in order to guarantee the performance of Message Processing Sequence obtains message, and the processing status of message is then stored in processing end.But it is lost when there is individual messages to handle in this batch of message When losing or needing to retry processing due to business, the batch operation of processing end also can be neighbouring in message queue to target message It is processed at message carry out it is unnecessary repeat obtain.
Summary of the invention
In view of the above technical problem, the present invention provides a kind of message-oriented middleware message acquisition method, device and system, The state of update message when processing stage completes avoids Message Processing end and carries out unnecessary message acquisition.
According to an aspect of the present invention, a kind of message-oriented middleware message acquisition method is provided, comprising:
It receives the message that Message Processing end is sent and pulls request, wherein it includes target message in request that the message, which pulls, Position;
Obtain the processing progress of message queue, wherein the vernier of message queue before the processing progress is current operation Position, the message after processing progress were never acquired;
Compare target message position and processing progress;
If target message position is in after processing progress, the message processing state information of target message is generated, and will The message processing state information is stored in message processing state caching;
Target message is pushed to Message Processing end.
In one embodiment of the invention, the method also includes:
In the case where target message pushes successful situation, the message processing state information of target message is revised as having pulled, And the message processing state of target message is updated to message processing state information cache;
And/or
Message Processing end handle successfully, return processing result in the case where, by message processing state cache in target disappear The message processing state information deletion of breath.
In one embodiment of the invention, the target message position is in after progress of signing for, wherein message queue The message signed for after progress be the message for not yet receiving Message Processing end in message queue and returning to processing successful result.
In one embodiment of the invention, the method also includes:
If target message position is in processing progress position or before processing progress, judge that message processing state is slow It whether there is the message processing state information of target message in depositing;
If the message processing state information of target message is not present in message processing state caching, after target message Next message executes the step of relatively the target message position and processing progress for fresh target message as fresh target message Suddenly.
In one embodiment of the invention, the method also includes:
If in message processing state caching, there are the message processing state information of target message, according to disappearing for target message It ceases process state information and corresponding operating is carried out to target message.
In one embodiment of the invention, the message processing state information according to target message to target message into Row corresponding operating includes:
If the message processing state information of target message be it is untreated, execute and described target message be pushed at message The step of managing end;
If the message processing state information of target message be pulled, instruction message processing end to the target message into Row processing, and the step of relatively target message position and processing progress are executed to next message after target message.
According to another aspect of the present invention, a kind of scheduling message processor is provided, comprising:
Request receiving module is pulled, the message for receiving the transmission of Message Processing end pulls request, wherein the message is drawn Taking includes target message position in request;
Processing progress obtains module, for obtaining the processing progress of message queue, wherein the processing progress is current behaviour The slider position of message queue before work, the message after processing progress were never acquired;
Comparison module, for comparing target message position and processing progress;
Status message generation module, for generating target in the case where target message position is in after processing progress The message processing state information of message, and the message processing state information is stored in message processing state caching;
Message pushing module, for target message to be pushed to Message Processing end.
In one embodiment of the invention, the scheduling message processor further include:
Status message modified module is used in the case where target message pushes successful situation, by the Message Processing of target message Status information is revised as having pulled, and the message processing state of target message is updated to message processing state information cache;? Message Processing end handle successfully, return processing result in the case where, by message processing state cache in target message message at Status information is managed to delete.
In one embodiment of the invention, the target message position is in after progress of signing for, wherein message queue The message signed for after progress be the message for not yet receiving Message Processing end in message queue and returning to processing successful result.
In one embodiment of the invention, the scheduling message processor further include:
Status message enquiry module, for being in processing progress position in target message position or before processing progress In the case where, judge the message processing state information that whether there is target message in message processing state caching;In Message Processing There is no in the case where the message processing state information of target message in state cache, next message after target message is made For fresh target message, indicate that comparison module executes the behaviour of relatively the target message position and processing progress for fresh target message Make.
In one embodiment of the invention, the scheduling message processor further include:
Message processing module, for there are the message processing state information of target message in message processing state caches In the case of, corresponding operating is carried out to target message according to the message processing state information of target message.
In one embodiment of the invention, message processing state information of the message processing module in target message is In untreated situation, instruction message pushing module executes the operation that target message is pushed to Message Processing end;In mesh Mark message message processing state information be pulled in the case where, instruction message processing end to the target message at Reason, and indicate that comparison module executes relatively target message position and the processing progress to next message after target message Operation.
According to another aspect of the present invention, a kind of message-oriented middleware server-side, including message queue, Message Processing shape are provided State caching and the scheduling message processor as described in above-mentioned any embodiment.
According to another aspect of the present invention, a kind of message-oriented middleware message is provided and obtains system, including message sending end, is disappeared Cease processing end and the message-oriented middleware server-side as described in above-mentioned any embodiment.
In one embodiment of the invention, the message-oriented middleware message obtains system further include:
Inquiry system is managed, for the message processing state letter from message-oriented middleware server-side inquiry target message Breath.
Message of the present invention by the state of the update message when completing processing stage, in query messages processing status caching Processing status, the message that processing status is met are pushed to corresponding Message Processing end, and it is unnecessary to avoid the progress of Message Processing end Message obtain.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the schematic diagram of existing message-oriented middleware message acquisition method.
Fig. 2 is the schematic diagram that message-oriented middleware message of the present invention obtains system one embodiment.
Fig. 3 is the schematic diagram of message-oriented middleware message acquisition method second embodiment of the present invention.
Fig. 4 is the schematic diagram of message-oriented middleware message acquisition method 3rd embodiment of the present invention.
Fig. 5 is the schematic diagram of message-oriented middleware message acquisition method fourth embodiment of the present invention.
Fig. 6 is the schematic diagram of scheduling message processor first embodiment of the present invention.
Fig. 7 is the schematic diagram of scheduling message processor second embodiment of the present invention.
Fig. 8 is the schematic diagram of message queue in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Below Description only actually at least one exemplary embodiment be it is illustrative, never as to the present invention and its application or make Any restrictions.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Unless specifically stated otherwise, positioned opposite, the digital table of the component and step that otherwise illustrate in these embodiments It is not limited the scope of the invention up to formula and numerical value.
Simultaneously, it should be appreciated that for ease of description, the size of various pieces shown in attached drawing is not according to reality Proportionate relationship draw.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable In the case of, the technology, method and apparatus should be considered as authorizing part of specification.
It is shown here and discuss all examples in, any occurrence should be construed as merely illustratively, without It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
Fig. 2 is the schematic diagram that message-oriented middleware message of the present invention obtains system one embodiment.As shown in Fig. 2, described disappear It may include message sending end 100, Message Processing end 200 and message-oriented middleware server-side 300 that breath middleware message, which obtains system, Wherein:
Message-oriented middleware server-side 300 may include message queue 310, message processing state caching 320 and message tune Spend processor 330.
Message queue 310, for storing message body.
In an embodiment of the invention, message queue including storage offset, processing progress and signs for progress, wherein The storage offset indicates the length of message queue;The vernier position of message queue before the processing progress is current operation It sets, processing progress indicates to have pulled the position of message, and the message after processing progress was never acquired;Signing for progress indicates Sign for the position of message, the message of message queue signed for after progress is that the return of Message Processing end is not yet received in message queue Handle the message of successful result.
Fig. 8 is the schematic diagram of message queue in one embodiment of the invention.In embodiment as shown in Figure 8, the message The storage offset (store offset) of queue is 7, can store 0,1 ..., 7 totally 8 message bodies.
As shown in figure 8, the currently processed progress (pull offset, pull offset) of the message queue is 4, indicate The message body of 0-4 is pulled in current message queue, i.e., the message body of 0-4 is successfully pushed to Message Processing end;Institute Currently sign for progress (the commit offset, sign for offset) for stating message queue is 1, indicates 0-1 in current message queue Message body is signed for by Message Processing end, i.e., the message body of 0-1 is successfully processed by Message Processing end, and scheduling message Processor has received the processing structure of Message Processing end return.
Message processing state caching 320, for storing message processing state message, wherein message processing state information is to disappear Breath queue is grouped, and with the storage offset (i.e. the position of the message) of message body for the first major key, is added current with message Processing status, message acquisition time stamp, number of retries and processing next time timestamp etc. and Message Processing relevant information, all with key assignments Pair mode be written message processing state caching 320 in.
In an embodiment of the invention, message processing state caching 320 can be high-performance NoSQL (non-relational number According to library) database.
Scheduling message processor 330, for when Message Processing end is to server-side request message, scheduling message processor to be raw At message processing state information, by the relevant necessary information of Message Processing, it is slow that message processing state is written in the form of key-value pair It deposits;Handled successfully and after returning the result at Message Processing end, by message processing state cache in correspond to the information deletion of the message; When obtaining to processing end the request for pulling message, scheduling message processor 330 judges the processing status of message, will be qualified Message dilivery is to Message Processing end 200.
System and message-oriented middleware server-side, needle are obtained based on the message-oriented middleware message that the above embodiment of the present invention provides Message processing state is stored in server-side by the problem of message status is stored in each processing end to original message-oriented middleware On, state and message body separate;The state of update message when completing processing stage, while after processing is completed by message State is deleted from message processing state caching, carries out unnecessary message acquisition so as to avoid Message Processing end.
In one embodiment of the invention, as shown in Fig. 2, message-oriented middleware message acquisition system can also include Manage inquiry system 400:
Inquiry system 400 is managed, for looking into from the message processing state of the message-oriented middleware server-side 300 caching 320 Ask the message processing state information of target message.
The above embodiment of the present invention can be convenient by the way that message processing state to be stored in high-performance NoSQL database Business processing and operation maintenance personnel count message data, facilitate and control the current Status Detail of message-oriented middleware.
Fig. 2 gives the schematic diagram of message-oriented middleware message acquisition method first embodiment of the present invention.Preferably, this reality System execution can be obtained by message-oriented middleware message of the present invention by applying example.Method includes the following steps:
Step 0, it receives the message that Message Processing end is sent and pulls request, wherein it includes mesh in request that the message, which pulls, Mark message position;Obtain the processing progress of message queue, wherein the trip of message queue before the processing progress is current operation Cursor position, the message after processing progress were never acquired;Sentenced according to the processing progress of target message position and message queue Whether disconnected target message is processed.If not processed mistake, thens follow the steps 1 before target message;If quilt before target message It is processed, then follow the steps 2.
Step 1, the message processing state information of target message is generated, and the message processing state information is stored in and is disappeared It ceases in processing status caching;Step 3 is executed later.
In one embodiment of the invention, message processing state information is grouped with message queue, with message body Storage offset is the first major key, is added with message current processing status, message acquisition time stamp, number of retries and processing next time Timestamp etc. and Message Processing relevant information are all written in a manner of key-value pair in message processing state caching 320.
Step 2, scheduling message processor caches from message processing state and obtains the corresponding message processing state of target message Information.
Step 3, scheduling message processor disappears according to the corresponding message processing state information of target message by qualified Breath is delivered to Message Processing end.
Step 4, processing result is returned to scheduling message processor by Message Processing end.
Step 5, scheduling message processor is according to the processing result, to the corresponding message processing state information of target message It is updated.
In one embodiment of the invention, step 5 may include: to handle successfully and return the result at Message Processing end Afterwards, scheduling message processor by message processing state cache in correspond to the information deletion of the message.
It, will for original message-oriented middleware based on the message-oriented middleware message acquisition method that the above embodiment of the present invention provides Message status is stored in the problem of each processing end, and message processing state is stored in server-side, state and message body separation It comes;The state of update message when completing processing stage, while after processing is completed by message status from message processing state It is deleted in caching, carries out unnecessary message acquisition so as to avoid Message Processing end.
The above embodiment of the present invention can be convenient by the way that message processing state to be stored in high-performance NoSQL database Business processing and operation maintenance personnel count message data, facilitate and control the current Status Detail of message-oriented middleware.
Fig. 3 is the schematic diagram of message-oriented middleware message acquisition method second embodiment of the present invention.Preferably, the present embodiment can It is executed by scheduling message processor of the present invention.Method includes the following steps:
Step 301, it receives the message that Message Processing end 200 is sent and pulls request, wherein the message pulls wraps in request Include target message position.
Step 302, the processing progress of message queue 310 is obtained, wherein message before the processing progress is current operation The slider position of queue 310, the message after processing progress were never acquired.
Step 303, compare target message position and processing progress.
Step 304, if target message position is in after processing progress, that is, not processed mistake before target message is then given birth to Message processing state caching is stored at the message processing state information of target message, and by the message processing state information In 320.
Step 305, target message is pushed to Message Processing end 200.
In one embodiment of the invention, after step 305, the method can also include: to push in target message In successful situation, the message processing state information of target message is revised as having pulled, and by the Message Processing of target message State is updated to message processing state information cache;And/or the feelings for successfully, returning to processing result are handled at Message Processing end 200 Under condition, message processing state is cached to the message processing state information deletion of target message in 320.
Message processing state is stored on middleware services end by the above embodiment of the present invention, processing status and message body point It leaves and;The state of update message when completing processing stage, while after processing is completed by message status from Message Processing shape It is deleted in state caching, carries out unnecessary message acquisition so as to avoid Message Processing end.
Fig. 4 is the schematic diagram of message-oriented middleware message acquisition method 3rd embodiment of the present invention.Preferably, the present embodiment can It is executed by scheduling message processor of the present invention.Method includes the following steps:
Step 401, the message that scheduling message processor receives that Message Processing end 200 is sent pulls request, wherein described to disappear It includes target message position in request that breath, which pulls,.
Step 402, scheduling message processor obtains the processing progress of message queue 310, wherein the processing progress is to work as The slider position of message queue 310 before preceding operation, the message after processing progress were never acquired.
Step 403, scheduling message processor compares target message position and processing progress.If target message position is in place After reason progress, that is, not processed mistake before target message thens follow the steps 404;Otherwise, if target message position is in place Reason progress position is in front of processing progress, that is, and it is processed before target message, then follow the steps 408.
In one embodiment of the invention, the target message position is in after progress of signing for, wherein message queue The message signed for after progress be not yet to receive Message Processing end in message queue to return to the message of processing successful result (i.e. still The message that do not signed for successfully by Message Processing end).
Step 404, scheduling message processor generates the message processing state information of target message, and by the Message Processing Status information is stored in message processing state caching 320.
Step 405, target message is pushed to Message Processing end 200 by scheduling message processor.
Step 406, scheduling message processor receives the processing result that Message Processing end returns.
Step 407, scheduling message processor believes the corresponding message processing state of target message according to the processing result Breath is updated.
In one embodiment of the invention, step 407 may include: and incite somebody to action in the case where target message pushes successful situation The message processing state information of target message is revised as having pulled, and the message processing state of target message is updated at message Manage status information caching;And/or Message Processing end 200 handle successfully, return processing result in the case where, by Message Processing The message processing state information deletion of target message in state cache 320.
Step 408, scheduling message processor judges the message that whether there is target message in message processing state caching 320 Process state information.If the message processing state information of target message is not present in message processing state caching 320, step is executed Rapid 409;Otherwise, if being thened follow the steps there are the message processing state information of target message in message processing state caching 320 410。
Step 409, scheduling message processor skips the target message, using next message after the target message as new Target message, execute step 403.
Execute step 410, scheduling message processor according to the message processing state information of target message to target message into Row corresponding operating.
In one embodiment of the invention, if the message processing state information that step 410 may include: target message is It is untreated, then follow the steps 405;If the message processing state information of target message is to have pulled, instruction message processing end 200 The target message is handled, executes step 409 later.
Message processing state is stored on middleware services end by the above embodiment of the present invention, processing status and message body point It leaves and;The state of update message when completing processing stage, while after processing is completed by message status from Message Processing shape It is deleted in state caching, carries out unnecessary message acquisition so as to avoid Message Processing end.
The above embodiment of the present invention can be convenient by the way that message processing state to be stored in high-performance NoSQL database Business processing and operation maintenance personnel count message data, so that it is thin to facilitate user to control the current state of message-oriented middleware Section.
Fig. 5 is the schematic diagram of message-oriented middleware message acquisition method fourth embodiment of the present invention.Preferably, the present embodiment can It is executed by scheduling message processor of the present invention.Method includes the following steps:
Step 501, when message needs to handle again, scheduling message processor, which is recorded to retry, operates preceding message queue Slider position is denoted as processing progress, and the message after processing progress was never acquired.
In one embodiment of the invention, the message for needing to handle again refer to it is as shown in Figure 8 sign for into Spend the message body between processing progress, that is, pulled but unreceipted message body.
Step 502, message queue vernier is reset to and retries message position, carry out message batch by starting point of the position It obtains, and the message processing state in query messages processing status caching.
Step 503, if having corresponding states information in message processing state caching, it is pushed to corresponding Message Processing End.
Step 504, if not finding the message processing state information in the buffer, message is compared in message queue Position and processing progress.
Step 505, illustrate that the message has been successfully processed if smaller than processing progress, scheduling message processor skips this and disappears Breath avoids the unnecessary repetition of message and obtains.
Such as: currently processed progress is position 110, and message at position 100 before is untreated finishes, then locates again When reason, need to handle again since the message at position 100;Judge whether there there is at message each message in the 100-109 of position Status information is managed, if so, then carrying out respective handling to the message;If no, falling the message, not so as to avoid the message It is necessary to repeat to obtain.
Below by specific embodiment to the structure and function of scheduling message processor 330 in the above embodiment of the present invention into Row further illustrates.
Fig. 6 is the schematic diagram of scheduling message processor first embodiment of the present invention.As shown in fig. 6, disappearing in Fig. 2 embodiment Breath dispatch processor 330 may include pulling request receiving module 331, processing progress acquisition module 332, comparison module 333, shape State message generating module 334 and message pushing module 335, in which:
Request receiving module 331 is pulled, the message for receiving the transmission of Message Processing end 200 pulls request, wherein described It includes target message position in request that message, which pulls,.
Processing progress obtains module 332, for obtaining the processing progress of message queue 310, wherein the processing progress is The slider position of message queue 310 before current operation, the message after processing progress were never acquired.
Comparison module 333, for comparing target message position and processing progress.
Status message generation module 334, for after comparison module 333 determines that target message position is in processing progress In the case where, the message processing state information of target message is generated, and the message processing state information is stored at message It manages in state cache 320.
In one embodiment of the invention, message processing state information is grouped with message queue, with message body Storage offset is the first major key, is added with message current processing status, message acquisition time stamp, number of retries and processing next time Timestamp etc. and Message Processing relevant information are all written in a manner of key-value pair in message processing state caching 320.
Message pushing module 335, for target message to be pushed to Message Processing end 200.
Fig. 7 is the schematic diagram of scheduling message processor second embodiment of the present invention.Compared with Fig. 6 embodiment, implement in Fig. 7 In example, the scheduling message processor can also include status message modified module 336, in which:
Status message modified module 336 is used in the case where target message pushes successful situation, at the message of target message Reason status information is revised as having pulled, and the message processing state of target message is updated to message processing state information cache; Message Processing end 200 handle successfully, return processing result in the case where, by message processing state cache 320 in target message Message processing state information deletion.
In one embodiment of the invention, as shown in fig. 7, the scheduling message processor 330 can also include state Information query module 337, in which:
Status message enquiry module 337, for determining that target message position is in processing progress position in comparison module 333 Or in the case where being in front of processing progress, judge to whether there is in message processing state caching 320 at the message of target message Manage status information;It, will in the case where the message processing state information of target message is not present in message processing state caching 320 Next message after target message indicates that comparison module 333 executes the ratio for fresh target message as fresh target message Compared with the operation of target message position and processing progress.
In one embodiment of the invention, the target message position is in after progress of signing for, wherein message queue The message signed for after progress be not yet to receive Message Processing end in message queue to return to the message of processing successful result (i.e. still The message that do not signed for successfully by Message Processing end).
In one embodiment of the invention, as shown in fig. 7, the scheduling message processor 330 can also include message Processing module 338, in which:
Message processing module 338, for there are the message processing states of target message in message processing state caching 320 In the case where information, corresponding operating is carried out to target message according to the message processing state information of target message.
In one embodiment of the invention, message processing module 338 specifically can be used at the message of target message Managing status information is that instruction message pushing module 335, which executes, described to be pushed to target message at message in untreated situation Manage the operation at end 200;In the case where the message processing state information of target message is to have pulled, instruction message processing end 200 The target message is handled, and indicates that comparison module 333 executes the comparison to next message after target message The operation of target message position and processing progress.
Based on the scheduling message processor that the above embodiment of the present invention provides, for original message-oriented middleware by message status Message processing state is stored in server-side by the problem of being stored in each processing end, and state and message body separate;Locating The state of update message when the reason stage completes, while after processing is completed deleting message status from message processing state caching It removes, carries out unnecessary message acquisition so as to avoid Message Processing end.
The above embodiment of the present invention can be convenient by the way that message processing state to be stored in high-performance NoSQL database Business processing and operation maintenance personnel count message data, facilitate and control the current Status Detail of message-oriented middleware.
Message-oriented middleware server-side 300 and management inquiry system 400 described above can be implemented as executing General processor, programmable logic controller (PLC) (PLC), the digital signal processor (DSP), dedicated collection of function described herein At circuit (ASIC), field programmable gate array (FPGA), either other programmable logic device, discrete gate or transistor are patrolled Volume device, discrete hardware components or it is any appropriately combined.
So far, the present invention is described in detail.In order to avoid covering design of the invention, it is public that this field institute is not described The some details known.Those skilled in the art as described above, completely it can be appreciated how implementing technology disclosed herein Scheme.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
Description of the invention is given for the purpose of illustration and description, and is not exhaustively or will be of the invention It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.It selects and retouches It states embodiment and is to more preferably illustrate the principle of the present invention and practical application, and those skilled in the art is enable to manage The solution present invention is to design various embodiments suitable for specific applications with various modifications.

Claims (15)

1. a kind of message-oriented middleware message acquisition method characterized by comprising
It receives the message that Message Processing end is sent and pulls request, wherein it includes target message position in request that the message, which pulls,;
Obtain the processing progress of message queue, wherein the slider position of message queue before the processing progress is current operation, Message after processing progress was never acquired;
Compare target message position and processing progress;
If target message position is in after processing progress, the message processing state information of target message is generated, and will be described Message processing state information is stored in message processing state caching;
Target message is pushed to Message Processing end.
2. the method according to claim 1, wherein further include:
In the case where target message pushes successful situation, the message processing state information of target message is revised as having pulled, and will The message processing state of target message is updated to message processing state information cache;
And/or
Message Processing end handle successfully, return to processing result in the case where, by message processing state cache in target message Message processing state information deletion.
3. according to the method described in claim 2, it is characterized in that,
The target message position is in sign for progress after, wherein the message of message queue signed for after progress is message The message that Message Processing end returns to processing successful result is not yet received in queue.
4. method according to any one of claim 1-3, which is characterized in that further include:
If target message position is in processing progress position or before processing progress, judge in message processing state caching With the presence or absence of the message processing state information of target message;
It, will be next after target message if the message processing state information of target message is not present in message processing state caching A message executes described the step of comparing target message position and processing progress as fresh target message, for fresh target message.
5. according to the method described in claim 4, it is characterized by further comprising:
If in message processing state caching, there are the message processing state information of target message, at the message of target message It manages status information and corresponding operating is carried out to target message.
6. according to the method described in claim 5, it is characterized in that, the message processing state information pair according to target message Target message carries out corresponding operating
If the message processing state information of target message be it is untreated, execute and described target message be pushed to Message Processing end The step of;
If the message processing state information of target message be pulled, instruction message processing end to the target message at Reason, and the step of relatively target message position and processing progress are executed to next message after target message.
7. a kind of scheduling message processor characterized by comprising
Request receiving module is pulled, the message for receiving the transmission of Message Processing end pulls request, wherein the message, which pulls, asks It include target message position in asking;
Processing progress obtain module, for obtaining the processing progress of message queue, wherein the processing progress be current operation it The slider position of preceding message queue, the message after processing progress were never acquired;
Comparison module, for comparing target message position and processing progress;
Status message generation module, for generating target message in the case where target message position is in after processing progress Message processing state information, and by the message processing state information be stored in message processing state caching in;
Message pushing module, for target message to be pushed to Message Processing end.
8. scheduling message processor according to claim 7, which is characterized in that further include:
Status message modified module is used in the case where target message pushes successful situation, by the message processing state of target message Information is revised as having pulled, and the message processing state of target message is updated to message processing state information cache;In message Processing end handle successfully, return processing result in the case where, by message processing state cache in target message Message Processing shape State information deletion.
9. scheduling message processor according to claim 8, which is characterized in that
The target message position is in sign for progress after, wherein the message of message queue signed for after progress is message The message that Message Processing end returns to processing successful result is not yet received in queue.
10. the scheduling message processor according to any one of claim 7-9, which is characterized in that further include:
Status message enquiry module, for being in processing progress position or the feelings before processing progress in target message position Under condition, the message processing state information that whether there is target message in message processing state caching is judged;In message processing state In the case where the message processing state information that target message is not present in caching, using next message after target message as new Target message, instruction comparison module execute the operation of relatively the target message position and processing progress for fresh target message.
11. scheduling message processor according to claim 10, which is characterized in that further include:
Message processing module, for the case where there are the message processing state information of target message in message processing state caches Under, corresponding operating is carried out to target message according to the message processing state information of target message.
12. scheduling message processor according to claim 11, which is characterized in that
Message processing module is used in the case where the message processing state information of target message is untreated situation, instruction message push Module executes the operation that target message is pushed to Message Processing end;It is in the message processing state information of target message In the case where pulling, instruction message processing end handles the target message, and after indicating comparison module to target message Next message execute it is described relatively target message position and processing progress operation.
13. a kind of message-oriented middleware server-side, which is characterized in that including message queue, message processing state caching and as weighed Benefit requires scheduling message processor described in any one of 7-12.
14. a kind of message-oriented middleware message obtains system, which is characterized in that including message sending end, Message Processing end, Yi Jiru Message-oriented middleware server-side described in claim 13.
15. message-oriented middleware message according to claim 14 obtains system, which is characterized in that further include:
Inquiry system is managed, for the message processing state information from message-oriented middleware server-side inquiry target message.
CN201710658525.8A 2017-08-04 2017-08-04 Message middleware message acquisition method, device and system Active CN109391646B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710658525.8A CN109391646B (en) 2017-08-04 2017-08-04 Message middleware message acquisition method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710658525.8A CN109391646B (en) 2017-08-04 2017-08-04 Message middleware message acquisition method, device and system

Publications (2)

Publication Number Publication Date
CN109391646A true CN109391646A (en) 2019-02-26
CN109391646B CN109391646B (en) 2021-08-17

Family

ID=65413027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710658525.8A Active CN109391646B (en) 2017-08-04 2017-08-04 Message middleware message acquisition method, device and system

Country Status (1)

Country Link
CN (1) CN109391646B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417910A (en) * 2019-08-07 2019-11-05 北京达佳互联信息技术有限公司 Sending method, device, server and the storage medium of notification message
CN110535787A (en) * 2019-07-25 2019-12-03 北京奇艺世纪科技有限公司 Information consumption method, apparatus and readable storage medium storing program for executing
CN110719318A (en) * 2019-09-06 2020-01-21 上海陆家嘴国际金融资产交易市场股份有限公司 Message processing method and system
CN111078422A (en) * 2019-11-19 2020-04-28 泰康保险集团股份有限公司 Message processing method, message processing device, readable storage medium and electronic equipment
CN111078425A (en) * 2019-11-28 2020-04-28 东软集团股份有限公司 Message processing method and device, storage medium and electronic equipment
CN112468404A (en) * 2020-11-24 2021-03-09 苏宁云计算有限公司 Method, device and system for controlling message traffic
CN113641515A (en) * 2021-08-02 2021-11-12 北京达佳互联信息技术有限公司 Message processing method, device and system, electronic equipment and storage medium
CN114338604A (en) * 2021-12-31 2022-04-12 北京奇艺世纪科技有限公司 DNS configuration updating method and system
CN114513513A (en) * 2022-02-15 2022-05-17 湖南快乐阳光互动娱乐传媒有限公司 Data processing method and device based on message middleware
CN114827156A (en) * 2022-03-28 2022-07-29 阿里巴巴(中国)有限公司 Message scheduling method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577551A (en) * 2013-10-16 2014-02-12 青岛海信传媒网络技术有限公司 Method and device for submitting data to database in batch
CN103856393A (en) * 2013-07-09 2014-06-11 携程计算机技术(上海)有限公司 Distributed message-oriented middleware system based on database and operating method thereof
CN104794119A (en) * 2014-01-17 2015-07-22 阿里巴巴集团控股有限公司 Middleware message storage and transmission method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856393A (en) * 2013-07-09 2014-06-11 携程计算机技术(上海)有限公司 Distributed message-oriented middleware system based on database and operating method thereof
CN103577551A (en) * 2013-10-16 2014-02-12 青岛海信传媒网络技术有限公司 Method and device for submitting data to database in batch
CN104794119A (en) * 2014-01-17 2015-07-22 阿里巴巴集团控股有限公司 Middleware message storage and transmission method and system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535787A (en) * 2019-07-25 2019-12-03 北京奇艺世纪科技有限公司 Information consumption method, apparatus and readable storage medium storing program for executing
CN110417910A (en) * 2019-08-07 2019-11-05 北京达佳互联信息技术有限公司 Sending method, device, server and the storage medium of notification message
CN110719318B (en) * 2019-09-06 2022-06-21 未鲲(上海)科技服务有限公司 Message processing method and system
CN110719318A (en) * 2019-09-06 2020-01-21 上海陆家嘴国际金融资产交易市场股份有限公司 Message processing method and system
CN111078422A (en) * 2019-11-19 2020-04-28 泰康保险集团股份有限公司 Message processing method, message processing device, readable storage medium and electronic equipment
CN111078422B (en) * 2019-11-19 2023-09-12 泰康保险集团股份有限公司 Message processing method, message processing device, readable storage medium, and electronic apparatus
CN111078425A (en) * 2019-11-28 2020-04-28 东软集团股份有限公司 Message processing method and device, storage medium and electronic equipment
CN111078425B (en) * 2019-11-28 2023-12-15 东软集团股份有限公司 Message processing method and device, storage medium and electronic equipment
CN112468404A (en) * 2020-11-24 2021-03-09 苏宁云计算有限公司 Method, device and system for controlling message traffic
CN112468404B (en) * 2020-11-24 2022-10-11 深圳市云网万店科技有限公司 Method, device and system for controlling message traffic
CN113641515A (en) * 2021-08-02 2021-11-12 北京达佳互联信息技术有限公司 Message processing method, device and system, electronic equipment and storage medium
CN114338604A (en) * 2021-12-31 2022-04-12 北京奇艺世纪科技有限公司 DNS configuration updating method and system
CN114513513A (en) * 2022-02-15 2022-05-17 湖南快乐阳光互动娱乐传媒有限公司 Data processing method and device based on message middleware
CN114827156A (en) * 2022-03-28 2022-07-29 阿里巴巴(中国)有限公司 Message scheduling method, device, equipment and storage medium
CN114827156B (en) * 2022-03-28 2023-12-01 阿里巴巴(中国)有限公司 Message scheduling method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109391646B (en) 2021-08-17

Similar Documents

Publication Publication Date Title
CN109391646A (en) Message-oriented middleware message acquisition method, device and system
US11550618B2 (en) Transaction commit operations with thread decoupling
CN102236705B (en) The fine granularity that data base resets synchronizes
EP2551854A1 (en) System for updating an associative memory
US20120191680A1 (en) Asynchronous Deletion of a Range of Messages Processed by a Parallel Database Replication Apply Process
US10572508B2 (en) Consistent query execution in hybrid DBMS
CN107835983A (en) Backup-and-restore is carried out in distributed data base using consistent database snapshot
US8527559B2 (en) Garbage collector with concurrent flipping without read barrier and without verifying copying
CN104346458B (en) Date storage method and storage device
JP7030831B2 (en) Manage large association sets with optimized bitmap representations
US20220318193A1 (en) Executing a conditional command on an object stored in a storage system
CN104598570B (en) The grasping means of resource and device
US9031909B2 (en) Provisioning and/or synchronizing using common metadata
CN109144785A (en) Method and apparatus for Backup Data
WO2022048329A1 (en) Menu display method and apparatus
CN109981715A (en) A kind of method and device of session management
WO2017095717A1 (en) Real-time change data from disparate sources
US11893041B2 (en) Data synchronization between a source database system and target database system
US8600990B2 (en) Interacting methods of data extraction
US11726979B2 (en) Determining a chronological order of transactions executed in relation to an object stored in a storage system
US20110302375A1 (en) Multi-Part Aggregated Variable in Structured External Storage
US10664329B2 (en) Determining system information based on object mutation events
CN113950145B (en) Data processing method and device
CN111213138A (en) Index splitting in distributed databases
CN115357641A (en) Data query method and device, electronic equipment and storage medium

Legal Events

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

Effective date of registration: 20220207

Address after: 100007 room 205-32, floor 2, building 2, No. 1 and No. 3, qinglonghutong a, Dongcheng District, Beijing

Patentee after: Tianyiyun Technology Co.,Ltd.

Address before: No.31, Financial Street, Xicheng District, Beijing, 100033

Patentee before: CHINA TELECOM Corp.,Ltd.