CN109815035A - A kind of message delivery method and relevant apparatus of message queue - Google Patents
A kind of message delivery method and relevant apparatus of message queue Download PDFInfo
- Publication number
- CN109815035A CN109815035A CN201910146531.4A CN201910146531A CN109815035A CN 109815035 A CN109815035 A CN 109815035A CN 201910146531 A CN201910146531 A CN 201910146531A CN 109815035 A CN109815035 A CN 109815035A
- Authority
- CN
- China
- Prior art keywords
- message
- queue
- server
- message queue
- data center
- 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
- 238000002716 delivery method Methods 0.000 title claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 59
- 238000004590 computer program Methods 0.000 claims description 10
- 238000012790 confirmation Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 abstract description 32
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000000034 method Methods 0.000 description 21
- 238000002955 isolation Methods 0.000 description 14
- 230000008569 process Effects 0.000 description 11
- 238000007726 management method Methods 0.000 description 8
- 230000000903 blocking effect Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000006872 improvement Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
This application discloses a kind of message delivery methods of message queue, it include: when the server of first message queue sends across queue message to the server of second message queue, proxy server carries out message acquisition processing to first message queue according to the first preset protocol, obtains described across queue message;Described message dilivery processing will be carried out to second message queue across queue message according to the second preset protocol, so that the server of the second message queue is described across queue message from second message queue acquisition.By the corresponding preset protocol of each message queue, the carrying across queue message is carried out between first message queue and second message queue, avoids server from directly connecting with other message queues, realizes the message transmission between different data center.Disclosed herein as well is a kind of messaging device of message queue, server and computer readable storage mediums, have the above beneficial effect.
Description
Technical field
This application involves field of computer technology, in particular to a kind of message delivery method of message queue, message transmission
Device, server and computer readable storage medium.
Background technique
With the continuous development of computer technology, occur between the computer in group system a large amount of different levels,
Message communicating between different processes and different threads equipment, in order to improve message communicating efficiency, the prior art, which provides, to disappear
The relevant technologies of queue are ceased, to be communicated between different processes or between the different threads of same process.Pass through message
Queue can make the sender and recipients of message not need to interact with message queue simultaneously.The message meeting that sender sends
It is stored in message queue, until recipient obtains the message from message queue.
In general, a message queue is only used in a data center, since information technology continues to develop, in data
It will appear multiple data centers in processing environment.When carrying out messaging between the server at different data center, existing skill
As soon as art is usually to establish between multiple data centers or the message queue fewer than data center's quantity, then will appear certain
The server of one data center needs the message queue acquisition for being isolated to other data centers across between data center to disappear
Breath.It is connected to corresponding message queue due to being across data center, data center can be seriously reduced and send and receive message
Efficiency seriously reduces performance.Meanwhile carrying out data transmission needing between different data centers across the special of public network or long range
Gauze network then needs the server of data center to face and handle network jitter situation when network jitter, will lead to different numbers
According to the message blocking between center, the normal work of operation system is influenced.Connect finally, being established across data center and message queue
Connect, due to being that the isolation that the server of data center is directly crossed between data center is attached, be unfavorable for data center it
Between network isolation and management.
Therefore, how to avoid realizing the message transmission between the message queue at different data center across data center is
The Important Problems of those skilled in the art's concern.
Summary of the invention
The purpose of the application be to provide the message delivery method of message queue a kind of, messaging device, server and
Computer readable storage medium, by the corresponding preset protocol of each message queue, in first message queue and second message team
The carrying across queue message is carried out between column, is avoided server from directly connecting with other message queues, is realized in different data
Message transmission between the heart.
In order to solve the above technical problems, the application provides a kind of message delivery method of message queue, comprising:
When the server of first message queue sends across queue message to the server of second message queue, agency service
Device carries out message acquisition processing to first message queue according to the first preset protocol, obtains described across queue message;
Described message dilivery processing will be carried out to second message queue across queue message according to the second preset protocol, with toilet
The server for stating second message queue is described across queue message from second message queue acquisition.
Optionally, further includes:
When the message dilivery is handled successfully, the second message queue sends confirmation to the proxy server and disappears
Breath;
When the proxy server receives the confirmation message, the proxy server is to the first message queue
Send confirmation message.
Optionally, when the server of first message queue sends across queue message to the server of second message queue,
Proxy server carries out message acquisition processing to first message queue according to the first preset protocol, obtain it is described across queue message,
Include:
The server of the first queue disappears across queue message to described first according to first preset protocol by described
It ceases queue and carries out message dilivery processing;
When the message dilivery is handled successfully, the proxy server is according to the first preset protocol to the first message
Queue carries out message acquisition processing, obtains described across queue message.
Optionally, the server of the second message queue obtains described across queue message from the second message queue,
Include:
The server of the second message queue disappears to the second message queue according to second preset protocol
Acquisition processing is ceased, is obtained described across queue message.
Optionally, first preset protocol is AMQP agreement or MQTT agreement;
Second preset protocol is AMQP agreement or MQTT agreement.
Optionally, further includes:
Before the proxy server carries out message acquisition processing, the proxy server according to the preset configuration and
The type across queue message judges whether to message acquisition processing;
The step of message obtains processing is carried out to first message queue according to the first preset protocol if so, executing.
Optionally, further includes:
Before carrying out message dilivery processing, the proxy server is according to the preset configuration and described across queue message
Type judge whether to message dilivery processing;
If so, executing described will carry out message dilivery to second message queue across queue message according to the second preset protocol
The step of processing.
The application also provides a kind of messaging device of message queue, comprising:
Message capturing module is sent to the server of second message queue across team for the server when first message queue
When column message, message acquisition processing is carried out to first message queue according to the first preset protocol, is obtained described across queue message;
Message dilivery module, for being disappeared across queue message to second message queue according to the second preset protocol by described
Delivery processing is ceased, so that the server of the second message queue is described across queue message from second message queue acquisition.
The application also provides a kind of server, comprising:
Memory, for storing computer program;
Processor, the step of message delivery method as described above is realized when for executing the computer program.
The application also provides a kind of computer readable storage medium, and calculating is stored on the computer readable storage medium
The step of machine program, the computer program realizes message delivery method as described above when being executed by processor.
The message delivery method of a kind of message queue provided herein, comprising: when the server of first message queue
When sending across queue message to the server of second message queue, proxy server is according to the first preset protocol to first message team
Column carry out message acquisition processing, obtain described across queue message;According to the second preset protocol will it is described across queue message to second
Message queue carries out message dilivery processing, so that the server of the second message queue obtains institute from the second message queue
It states across queue message.
It will be carried across queue message, that is, across the message of data center by proxy server, and then each
The server of message queue, that is, the server of each data center only need to be connected with the message queue of the data center
Message can be obtained and deliver message by connecing, and the server avoided in data center disappears across the isolation between data center
Breath transmission, reduces the complexity of data transmission, and when there is network jitter, and the server of data center is not necessarily to shake
Problem is handled, and is only needed normally to obtain message from corresponding message queue, is avoided the occurrence of message blocking problem, while only
Message transmission is carried out by proxy server, is conducive to carry out Network Isolation and management operation between data center.
The application also provides the messaging device, server and computer readable storage medium of a kind of message queue,
With the above beneficial effect, this will not be repeated here.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, 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
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the message delivery method of message queue provided by the embodiment of the present application;
Fig. 2 is the flow chart of the message delivery method of another kind message queue provided by the embodiment of the present application;
Fig. 3 is a kind of structural schematic diagram of the messaging device of message queue provided by the embodiment of the present application.
Specific embodiment
The core of the application be to provide the message delivery method of message queue a kind of, messaging device, server and
Computer readable storage medium, by the corresponding preset protocol of each message queue, in first message queue and second message team
The carrying across queue message is carried out between column, is avoided server from directly connecting with other message queues, is realized in different data
Message transmission between the heart.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
In simple terms, carry out data transmission operating between different data to realize in currently available technology.Usually
It is a message queue to be established between multiple data centers, or establish the message queue of negligible amounts, to realize in data
Message transfer operations between the heart.It is namely attached across data center to the message queue of other data centers, indirectly
Realize the data transmission between different data center.And it is connected to corresponding message queue across data center, it can seriously drop
Low data center sends and receives the efficiency of message, seriously reduces performance.Meanwhile data biography is carried out between different data centers
It is defeated that the private line network across public network or long range is needed then to need the server of data center to face and locate when network jitter
Network jitter situation is managed, the message blocking between different data center is will lead to, influences the normal work of operation system.Finally,
Establish connection across data center and message queue, due to be the server of data center directly cross between data center every
From being attached, it is unfavorable for the isolation and management of network between data center.
Therefore, the application provides a kind of message delivery method of message queue, by proxy server will across queue message,
It is namely carried across the message of data center, and then the server of each message queue, that is, each data center
Server only need to be attached with the message queue of the data center can obtain message and deliver message, avoid data
Server in center carries out message transmission across the isolation between data center, reduces the complexity of data transmission, and
When there is network jitter, the server of data center only needs normally from corresponding message without handling jitter problem
Queue obtains message, avoids the occurrence of message blocking problem, while only carrying out message transmission by proxy server, is conducive to
Carry out the Network Isolation and management operation between data center.
Referring to FIG. 1, Fig. 1 is a kind of process of the message delivery method of message queue provided by the embodiment of the present application
Figure.
In the present embodiment, this method may include:
S101, when the server of first message queue sends across queue message to the server of second message queue, generation
It manages server and message acquisition processing is carried out to first message queue according to the first preset protocol, obtain across queue message;
First message queue and second message queue refer respectively to the first data center and the second data center in this step,
That is do not have to establish the common message queue of multiple data centers between data center in the present embodiment, it is only necessary to each
The message queue of data center's normal use and management local.As it can be seen that embodiment provided by the present application can be avoided directly
The operation that the message queue of multiple data centers is reconstructed.
On the basis of existing each data center uses the message queue of the data center itself, this step is intended to work as
When the server of first message queue sends message to the server of second message queue, that is, in different data centers,
When occurring across queue message between different message queues, proxy server is in the first data center, i.e., in first message queue
Consumer as message carries out message acquisition processing, obtains this across queue message.
As it can be seen that across the sender of queue message in this step, i.e. the server of first message queue does not have to across in data
The interval of the heart carries out message and sends operation, it is only necessary to this is sent to local message queue across queue message, that is,
First message queue.It should be noted that the server of first message queue need to be only attached with first message queue, also
It is only with the normal connection status for keeping message queue.It avoids working as and occur across queue message, that is, across data center message,
When being exactly transregional domain message, the message queue, the i.e. data center, the i.e. server in the region connect local number across interval
According to the message queue except center, and then avoid the variety of problems occurred across data center interval.
Therefore, the server of the first message queue in this step is will to be sent directly to first message team across queue message
Column, proxy server is obtained from first message queue again should be across queue message.The server of first message queue is avoided,
It is exactly that the server of the first data center reduces across progress message transmission is spaced and crosses over the interval problem, and works as
When the server of data center sends across queue message, the message transmitting process of focused data central interior is only used, does not have to processing
Process except data center reduces the processing complexity of message transmission.Also, the message transmission between data center, i.e.,
Data transmitting between message queue only needs proxy server to be handled, and when there is network jitter problem, solves process
More efficiently, the message blocking of business procedure is avoided, also, be easy to carry out corresponding Isolation Management.
Wherein, proxy server refers to the server for carrying out carrying across queue message, the server and first message queue
In or second message queue in other servers be substantially the same, can be any one server therein, be also possible to it
The server of his function, such as the server of managing message queues, can also be independent server.As it can be seen that in the present embodiment
The specific form of proxy server is not unique, and it is also possible to is overlapped with other entity hardware in the present embodiment.Therefore,
Not the step of the present embodiment does not limit the form of proxy server, executes the present embodiment simply by the presence of suitable hardware environment.
Wherein, the first preset protocol refers to the message queue protocol of first message queue, carries out with the first message queue
The equipment of data interaction, it is only necessary to can just be interacted with first message queue according to first preset protocol.Also, it is different
Message queue message queue protocol it is distinct.Therefore, it is needed for different message queues using not in the present embodiment
Same agreement performs corresponding processing.
Optionally, this step may include:
Step 1: the server of first queue will be carried out across queue message to first message queue according to the first preset protocol
Message dilivery processing;
Step 2: proxy server is according to the first preset protocol to first message queue when message dilivery is handled successfully
Message acquisition processing is carried out, is obtained across queue message.
As it can be seen that the interval that the server of the first message queue in this optinal plan does not have to across between data center is gone to connect
Connect other message queues, it is only necessary to Message Opcode be carried out to local message queue, that is, only to first message team
Column are operated, and the various problems occurred across data center interval are avoided.
Wherein, since first message queue only needs to carry out Message Processing to being present in local first message queue, that
Any one message dilivery that its message dilivery carried out processing can be provided using the prior art is handled, in this optinal plan
And it is not specifically limited.
When the message dilivery in this optinal plan is handled successfully, then proxy server carries out message acquisition processing, also
Be comparable to server progress data different in the same message queue sends and receives operation.As it can be seen that the present embodiment
In to message carry out processing, can be used the prior art offer any one Message Processing, without be implemented separately cross over number
According to the message process mode at center, the operation difficulty across queue message transmitting is reduced.
S102 will carry out message dilivery processing to second message queue across queue message according to the second preset protocol, so as to
The server of second message queue is obtained from second message queue across queue message.
On the basis of S101, this is delivered in second message queue by proxy server across queue message, so as to second
The server of message queue is obtained from second message queue should be across queue message.This step, that is, proxy server conduct
The producer of second message queue, the i.e. producer of the second data center will be delivered in second message queue across queue message,
So as to second message queue server from local message queue, that is, obtain in recent news queue and disappear across queue
Breath.
As it can be seen that the server of first message queue is as the sender across queue message, the server of second message queue
As the recipient across queue message, message between the two realizes transmitting, and wherein each server only needs to select
It selects recent news queue to be operated, that is, each server only needs to connect local message queue, and does not have to transregional
Domain is attached, and reduces the complexity of message transmission.
It should be noted that the message process mode that proxy server carries out message queue, determines proxy server
Identity.It is, the proxy server is for when the proxy server carries out message acquisition processing to message queue
The message queue of operation is consumer, when the proxy server carries out message dilivery processing to message queue, the agency service
Device is the producer for the message queue operated.Therefore, only it needs to be determined that the proxy server is to a certain in the present embodiment
Which kind of Message Processing a message queue carry out, without defining in identity of the other positions to proxy server.
Optionally, may include: in this step
The server of second message queue carries out message acquisition processing to second message queue according to the second preset protocol, obtains
To across queue message.
This optinal plan is mainly described second message queue and is obtained from second message queue by the second preset protocol
Across queue message.As it can be seen that the server of second message queue obtains the mode across queue message and the normal side for obtaining message
Formula is no different, and is simplified the process across queue message of acquisition, is avoided the occurrence of the various problems occurred across data center.
Optionally, in order to indicate that message is sent successfully, the present embodiment can also include:
Step 1: second message queue sends confirmation message to proxy server when message dilivery is handled successfully;
Step 2: proxy server is sent to first message queue to be confirmed when proxy server receives confirmation message
Message.
This optinal plan mainly when across queue message transmitting successfully when, second message queue, proxy server and
Confirmation message is mutually sent between first message queue, the notice being delivered successfully so as to feedback message.
The first preset protocol or the second preset protocol in the present embodiment, all can be AMQP (Advanced Message
Queuing Protocol advanced message queue protocol) agreement or MQTT (Message Queuing Telemetry
Transport message queue telemetering transmission) agreement, any one message queue protocol can also be provided using the prior art, had
Body, it is not limited here.
To sum up, the present embodiment will be carried out by proxy server across queue message, that is, across the message of data center
It carries, and then the server of each message queue, that is, the server of each data center only need and the data center
Message queue, which is attached, can obtain message and deliver message, avoid server in data center across data center it
Between isolation carry out message transmission, reduce the complexity of data transmission, and when network jitter occur, the clothes of data center
Business device only needs normally to obtain message from corresponding message queue, avoids the occurrence of message without handling jitter problem
Obstructing problem, at the same only by proxy server carry out message transmission, be conducive to carry out data center between Network Isolation and
Management operation.
On the basis of a upper embodiment, the present embodiment provides another message delivery methods.It through this embodiment can be with
Facilitate the message transmission direction of control agent server, and defines the proxy server in the role at different data center, so that
Message is transmitted between different data centers.
Referring to FIG. 2, Fig. 2 is the process of the message delivery method of another kind message queue provided by the embodiment of the present application
Figure.
In the present embodiment, this method may include:
S201, when the server of first message queue sends across queue message to the server of second message queue, generation
Server is managed according to preset configuration and the type across queue message judges whether to message dilivery processing;If so, executing
S202;If it is not, returning to S201;
In this step when first message queue server to the server of second message queue send across queue message
When, that is, before the proxy server carries out message acquisition processing.
S202 carries out message acquisition processing to first message queue according to the first preset protocol, obtains across queue message;
S203 judges whether to message dilivery processing according to preset configuration and the type across queue message;If so, executing
S204;If it is not, returning to S201;
S204 will carry out message dilivery processing to second message queue across queue message according to the second preset protocol, so as to
The server of second message queue is obtained from second message queue across queue message.
Whether the present embodiment mainly passes through preset configuration and the Type Control proxy server across queue message to correspondence
Message handled, that is, the message transmission of proxy server flow direction is controlled by preset configuration.
Wherein, preset configuration is that mutual corresponding relationship is arranged in the type of message and corresponding Message Opcode, for example, originally
The type across queue message of embodiment can be message (typonym), then the corresponding Message Opcode being arranged is exactly
When the message that topic (type of message) is message occurs in first message queue, the message is obtained, and by the message dilivery
To second message queue.When the message that type is message also occurs in second message queue, also obtained from second message queue
The message, and it is delivered to first message queue.Further, when there are more message queues, can also be arranged
Similar preset configuration, i.e., the Message Opcode executed proxy server is corresponding with specific type of message, more to control
The data flow across queue message.
It should also be noted that, preset configuration through this embodiment can control agent server mode of operation,
And then identity of proxy server when in face of different types of message is determined.As it can be seen that the present embodiment passes through in preset configuration
Relationship between the type of message and Message Opcode of setting simpler can realize to proxy server and control that raising disappears
Cease the efficiency of transmitting.
It can be seen that the present embodiment will be removed by proxy server across queue message, that is, across the message of data center
The server of fortune, and then the server of each message queue, that is, each data center only needs to disappear with the data center
Breath queue, which is attached, can obtain message and deliver message, avoid the server in data center across between data center
Isolation carry out message transmission, reduce the complexity of data transmission, and when network jitter occur, the service of data center
Device only needs normally to obtain message from corresponding message queue, avoids the occurrence of message resistance without handling jitter problem
Plug problem, while message transmission is only carried out by proxy server, be conducive to carry out Network Isolation and pipe between data center
Reason operation.
On the basis of all of above embodiment, the present embodiment provides a kind of more specifical message delivery methods.This reality
It applies example to apply in the environment of multiple data centers, that is, a such as data center, as the producer, multiple data centers make
For the environment of consumer;Either multiple data centers are as the producer, environment of the data center as consumer.
When a data center is the producer, and multiple data centers are consumer, the present embodiment may include:
The producer of the first data center of step 1) is connected to the first message queue at notebook data center, and the producer is to message
Queue sends the message that topic is message, and message is cached in queue by the first message queue of the first data center;
The consumer of the second data center of step 2) and third data center is connected to local message queue, consumption
Topic is the message of message;
Step 3) starts proxy module between the first data center and the second data center, and the of the first data center
The second message queue of one message queue and the second data center, consumer of the proxy module as first message queue make
For the producer of second message queue, message is transmitted to the second data center from the first data center;
Step 4) starts proxy module between the first data center and third data center, connects the first data center
First message queue and third data center third message queue, consumption of the proxy module as first message queue
Message is transmitted to third data center from the first data center as the producer of third message queue by person;
The consumer of the second data center of step 5) and the consumer of third data center are respectively from local message queue
Middle consumption handles message.
When multiple data centers are the producer, and a data center is consumer, the present embodiment may include:
The producer of the second data center of step 1) and the producer of third data center are connected respectively to local second
Message queue and third message queue, the producer send the message that topic is message, the second number to corresponding message queue
Message is cached in queue according to the second message queue and third message queue of center and third data center;
The consumer of the first data center of step 2) is connected to local first message queue, and consumption topic is message
Message;
Step 3) starts proxy module between the first data center and the second data center, connects the first data center
First message queue and the second data center second message queue, consumption of the proxy module as second message queue
Message is transmitted to the first data center from the second data center as the producer of first message queue by person;
Step 4) starts broker program between the first data center and third data center, connects the first data center
First message queue and third data center third message queue, consumption of the proxy module as third message queue
Message is transmitted to the first data center from third data center as the producer of first message queue by person.
The consumer of the first data center of step 5) consumption processing message from local message queue.
As it can be seen that the producers and consumers in data transfer operation in the case of both the above in each data are only with connection
Local message queue carries out corresponding operation.Message transmission between data center realized by proxy module,
Avoid the problem of operation across data center causes.
It should be noted that it is possible to the problem of duplicating transmitting during proxy module carries out message transmission,
The method that any one the processing message that can be then provided using the prior art repeats transmitting, is handled it, in this implementation
It does not repeat them here.
Also, the consumer in the present embodiment can select message queue to consume message nearby, without waiting for message in number
It is transmitted according between center, the overall performance of lifting system.And the consumers and producers of each data center are not necessarily to attention number
According to the information between center, simplify total system service logic, reduces coupling.Data channel between data center is by acting on behalf of mould
Block undertakes, and is not in that the operation system of a data center is directly connected to the operation system of another data center, be easy into
Row manages and maintains.
The embodiment of the present application provides a kind of message delivery method of message queue, can will be across team by proxy server
Column message, that is, carried across the message of data center, and then the server of each message queue, that is, every number
Message can be obtained and deliver message by only needing to be attached with the message queue of the data center according to the server at center, be avoided
Server in data center carries out message transmission across the isolation between data center, reduces the complexity of data transmission
Property, and when there is network jitter, the server of data center only needs normally from correspondence without handling jitter problem
Message queue obtain message, avoid the occurrence of message blocking problem, at the same only by proxy server progress message transmission,
Be conducive to carry out the Network Isolation and management operation between data center.
A kind of messaging device of message queue provided by the embodiments of the present application is introduced below, it is described below
A kind of messaging device of message queue can correspond to each other ginseng with a kind of above-described message delivery method of message queue
According to.
Referring to FIG. 3, Fig. 3 shows for a kind of structure of the messaging device of message queue provided by the embodiment of the present application
It is intended to.
In the present embodiment, the apparatus may include:
Message capturing module 100 is sent for the server when first message queue to the server of second message queue
When across queue message, message acquisition processing is carried out to first message queue according to the first preset protocol, is obtained across queue message;
Message dilivery module 200, for that will be disappeared across queue message to second message queue according to the second preset protocol
Delivery processing is ceased, so that the server of second message queue is obtained from second message queue across queue message.
The embodiment of the present application also provides a kind of server, comprising:
Memory, for storing computer program;
Processor realizes the step of message delivery method as described above in Example when for executing the computer program
Suddenly.
The embodiment of the present application also provides a kind of computer readable storage medium, stores on the computer readable storage medium
There is computer program, the computer program realizes message delivery method as described above in Example when being executed by processor
Step.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only
Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit
Store up the medium of program code.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above to the message delivery method, messaging device, server of a kind of message queue provided herein with
And computer readable storage medium is described in detail.Used herein principle and embodiment party of the specific case to the application
Formula is expounded, the description of the example is only used to help understand the method for the present application and its core ideas.It should refer to
It out, for those skilled in the art, can also be to the application under the premise of not departing from the application principle
Some improvement and modification can also be carried out, these improvement and modification are also fallen into the protection scope of the claim of this application.
Claims (10)
1. a kind of message delivery method of message queue characterized by comprising
When the server of first message queue sends across queue message to the server of second message queue, proxy server root
Message acquisition processing is carried out to first message queue according to the first preset protocol, is obtained described across queue message;
Described message dilivery processing will be carried out to second message queue across queue message according to the second preset protocol, so as to described the
The server of two message queues obtains described across queue message from the second message queue.
2. message delivery method according to claim 1, which is characterized in that further include:
When the message dilivery is handled successfully, the second message queue sends confirmation message to the proxy server;
When the proxy server receives the confirmation message, the proxy server is sent to the first message queue
Confirmation message.
3. message delivery method according to claim 1, which is characterized in that when the server of first message queue is to second
When the server of message queue sends across queue message, proxy server carries out first message queue according to the first preset protocol
Message acquisition processing obtains described across queue message, comprising:
The server of the first queue according to first preset protocol will it is described across queue message to the first message team
Column carry out message dilivery processing;
When the message dilivery is handled successfully, the proxy server is according to first preset protocol to the first message
Queue carries out message acquisition processing, obtains described across queue message.
4. message delivery method according to claim 1, which is characterized in that the server of the second message queue is from institute
It is described across queue message to state second message queue acquisition, comprising:
The server of the second message queue carries out message to the second message queue according to second preset protocol and obtains
Processing is taken, is obtained described across queue message.
5. message delivery method according to any one of claims 1 to 4, which is characterized in that first preset protocol is
AMQP agreement or MQTT agreement;
Second preset protocol is AMQP agreement or MQTT agreement.
6. message delivery method according to claim 5, which is characterized in that further include:
Before the proxy server carries out message acquisition processing, the proxy server is according to preset configuration and described across team
The type of column message judges whether to message acquisition processing;
The step of message obtains processing is carried out to first message queue according to the first preset protocol if so, executing.
7. message delivery method according to claim 6, which is characterized in that further include:
Before carrying out message dilivery processing, the proxy server is according to the preset configuration and the class across queue message
Type judges whether to message dilivery processing;
If so, executing described will carry out message dilivery processing to second message queue across queue message according to the second preset protocol
The step of.
8. a kind of messaging device of message queue characterized by comprising
Message capturing module sends to the server of second message queue for the server when first message queue and disappears across queue
When breath, message acquisition processing is carried out to first message queue according to the first preset protocol, is obtained described across queue message;
Message dilivery module, for according to the second preset protocol described message throwing will to be carried out to second message queue across queue message
Processing is passed, so that the server of the second message queue is described across queue message from second message queue acquisition.
9. a kind of server characterized by comprising
Memory, for storing computer program;
Processor realizes message delivery method as described in any one of claim 1 to 7 when for executing the computer program
The step of.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program, the computer program realize message delivery method as described in any one of claim 1 to 7 when being executed by processor
Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910146531.4A CN109815035A (en) | 2019-02-27 | 2019-02-27 | A kind of message delivery method and relevant apparatus of message queue |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910146531.4A CN109815035A (en) | 2019-02-27 | 2019-02-27 | A kind of message delivery method and relevant apparatus of message queue |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109815035A true CN109815035A (en) | 2019-05-28 |
Family
ID=66607749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910146531.4A Pending CN109815035A (en) | 2019-02-27 | 2019-02-27 | A kind of message delivery method and relevant apparatus of message queue |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109815035A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110413424A (en) * | 2019-07-24 | 2019-11-05 | 深圳乐信软件技术有限公司 | Configurable third party's message callback method, device, server and storage medium |
CN115118763A (en) * | 2022-06-27 | 2022-09-27 | 平安银行股份有限公司 | Method and system for self-adaptive switching of message middleware and data maintenance system |
CN116755905A (en) * | 2023-06-26 | 2023-09-15 | 广州三七极创网络科技有限公司 | Data interaction method, device, equipment and storage medium based on message queue |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101695051A (en) * | 2009-10-21 | 2010-04-14 | 中国人民解放军理工大学 | Queue length balance dispatching method used for buffered Crossbar |
CN106657314A (en) * | 2016-12-14 | 2017-05-10 | 北京奇艺世纪科技有限公司 | Cross-data center data synchronization system and method |
CN108712332A (en) * | 2018-05-17 | 2018-10-26 | 华为技术有限公司 | A kind of communication means, system and device |
-
2019
- 2019-02-27 CN CN201910146531.4A patent/CN109815035A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101695051A (en) * | 2009-10-21 | 2010-04-14 | 中国人民解放军理工大学 | Queue length balance dispatching method used for buffered Crossbar |
CN106657314A (en) * | 2016-12-14 | 2017-05-10 | 北京奇艺世纪科技有限公司 | Cross-data center data synchronization system and method |
CN108712332A (en) * | 2018-05-17 | 2018-10-26 | 华为技术有限公司 | A kind of communication means, system and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110413424A (en) * | 2019-07-24 | 2019-11-05 | 深圳乐信软件技术有限公司 | Configurable third party's message callback method, device, server and storage medium |
CN110413424B (en) * | 2019-07-24 | 2021-12-10 | 深圳乐信软件技术有限公司 | Configurable third-party message callback method, device, server and storage medium |
CN115118763A (en) * | 2022-06-27 | 2022-09-27 | 平安银行股份有限公司 | Method and system for self-adaptive switching of message middleware and data maintenance system |
CN116755905A (en) * | 2023-06-26 | 2023-09-15 | 广州三七极创网络科技有限公司 | Data interaction method, device, equipment and storage medium based on message queue |
CN116755905B (en) * | 2023-06-26 | 2024-02-13 | 广州三七极创网络科技有限公司 | Data interaction method, device, equipment and storage medium based on message queue |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109815035A (en) | A kind of message delivery method and relevant apparatus of message queue | |
CN103188653B (en) | Receive the method for data, the method sending data, mobile terminal and server | |
CN107659549A (en) | A kind of flow path processing method and device and server based on event | |
CN103548315B (en) | Method and apparatus for high performance low latency real time notification delivery | |
CN104348697B (en) | The processing method of video communication information, apparatus and system | |
CN108632882A (en) | A kind of bit rate control method, PCF entities, AMF entities and SMF entities | |
CN108390950A (en) | A kind of information push method, device and equipment | |
TW200814672A (en) | Method and system for a user space TCP offload engine (TOE) | |
CN103856440A (en) | Message processing method, server and message processing system based on distributed bus | |
CN109300217A (en) | Queuing management method, computer storage medium, queuing server and system | |
CN108347350B (en) | Communication method and device | |
CN106878197A (en) | A kind of management system and method for the transmission of cloud platform message | |
JP2013533555A5 (en) | ||
WO2019128647A1 (en) | Message transmission method and device, storage medium and electronic device | |
CN108632844B (en) | Information processing method, device and electronic equipment | |
CN106960315A (en) | Resource information processing method, apparatus and system | |
CN107979520A (en) | Message treatment method and message processing apparatus | |
EP2588966A2 (en) | Fix proxy server | |
CN105847284B (en) | A kind of communication service processing method, device and and server | |
CN106850770A (en) | High-efficiency transmission method and device based on cloud computing service | |
CN110225129A (en) | Based on block chain application extension control method and intelligent terminal, privately owned Cloud Server | |
CN107302505B (en) | Manage the method and device of caching | |
WO2010121531A1 (en) | Method for terminal management system updating terminal status and terminal management system | |
CN109800096A (en) | A kind of method and system that message block is retransmitted | |
CN109274093A (en) | A kind of electric power resource scheduling 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: 20190528 |