CN109729148A - A kind of message treatment method, system and equipment - Google Patents
A kind of message treatment method, system and equipment Download PDFInfo
- Publication number
- CN109729148A CN109729148A CN201811455164.8A CN201811455164A CN109729148A CN 109729148 A CN109729148 A CN 109729148A CN 201811455164 A CN201811455164 A CN 201811455164A CN 109729148 A CN109729148 A CN 109729148A
- Authority
- CN
- China
- Prior art keywords
- information
- message
- consumption
- elasticsearch
- production
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Computer And Data Communications (AREA)
Abstract
The embodiment of the invention provides a kind of message treatment method, system and equipment, wherein the system includes: the message manufacturing side, messaging service end, information consumption end and search server Elasticsearch;The message manufacturing side sends message request to messaging service end for sending production information to Elasticsearch;Information consumption end sends consumer requests to messaging service end for sending consumption information to Elasticsearch;Messaging service end, for receiving the message request of message manufacturing side transmission;Receive the consumer requests that information consumption end is sent;Storage information is sent to Elasticsearch;Elasticsearch stores information for receiving and storing production information.It so, it is possible the information in record message lifecycle, make it possible to these information according to record, troubleshooting is more easily carried out during troubleshooting, simplify troubleshooting process.
Description
Technical field
The present invention relates to Internet technical fields, more particularly to a kind of message treatment method, system and equipment.
Background technique
Message system is because of its traditional functional characteristics: the asynchronous decoupling called between system, the complexity for lowering system, flow
Peak load shifting, stretch convenient for business resiliency, be easily achieved final consistency system, avoid distributed transaction to the shadow of performance
It rings, support P2P (point-to-point calling) and pub/sub (publish/subscribe) mode, reduction RPC (Remote Procedure
Call Protocol, remote procedure call protocol) multiple calling) etc..It is widely used in Internet enterprises, respectively at present
Class operation system has its figure.In addition with the rapid growth of business, enterprises need the synchronous transfer of mass data,
The application such as streaming computing requires highly stable efficient transmission channel and gives to support, message system wherein act as it is important
Role.
To the treatment process of message in message system, it can generally be related to multiple processing stages, such as message production phase, message
Consumer phase;Multiple processing sides will be accordingly related to, such as the producer in the message production phase, disappearing in the information consumption stage
Fei Fang and the server-side of message system etc..In this way, troubleshooting process when message processing procedure can be made to break down compares
It is complicated.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of message treatment method, system and equipment, more convenient to realize
Ground carries out troubleshooting during troubleshooting, simplifies troubleshooting process.Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of message handling systems, comprising: the message manufacturing side, messaging service
End, information consumption end and search server Elasticsearch;
The message manufacturing side, for sending the production information about the message production phase to the Elasticsearch,
Message request is sent to the messaging service end;
The information consumption end, for sending the consumption information about the information consumption stage to the Elasticsearch,
Consumer requests are sent to the messaging service end;
The messaging service end, the message request sent for receiving the message manufacturing side;Receive the message
The consumer requests that consumption terminal is sent;The storage information about message memory phase is sent to the Elasticsearch;
The Elasticsearch, for receiving the production information, the storage information and the consumption information;
Store the production information, the storage information and the consumption information.
Optionally, the message manufacturing side, specifically for the Software Development Kit SDK by encapsulating in advance, calling is answered
The production information is sent to the Elasticsearch with routine interface API;
The messaging service end is specifically used for sending by calls application interface API to the Elasticsearch
The storage information;
Application program is called to connect specifically for the Software Development Kit SDK by encapsulating in advance in the information consumption end
Mouth API sends the consumption information to the Elasticsearch.
Optionally, the production information, the storage information and the consumption information include the message mark of the message
Know;
The Elasticsearch is associated with the production information, institute specifically for the message identifier according to the message
State storage information and the consumption information;The production information, the storage information and the consumption information after showing association.
Second aspect, the embodiment of the invention provides a kind of message treatment methods, comprising:
The production information about the message production phase that the message manufacturing side is sent is received, the pass that messaging service end is sent is received
In the storage information of message memory phase, and receive the consumption information about the information consumption stage that information consumption end is sent;
Store the production information, the storage information and the consumption information.
Optionally, the production information, the storage information and the consumption information include the message mark of the message
Know;
The method also includes:
According to the message identifier of the message, it is associated with the production information, the storage information and the consumption information;
The production information, the storage information and the consumption information after showing association.
The third aspect, the embodiment of the invention provides a kind of search server Elasticsearch, comprising:
Receiving module receives message for receiving the production information about the message production phase of message manufacturing side transmission
The storage information about message memory phase that server-side is sent, receive that information consumption end sends about the information consumption stage
Consumption information;
Memory module, for storing the production information, the storage information and the consumption information.
Optionally, the production information, the storage information and the consumption information include the message mark of the message
Know;
The Elasticsearch further include:
Relating module is associated with the production information, the storage information and institute for the message identifier according to the message
State consumption information;
Display module, for the production information, storage letter by Log Analysis System ELK, after showing association
Breath and the consumption information.
Fourth aspect, the embodiment of the invention provides a kind of message manufacturing sides, comprising:
First sending module, for sending message request to messaging service end, the message request includes the message of message
Content;
Second sending module, for sending the production about the message production phase to search server Elasticsearch
Information, so that the Elasticsearch is stored and shown the production information according to the message identifier of the message;Wherein,
The production information includes message production client information, sends the sending time of the message and the message identifier of the message;
5th aspect, the embodiment of the invention provides a kind of messaging service ends, comprising:
First receiving module, for receiving the message request of message manufacturing side transmission, the message request includes described disappears
The message content of breath;
Second receiving module, for receiving the consumer requests of information consumption end transmission;
Third sending module, for sending the storage about message memory phase to search server Elasticsearch
Information, so that the Elasticsearch is stored and shown the storage information according to the message identifier of the message;Wherein,
The storage information includes the message identifier and the storage time for saving the message.
6th aspect, the embodiment of the invention provides a kind of information consumption ends, comprising:
4th sending module, for sending consumer requests to messaging service end;
5th sending module, for sending the consumption about the information consumption stage to search server Elasticsearch
Information, so that the Elasticsearch is stored and shown the consumption information according to the message identifier of the message;Wherein,
The consumption information includes the time-consuming of the message identifier, the consumption status of the message and the information consumption.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable
Instruction is stored in storage medium, when run on a computer, so that computer executes the step of method described in second aspect
Suddenly.
At the another aspect that the present invention is implemented, the embodiment of the invention also provides a kind of, and the computer program comprising instruction is produced
Product, when run on a computer, so that computer executes method and step described in second aspect.
In message treatment method provided in an embodiment of the present invention, system and equipment, Elasticsearc can receive message
The production information about the message production phase that the manufacturing side is sent, receive that messaging service end sends about message memory phase
Information is stored, and receives the consumption information about the information consumption stage that information consumption end is sent;Store production information, storage
Information and consumption information.It so, it is possible the information in record message lifecycle, make it possible to these letters according to record
Breath more easily carries out troubleshooting during troubleshooting, simplifies troubleshooting process.Certainly, it implements any of the products of the present invention or square
Method must be not necessarily required to reach simultaneously above all advantages.
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.
Fig. 1 is the flow chart of message treatment method provided in an embodiment of the present invention;
Fig. 2 is the flow chart that information is shown in the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of message handling system provided in an embodiment of the present invention;
Fig. 4 is bandwagon effect schematic diagram provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of search server Elasticsearch provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of message processing device provided in an embodiment of the present 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 is described.
To the treatment process of message in message system, it can generally be related to multiple processing stages, such as message production phase, message
Consumer phase;Multiple processing sides will be accordingly related to, such as the producer in the message production phase, disappearing in the information consumption stage
Fei Fang and the server-side of message system etc..
And known message system is not specifically for message traces, it is known that message system in not will record at message
Trace information during reason can so check production phase, memory phase and consumption in message production process
The track process of stage whole life cycle also has no idea to determine the time-consuming situation in each stage etc.;And work as Message Processing mistake
In journey when something goes wrong, can not orientation problem have no idea to know which goes out in stage such as when failure is consumed at information consumption end
Problem is showed.In this way, troubleshooting process when message processing procedure can be made to break down is more complicated.
The embodiment of the invention provides a kind of message treatment method, system and equipment, can receive the transmission of the message manufacturing side
The production information about the message production phase, receive messaging service end send the storage information about message memory phase,
And receive the consumption information about the information consumption stage that information consumption end is sent;Store production information, storage information and
Consumption information.It so, it is possible the information in record message lifecycle, make it possible to these information according to record, more just
Just troubleshooting is carried out during troubleshooting, simplifies troubleshooting process.And production information, storage information and consumption information can be deposited
Storage is in third method, and storage medium: in Elasticsearch, in this way, log not rule may be implemented, reducing the disk of message system
Expense further decreases the loss to message server-side performance.
Meanwhile showing the information in message each stage, such as about the production information of message production phase, about memory phase
Storage information and consumption information about the information consumption stage, business etc. can be made to understand each stage condition of message, be
It is no by production, storage and consumption;The processing side for understanding message each stage, conveniently navigates to machine and further checks;Understand each
The processing speed in stage finds potential performance bottleneck etc. in time.And the correlation in the message of storage each stage can be believed
Breath is shown, and so can intuitively check the track process of message lifecycle.
In addition, the message manufacturing side needs not move through messaging service end for the letter of the production about the production phase in the embodiment of the present invention
Breath, information consumption end need not move through messaging service end and the consumption information etc. about consumer phase are forwarded to Elasticsearch.
I.e. the message manufacturing side directly will directly be believed the consumption about consumer phase about the production information of production phase, information consumption end
Breath, stores into third method, and storage medium search server Elasticsearch.In this way, the pressure at messaging service end can be mitigated
Power reduces the performance consumption at messaging service end.The information for being compared to message each stage is collected by messaging service end is unified, is closed
It is stored by the message manufacturing side to Elasticsearch in the production information of message production phase, about depositing for message memory phase
Storage information is stored by messaging service end to Elasticsearch, and the consumption information about the information consumption stage is by information consumption end
It stores to Elasticsearch, the pressure reduction 1/3 at messaging service end can be made.
Message treatment method provided in an embodiment of the present invention can be directed to open source system RocketMQ message system, and realization disappears
Cease gesture function.
Message treatment method provided in an embodiment of the present invention can be applied to third method, and storage medium, such as search server
Elasticsearch。
The embodiment of the invention provides a kind of message treatment methods, as shown in Figure 1, may include:
S101 receives the production information about the message production phase that the message manufacturing side is sent, and receives messaging service end hair
The storage information about message memory phase sent, and receive the consumption about the information consumption stage that information consumption end is sent
Information.
S102, storage production information, storage information and consumption information.
Specifically, production information is that the message manufacturing side passes through the Software Development Kit (Software encapsulated in advance
Development Kit, SDK), calls application interface (Application Programming Interface, API)
It is sent to search server Elasticsearch's.Wherein, SDK can be messaging service end and be supplied to the message manufacturing side.
I.e. in the message production phase, relevant information is attached to message Header by the message manufacturing side, sends message request,
The message production client information of message, the timestamp etc. of transmission are had in Header.The message manufacturing side is called by the SDK of encapsulation
Production information about the message production phase is sent to Elasticsearch by asynchronous API, so that Elasticsearch is received
And store the production information, i.e., production information is stored to Elasticsearch.
In a kind of optional embodiment, the message manufacturing side is by calling the asynchronous collection production information of API, i.e. the message manufacturing side
It is successfully delivered to Elasticsearch without waiting for a upper production information when sending current production information.
Specifically, production information may include message production client information, send the sending time of message and disappearing for message
Breath mark etc..
Specifically, storage information is messaging service end by calling API to be sent to search server Elasticsearch
's.Wherein, messaging service end may include Broker.
Messaging service end and stores the message request if Broker receives the message request that the message manufacturing side is sent.Specifically
Ground can determine the storage information of message memory phase after storing the message request.API is called to send the storage information
The storage information is received and stored to search server Elasticsearch, Elasticsearch.Information storage will be stored
To Elasticsearch.
Message is during storage, messaging service end, the time-consuming for calling asynchronous API to need message storage such as Broker
Situation etc. according to message message identifier, as MessageID deposit third method, and storage medium Elasticsearch in.
In a kind of optional embodiment, messaging service end is by calling asynchronous the collections storage information of API, i.e. messaging service end
It is successfully delivered to Elasticsearch without waiting for a upper storage information when sending currently stored information.
Specifically, storage information may include message identifier and the storage time for saving message.
Specifically, consumption information is that information consumption end passes through the SDK encapsulated in advance, and API is called to be sent to
Elasticsearch's.
Wherein, SDK can be messaging service end and be supplied to information consumption end.
Message is distributed to information consumption end from messaging service end, and information consumption end is when completing the consumption to message,
To messaging service end side confirmation message, (Acknowledgement, ACK) information is such as confirmed.
Information consumption end can determine consumption information, and pass through during information consumption or when information consumption is completed
The SDK encapsulated in advance calls API that the consumption information is sent to Elasticsearch, so that Elasticsearch is received simultaneously
The consumption information is stored, i.e., is stored consumption information into Elasticsearch.
In a kind of optional embodiment, information consumption end is by calling the asynchronous collection consumption information of API, i.e. messaging service end
It is successfully delivered to Elasticsearch without waiting for a upper consumption information when sending current consumption information.
Specifically, consumption information may include message identifier, the consumption status of message and time-consuming of information consumption etc..
In the embodiment of the present invention, the information being able to record in message lifecycle makes it possible to these letters according to record
Breath more easily carries out troubleshooting during troubleshooting, simplifies troubleshooting process.And can by production information, storage information and
Consumption information is stored in third method, and storage medium: in Elasticsearch, in this way, log not rule, can reduce message system
Disk expense, reduce loss to message server-side performance.In addition, the message manufacturing side is directly by the production about the production phase
Information, information consumption end store directly by the consumption information about consumer phase into third method, and storage medium.It so, it is possible
The pressure for mitigating messaging service end, further decreases the performance consumption at messaging service end.
On the basis of the above embodiments, in a kind of optional embodiment of the present invention, can also include:
Show production information, storage information and consumption information.
Wherein, production information, storage information and consumption information may each comprise the message identifier of message.
Specifically, production information, storage information and consumption information are shown, as shown in Fig. 2, may include:
S201 is associated with production information, storage information and consumption information according to the message identifier of message.
S202, production information, storage information and consumption information after showing association.
Specifically, production information, storage information and consumption information can be associated with according to the message identifier of message;Pass through day
Will analysis system (ElasticSearch, Logstash, Kibana, ELK), show association after production information, storage information and
Consumption information.
By message identifier, such as MessageID or keyword Key carry out front end rendering, and by the page after rendering
It is presented to business.Specifically, the embodiment of the present invention not to front end rendering mode be restricted, front end rendering may include it is any can
In a manner of realizing page rendering in protection scope of the embodiment of the present invention.
It can be such as raw by the information in the message identifier corresponding message each stage using the message identifier as keyword
Information, storage information and consumption information is produced to show.It, can be in this way, allow to be inquired by the message identifier
Rapidly inquire the information in the message identifier corresponding message each stage.
The relevant information in message each stage is shown by third method, and storage medium, such as Elasticsearch, is on the one hand made
Inquiry can be associated by MessageID or keyword Key by obtaining, and realize the message traces function not having in prior art
Energy.On the other hand, the processing pressure at messaging service end can also be mitigated.And it can be tracked by message identifier, such as MessageID
Corresponding unique message.
The embodiment of the invention also provides a kind of message handling systems, as shown in Figure 3, comprising: the message manufacturing side, message clothes
Be engaged in end, information consumption end and search server Elasticsearch.
The message manufacturing side takes for sending the production information about the message production phase to Elasticsearch to message
Business end sends message request.
Specifically, the message manufacturing side calls specifically for the Software Development Kit SDK by encapsulating in advance and applies journey
Sequence interface API sends production information to Elasticsearch.
Wherein, production information may include message production client information, send the sending time of message and the message of message
Mark etc..
In a kind of achievable mode, message request may include the message content of message.In the achievable mode of another kind, disappear
Breath request can also include message production client information, the sending time for sending message and message identifier of message etc..
Information consumption end takes for sending the consumption information about the information consumption stage to Elasticsearch to message
Business end sends consumer requests.
Specifically, it calls specifically for the Software Development Kit SDK by encapsulating in advance and applies journey in information consumption end
Sequence interface API sends consumption information to Elasticsearch.
Wherein, consumption information may include message identifier, the consumption status of message and time-consuming of information consumption etc..
Messaging service end, for receiving the message request of message manufacturing side transmission;Receive the consumption that information consumption end is sent
Request;The storage information about message memory phase is sent to Elasticsearch.
Specifically, messaging service end is specifically used for depositing by calls application interface API to Elasticsearch transmission
Store up information.
Wherein, storage information may include message identifier and the storage time etc. for saving message.
Elasticsearch stores information and consumption information for receiving production information;Storage production information is deposited
Store up information and consumption information.
In addition, Elasticsearch can be also used for showing production information, storage information and consumption information.Specifically, raw
Produce the message identifier that information, storage information and consumption information include message;Elasticsearch is specifically used for according to message
Message identifier, association production information, storage information and consumption information;It shows the production information after being associated with, storage information and disappears
Charge information.
In the embodiment of the present invention, the information being able to record in message lifecycle makes it possible to these letters according to record
Breath more easily carries out troubleshooting during troubleshooting, simplifies troubleshooting process.And can by production information, storage information and
Consumption information is stored in third method, and storage medium: in Elasticsearch, in this way, log not rule, can reduce message system
Disk expense, reduce loss to message server-side performance.In addition, the message manufacturing side is directly by the production about the production phase
Information, information consumption end store directly by the consumption information about consumer phase into third method, and storage medium.It so, it is possible
The pressure for mitigating messaging service end, further decreases the performance consumption at messaging service end.
It should be noted that message handling system provided in an embodiment of the present invention is disappearing using above-mentioned message treatment method
Processing system is ceased, then all embodiments of above-mentioned message treatment method are suitable for the message handling system, and can reach phase
Same or similar beneficial effect.
The embodiment of the invention also provides the specific embodiments that one is applied to above-mentioned message handling system.
It include: the message manufacturing side, messaging service end, information consumption end and Elasticsearch in message system, i.e.,
ES.In the embodiment of the present invention, messaging service end includes Broker.
Message is sent to messaging service end, i.e. Broker from the message manufacturing side, and Broker completes the storage to message.Message
Consumption terminal is by message distribution to information consumption end, so that the consumption to message is completed at information consumption end.
Specifically, relevant information of the message manufacturing side by message in the production phase is attached to message Header, sends message
It requests, may include the message production client information of message, the timestamp of transmission, that is, when sending the transmission of message in message Header
Between.The message manufacturing side is called asynchronous API, the production information about the message production phase is sent to by the SDK of encapsulation
Elasticsearch so that Elasticsearch receives and stores the production information, i.e., by production information store to
Elasticsearch。
The message manufacturing side sends message request to Broker, will be about memory phase after Broker stores message request
Information is stored, the asynchronous API of Broker is called, is stored in Elasticsearch.Message, also can be by message during storage
Time-consuming situation needed etc. is stored to be stored according to the MessageID of message.It does not need to fall directly into Broker local disk.
Message is distributed to information consumption end, message is consumed at information consumption end, and is being consumed by from the end Broker
Cheng Shi, to Broker feedback acknowledgment ACK information.
Broker receives lower consumption result and delivers, and after the completion of information consumption, can send the tool of consumer to Broker again
Body information, the information such as state, the time-consuming situation of consumption of consumption.Asynchronous API is called by the SDK of encapsulation in information consumption end, will
Time, the MessageID of message etc. that record message reaches, are stored in third method, and storage medium Elasticsearch, i.e., will close
It stores in the consumption information in information consumption stage to Elasticsearch.
The relevant information in message each stage, such as production information, storage information and consumption information store to
In Elasticsearch.And the relevant information in each stage, such as state managing detailed catalogue etc. respectively by call API store to
Elasticsearch.And each relevant information includes the message identifier of message, can by message identifier by production information,
Storage information and consumption information are associated, and by front end page rendering etc., pass through ELK, show production information, storage letter
Breath and consumption information, are intuitively supplied to business etc. for the relevant information in message each stage, allow to utilize
The correlation inquiry function of Elasticsearch carries out front end rendering according to unique MessageID and is presented to business.
In a kind of optional embodiment, show the page of business as shown in Figure 4 by Elasticsearch.
Specifically, the relevant information of message production phase, memory phase and consumer phase are shown.
Such as production phase corresponding information: production group: test production group A;Address: 10.1.2.33;Production time: 2018/
05/16 13:14:15.344.The corresponding information of memory phase: Broker title: Broker-4;Address: 192.168.1.1;It deposits
Store up the time: 2018/05/16 13:14:15.400;Storage is time-consuming: 0ms;Key:ORDER2018X:Tag:XXX.Consumer phase pair
The information answered: consumption group: test consumption group A;State: success;1st time: state: consuming successfully;Address: 10.1.2.34;Consumption
Time: 2018/05/1613:14:20.100;Processing is time-consuming: 30ms.Consumption group: test consumption group B;State: success;1st time:
State: consumption failure;Address: 10.1.2.35;Consumption time: 2018/05/16 13:14:20.100;Processing is time-consuming: 200ms;
2nd time: state: consuming successfully;Address: 10.1.2.35;Consumption time: 2018/05/1613:14:25.100;Processing is time-consuming:
10ms。
By addition Header in the embodiment of the present invention, the information in production process is recorded, while recording the entire of message
Process realizes the trace information of message processing procedure, and the information in each stage passes through the message manufacturing side, messaging service end respectively
And information consumption end directly stores and needs not move through messaging service end to Elasticsearch for the production about the production phase
Consumption information about consumer phase etc. is forwarded to Elasticsearch by information.In this way, messaging service end can be mitigated
Pressure reduces the performance consumption at messaging service end.And production information, storage information and consumption information are stored in
Elasticsearch can be realized log not rule, can reduce the disk expense of message system, reduce to message server-side
The loss of performance.
The embodiment of the invention provides a kind of search server Elasticsearch, as shown in figure 5, may include:
Receiving module 501, for receiving the production information about the message production phase of message manufacturing side transmission, reception disappears
Cease server-side send the storage information about message memory phase, and receive information consumption end send about information consumption
The consumption information in stage;
Memory module 502, for storing production information, storage information and consumption information.
In the embodiment of the present invention, the information being able to record in message lifecycle makes it possible to these letters according to record
Breath more easily carries out troubleshooting during troubleshooting, simplifies troubleshooting process.And can by production information, storage information and
Consumption information is stored in third method, and storage medium: in Elasticsearch, in this way, log not rule, can reduce message system
Disk expense, reduce loss to message server-side performance.In addition, the message manufacturing side is directly by the production about the production phase
Information, information consumption end store directly by the consumption information about consumer phase into third method, and storage medium.It so, it is possible
The pressure for mitigating messaging service end, further decreases the performance consumption at messaging service end.
Optionally, production information, storage information and consumption information include the message identifier of message;
Elasticsearch further include:
Relating module is associated with production information, storage information and consumption information for the message identifier according to message;
Display module, for the production information, storage information and consumption by Log Analysis System ELK, after showing association
Information.
Optionally, production information is that the message manufacturing side passes through the Software Development Kit SDK encapsulated in advance, calls and applies journey
Sequence interface API is sent to search server Elasticsearch's.
Optionally, storage information is that messaging service end calls application interface API is sent to search server
Elasticsearch's.
Optionally, consumption information is that information consumption end passes through the Software Development Kit SDK encapsulated in advance, calls and applies journey
Sequence interface API is sent to search server Elasticsearch's.
Optionally, production information includes message production client information, sends the sending time of message and the message mark of message
Know;
Storage information includes message identifier and the storage time for saving message;
Consumption information includes the time-consuming of message identifier, the consumption status of message and information consumption.
It should be noted that Elasticsearch provided in an embodiment of the present invention is using above-mentioned message treatment method
Elasticsearch, then all embodiments of above-mentioned message treatment method are suitable for the Elasticsearch, and can reach
To the same or similar beneficial effect.
The embodiment of the invention also provides a kind of message manufacturing sides, comprising:
First sending module, for sending message request to messaging service end, the message request includes the message of message
Content;
Second sending module, for sending the production about the message production phase to search server Elasticsearch
Information, so that the Elasticsearch is stored and shown the production information according to the message identifier of the message;Wherein,
The production information includes message production client information, sends the sending time of the message and the message identifier of the message.
It should be noted that the message manufacturing side provided in an embodiment of the present invention is setting using above-mentioned message treatment method
Standby, then all embodiments of above-mentioned message treatment method are suitable for the equipment, and can reach the same or similar beneficial to effect
Fruit.
The embodiment of the invention also provides a kind of messaging service ends, comprising:
First receiving module, for receiving the message request of message manufacturing side transmission, the message request includes described disappears
The message content of breath;
Second receiving module, for receiving the consumer requests of information consumption end transmission;
Third sending module, for sending the storage about message memory phase to search server Elasticsearch
Information, so that the Elasticsearch is stored and shown the storage information according to the message identifier of the message;Wherein,
The storage information includes the message identifier and the storage time for saving the message.
It should be noted that messaging service end provided in an embodiment of the present invention is setting using above-mentioned message treatment method
Standby, then all embodiments of above-mentioned message treatment method are suitable for the equipment, and can reach the same or similar beneficial to effect
Fruit.
The embodiment of the invention also provides a kind of information consumption ends, comprising:
4th sending module, for sending consumer requests to messaging service end;
5th sending module, for sending the consumption about the information consumption stage to search server Elasticsearch
Information, so that the Elasticsearch is stored and shown the consumption information according to the message identifier of the message;Wherein,
The consumption information includes the time-consuming of the message identifier, the consumption status of the message and the information consumption.
It should be noted that information consumption end provided in an embodiment of the present invention is setting using above-mentioned message treatment method
Standby, then all embodiments of above-mentioned message treatment method are suitable for the equipment, and can reach the same or similar beneficial to effect
Fruit.
The embodiment of the invention also provides a kind of message processing devices, as shown in fig. 6, including processor 601, communication interface
602, memory 603 and communication bus 604, wherein processor 601, communication interface 602, memory 603 pass through communication bus
604 complete mutual communication.
Memory 603, for storing computer program;
Processor 601 when for executing the program stored on memory 603, realizes the side of above-mentioned message treatment method
Method step.
In the embodiment of the present invention, the information being able to record in message lifecycle makes it possible to these letters according to record
Breath more easily carries out troubleshooting during troubleshooting, simplifies troubleshooting process.And can by production information, storage information and
Consumption information is stored in third method, and storage medium: in Elasticsearch, in this way, log not rule, can reduce message system
Disk expense, reduce loss to message server-side performance.In addition, the message manufacturing side is directly by the production about the production phase
Information, information consumption end store directly by the consumption information about consumer phase into third method, and storage medium.It so, it is possible
The pressure for mitigating messaging service end, further decreases the performance consumption at messaging service end.
The communication bus that above-mentioned message processing device is mentioned can be Peripheral Component Interconnect standard (Peripheral
Component Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry
Standard Architecture, abbreviation EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control
Bus processed etc..Only to be indicated with a thick line in figure convenient for indicating, it is not intended that an only bus or a type of total
Line.
Communication interface is for the communication between above-mentioned message processing device and other equipment.
Memory may include random access memory (Random Access Memory, abbreviation RAM), also may include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
Abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor
(Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific
Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array,
Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can
It reads to be stored with instruction in storage medium, when run on a computer, so that computer executes above-mentioned message treatment method
Method and step.
In the embodiment of the present invention, the information being able to record in message lifecycle makes it possible to these letters according to record
Breath more easily carries out troubleshooting during troubleshooting, simplifies troubleshooting process.And can by production information, storage information and
Consumption information is stored in third method, and storage medium: in Elasticsearch, in this way, log not rule, can reduce message system
Disk expense, reduce loss to message server-side performance.In addition, the message manufacturing side is directly by the production about the production phase
Information, information consumption end store directly by the consumption information about consumer phase into third method, and storage medium.It so, it is possible
The pressure for mitigating messaging service end, further decreases the performance consumption at messaging service end.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it
When running on computers, so that computer executes the method and step of above-mentioned message treatment method.
In the embodiment of the present invention, the information being able to record in message lifecycle makes it possible to these letters according to record
Breath more easily carries out troubleshooting during troubleshooting, simplifies troubleshooting process.And can by production information, storage information and
Consumption information is stored in third method, and storage medium: in Elasticsearch, in this way, log not rule, can reduce message system
Disk expense, reduce loss to message server-side performance.In addition, the message manufacturing side is directly by the production about the production phase
Information, information consumption end store directly by the consumption information about consumer phase into third method, and storage medium.It so, it is possible
The pressure for mitigating messaging service end, further decreases the performance consumption at messaging service end.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system,
For Elasticsearch, equipment, computer readable storage medium and computer program product embodiments, since it is basic
It is similar to embodiment of the method, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of message handling system characterized by comprising the message manufacturing side, messaging service end, information consumption end and search
Server Elasticsearch;
The message manufacturing side, for sending the production information about the message production phase to the Elasticsearch, to institute
It states messaging service end and sends message request;
The information consumption end, for sending the consumption information about the information consumption stage to the Elasticsearch, to institute
It states messaging service end and sends consumer requests;
The messaging service end, the message request sent for receiving the message manufacturing side;Receive the information consumption
Hold the consumer requests sent;The storage information about message memory phase is sent to the Elasticsearch;
The Elasticsearch, for receiving the production information, the storage information and the consumption information;Storage
The production information, the storage information and the consumption information.
2. system according to claim 1, which is characterized in that the message manufacturing side, specifically for by encapsulating in advance
Software Development Kit SDK, calls application interface API sends the production information to the Elasticsearch;
The messaging service end is specifically used for through calls application interface API to described in Elasticsearch transmission
Store information;
The information consumption end, specifically for the Software Development Kit SDK by encapsulating in advance, calls application interface
API sends the consumption information to the Elasticsearch.
3. system according to claim 1, which is characterized in that the production information, the storage information and the consumption
Information includes the message identifier of the message;
The Elasticsearch is associated with the production information, described deposits specifically for the message identifier according to the message
Store up information and the consumption information;The production information, the storage information and the consumption information after showing association.
4. a kind of message treatment method characterized by comprising
Receive the production information about the message production phase that the message manufacturing side is sent, receive that messaging service end sends about disappearing
The storage information of memory phase is ceased, and receives the consumption information about the information consumption stage that information consumption end is sent;
Store the production information, the storage information and the consumption information.
5. according to the method described in claim 4, it is characterized in that, the production information, the storage information and the consumption
Information includes the message identifier of the message;
The method also includes:
According to the message identifier of the message, it is associated with the production information, the storage information and the consumption information;
The production information, the storage information and the consumption information after showing association.
6. a kind of search server Elasticsearch characterized by comprising
Receiving module receives messaging service for receiving the production information about the message production phase of message manufacturing side transmission
The storage information about message memory phase sent is held, the consumption about the information consumption stage that information consumption end is sent is received
Information;
Memory module, for storing the production information, the storage information and the consumption information.
7. Elasticsearch according to claim 6, which is characterized in that the production information, the storage information and
The consumption information includes the message identifier of the message;
The Elasticsearch further include:
Relating module is associated with the production information, the storage information and described disappears for the message identifier according to the message
Charge information;
Display module, for by Log Analysis System ELK, the production information, the storage information after showing association and
The consumption information.
8. a kind of message manufacturing side characterized by comprising
First sending module, for sending message request to messaging service end, the message request includes the message content of message;
Second sending module, for sending the production information about the message production phase to search server Elasticsearch,
So that the Elasticsearch is stored and is shown the production information according to the message identifier of the message;Wherein, the life
Information is produced to include message production client information, send the sending time of the message and the message identifier of the message.
9. a kind of messaging service end characterized by comprising
First receiving module, for receiving the message request of message manufacturing side transmission, the message request includes the message
Message content;
Second receiving module, for receiving the consumer requests of information consumption end transmission;
Third sending module, for sending the storage information about message memory phase to search server Elasticsearch,
So that the Elasticsearch is stored and is shown the storage information according to the message identifier of the message;Wherein, described to deposit
Storage information includes the message identifier and the storage time for saving the message.
10. a kind of information consumption end characterized by comprising
4th sending module, for sending consumer requests to messaging service end;
5th sending module, for sending the consumption information about the information consumption stage to search server Elasticsearch,
So that the Elasticsearch is stored and is shown the consumption information according to the message identifier of the message;Wherein, described to disappear
Charge information includes the time-consuming of the message identifier, the consumption status of the message and the information consumption.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811455164.8A CN109729148A (en) | 2018-11-30 | 2018-11-30 | A kind of message treatment method, system and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811455164.8A CN109729148A (en) | 2018-11-30 | 2018-11-30 | A kind of message treatment method, system and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109729148A true CN109729148A (en) | 2019-05-07 |
Family
ID=66295143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811455164.8A Pending CN109729148A (en) | 2018-11-30 | 2018-11-30 | A kind of message treatment method, system and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109729148A (en) |
Citations (6)
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 |
CN104378415A (en) * | 2014-10-29 | 2015-02-25 | 中国建设银行股份有限公司 | High-availability cloud system and achievement method based on information |
CN105338061A (en) * | 2015-09-29 | 2016-02-17 | 华中科技大学 | Lightweight message oriented middleware realization method and system |
CN107423141A (en) * | 2017-06-20 | 2017-12-01 | 北京小度信息科技有限公司 | Information processing method and device |
CN107465735A (en) * | 2017-07-31 | 2017-12-12 | 杭州多麦电子商务股份有限公司 | Distributed information system |
CN107465549A (en) * | 2017-08-18 | 2017-12-12 | 北京奇艺世纪科技有限公司 | A kind of distributed message processing method and system |
-
2018
- 2018-11-30 CN CN201811455164.8A patent/CN109729148A/en active Pending
Patent Citations (6)
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 |
CN104378415A (en) * | 2014-10-29 | 2015-02-25 | 中国建设银行股份有限公司 | High-availability cloud system and achievement method based on information |
CN105338061A (en) * | 2015-09-29 | 2016-02-17 | 华中科技大学 | Lightweight message oriented middleware realization method and system |
CN107423141A (en) * | 2017-06-20 | 2017-12-01 | 北京小度信息科技有限公司 | Information processing method and device |
CN107465735A (en) * | 2017-07-31 | 2017-12-12 | 杭州多麦电子商务股份有限公司 | Distributed information system |
CN107465549A (en) * | 2017-08-18 | 2017-12-12 | 北京奇艺世纪科技有限公司 | A kind of distributed message processing method and system |
Non-Patent Citations (1)
Title |
---|
YIKAYI: "Elasticsearch 5.1.2集群日志***部署及实践", 《51CT0博客》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112788074B (en) | Data transmitting method, processing method, receiving method, apparatus thereof, and storage medium | |
CN103139157B (en) | A kind of based on the network communication method of socket, Apparatus and system | |
CN101945013A (en) | System and method for implementing server configuration management | |
CN109688200A (en) | A kind of message treatment method, device and equipment | |
CN108712457A (en) | Back-end server dynamic load method of adjustment and device based on Nginx reverse proxys | |
CN108769099A (en) | A kind of implementation method of the message duplicate removal of message-oriented middleware | |
CN102984237B (en) | A kind of data transmission system and method connecting based on socket | |
CN102404306B (en) | Protocol configuration method and device | |
CN110062004A (en) | A kind of message handling system and method based on Internet of Things fidonetFido | |
CN102111419A (en) | Message middleware-based client automatic reconnection method | |
CN113391979A (en) | Processing method, equipment and system for monitoring data display and storage medium | |
US20120166615A1 (en) | Inband Data Gathering with Dynamic Intermediary Route Selections | |
CN103368872A (en) | Data packet forwarding system and method | |
CN102984272B (en) | A kind of system of remote control mobile terminal communication capacity and method thereof | |
CN109687994A (en) | A kind of message treatment method, system, device and equipment | |
CN102902593B (en) | Agreement distributing and processing system based on caching mechanism | |
US8843578B2 (en) | Role-independent context exchange | |
CN107888683A (en) | A kind of client exchange method and device | |
CN102148702A (en) | Method for managing network by utilizing network configuration protocol | |
CN109729148A (en) | A kind of message treatment method, system and equipment | |
CN113329042A (en) | Message processing method and system, Internet of vehicles system, server and electronic equipment | |
CN105281944B (en) | Method for setting network protocol address and service management system | |
CN108234595B (en) | Log transmission method and system | |
US20100332604A1 (en) | Message selector-chaining | |
CN101471927B (en) | Method and device for processing document transmission and document transmission system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190507 |