CN104753817B - A kind of cloud computing Message Queuing Services local analogy method and system - Google Patents

A kind of cloud computing Message Queuing Services local analogy method and system Download PDF

Info

Publication number
CN104753817B
CN104753817B CN201310727064.7A CN201310727064A CN104753817B CN 104753817 B CN104753817 B CN 104753817B CN 201310727064 A CN201310727064 A CN 201310727064A CN 104753817 B CN104753817 B CN 104753817B
Authority
CN
China
Prior art keywords
message
queue
message queue
node
service
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.)
Active
Application number
CN201310727064.7A
Other languages
Chinese (zh)
Other versions
CN104753817A (en
Inventor
杨帅
孔令军
肖玉朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201310727064.7A priority Critical patent/CN104753817B/en
Publication of CN104753817A publication Critical patent/CN104753817A/en
Application granted granted Critical
Publication of CN104753817B publication Critical patent/CN104753817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of cloud computing Message Queuing Services local analogy method and systems, this method comprises: creating this simulation message queue cluster according to the queue request to create when receiving message queue request to create;Wherein, the message queue in described simulation message queue cluster includes service queue and the corresponding mirror image queue that the service queue is corresponded to from message queue node in main message queue node;The service queue realizes that data are synchronous by heartbeat mechanism with corresponding mirror image queue;When receiving the message of producer's transmission, the message is routed to corresponding message queue.In the present invention, the availability of the cloud computing message queue of this simulation is improved.

Description

A kind of cloud computing Message Queuing Services local analogy method and system
Technical field
The present invention relates to field of communication technology more particularly to a kind of cloud computing Message Queuing Services local analogy method and it is System.
Background technique
Cloud computing (cloud computing) is that current information technology develops a burning hoter direction, it refers to base In the increase, use and delivery mode of the related service of internet, be usually directed to through internet provide dynamic easily extension and The resource often virtualized.Cloud computing is broadly divided into three levels: infrastructure services (IaaS), and platform services (PaaS) and software services (SaaS).PaaS(Platform-as-a-Service, platform service) actually refer to will be soft The platform of part research and development is supplied to developer's use as a kind of service, and various Service Sources are open, to the resource used into Row reasonable charge, and trustship O&M is carried out to the application program of exploitation.
Message queue essence is the chained list of a message.Message can be regarded as a record, have specific format with And specific priority.There is the process of write permission that can add according to certain rules into message queue message queue newly to disappear Breath;There is the process of read right that can then read to walk message from message queue message queue.
Message Queuing Services are that cloud computing PaaS platform is the Distributed Message Queue service that developer provides, and are used to different The concurrent efficient HTTP(Hyper Text Transport Protocol for executing user and submitting of step, hypertext transfer protocol) Request task.Traditional sending in HTTP request to multiple users serially executes, and a message is sent and can just send Next message, this mode influence the working efficiency of overall task.It, can be each transmission after having used Message Queuing Services The task of HTTP request is put into queue, then these tasks execute i.e. in a manner of asynchronism and concurrency on backstage after queue is added, always Duration is that task is put into the sum of Queue time and task execution time, each as long as the concurrency of queue task execution is sufficiently large Task execution time can be considered the execution time of parallel task, and this mode substantially increases the working efficiency of overall task.
Message Queuing Services can be used as a kind of service that cloud computing PaaS platform externally provides, and developer is in exploitation cloud The service provided using cloud message queue cluster can be provided when application program, including create queue, addition individual task, criticize Addition task is measured, task is pushed into queue, acquisition queue residue length, discharges the operations such as queue, closing Message Queuing Services.
Exploitation debugging is based on using the application program of cloud Message Queuing Services mainly to use following two mode:
1) Integrated Development Tool, is unified based on local exploitation engine and has developed application deployment to cloud runtime engine Afterwards, by checking cloud running log, the program code that debugging uses cloud Message Queuing Services is carried out, schematic diagram can join See Fig. 1.
But the necessary real-time interconnection of application program of this mode development person exploitation, is only packaged the program code of oneself Runtime engine is passed to, and runtime engine Web portal solicitation message queue service beyond the clouds, can just check that program uses message queue The log(log of service), and if program code is no to call API(Application Programming in time Interface, application programming interfaces) method discharges the message queue not used in time, it will cause cloud message queue money The waste in source.
2) message queue (Message of cloud Message Queuing Services can, be simulated in locally pre-installation one Queuing, MQ), just it is changed into the application for calling local message queue using the application program of cloud Message Queuing Services in this way Program so that it is convenient to developer can also debug the cloud application program of oneself under conditions of not networking, and avoid due to The waste problem lack of standardization that cloud Message Queuing resource is caused using Message Queuing Services in program.Its schematic diagram may refer to figure 2。
This mode does not account for the message queue centralized in the case where widely applying program use and easily becomes Bottleneck, standalone message queue service is unable to satisfy a large amount of concurrent request of user, and does not have back mechanism, when centralized message After Single Point of Faliure occurs in queue, the loss of data in message queue will lead to.
Summary of the invention
The present invention provides a kind of cloud computing Message Queuing Services local analogy method and systems, to improve this simulation Cloud computing message queue availability.
In order to reach the goals above, the embodiment of the invention provides a kind of this simulation of cloud computing Message Queuing Services sides Method, comprising:
When receiving message queue request to create, this simulation message queue collection is created according to the queue request to create Group;Wherein, the message queue in described simulation message queue cluster includes the service queue in main message queue node, with And the corresponding mirror image queue that the service queue is corresponded to from message queue node;The service queue and corresponding mirror image queue Realize that data are synchronous by heartbeat mechanism;
When receiving the message of producer's transmission, the message is routed to corresponding message queue.
The embodiment of the invention also provides a kind of cloud computing Message Queuing Services local simulation system,
Include:
Queue creating unit creates local when receiving message queue request to create according to the queue request to create Simulate message queue cluster;Wherein, the message queue in described simulation message queue cluster includes main message queue node In service queue and the corresponding mirror image queue that the service queue is corresponded to from message queue node;The service queue Realize that data are synchronous by heartbeat mechanism with corresponding mirror image queue;
Routing unit, for when receiving the message of producer's transmission, the message to be routed to corresponding message team Column.
In the above embodiment of the present invention, when creating this simulation message queue cluster, using principal and subordinate's message queue node Framework, service queue is created in main message queue node, and the business team is created from message queue node corresponding Corresponding mirror image queue is arranged, the two collectively forms the master/slave mirror image queue cluster of leader follower replication, two-way backup, improves The availability of the cloud computing message queue of this simulation.
Detailed description of the invention
Fig. 1 is that the signal based on the application program for using cloud Message Queuing Services is debugged in a kind of exploitation in the prior art Figure;
Fig. 2 is another exploitation debugging showing based on the application program for using cloud Message Queuing Services in the prior art It is intended to;
Fig. 3 is that a kind of process of cloud computing Message Queuing Services local provided in an embodiment of the present invention analogy method is illustrated Figure;
Fig. 4 is a kind of architecture diagram of cloud computing Message Queuing Services local provided in an embodiment of the present invention simulation system;
Fig. 5 is a kind of schematic diagram of message transmitting confirmation mechanism provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram for the method that provided in an embodiment of the present invention simulation message queue is supported;
Fig. 7 is a kind of structural representation of cloud computing Message Queuing Services local provided in an embodiment of the present invention simulation system Figure.
Specific embodiment
For above-mentioned the technical problems existing in the prior art, the embodiment of the invention provides a kind of cloud computing message queues Service the technical solution of this simulation.In the technical scheme, when receiving message queue request to create, according to the queue Request to create creates this simulation message queue cluster;Wherein, the message queue of this simulation message queue cluster includes master Service queue and the corresponding mirror image queue that the service queue is corresponded to from message queue node in message queue node; The service queue realizes that data are synchronous by heartbeat mechanism with corresponding mirror image queue;When the message for receiving producer's transmission When, which is routed to corresponding message queue.
In embodiments of the present invention, when creating this simulation message queue cluster, using principal and subordinate's message queue node Framework creates service queue in main message queue node, and creates the service queue from message queue node corresponding Corresponding mirror image queue, the two collectively form the master/slave mirror image queue cluster of leader follower replication, two-way backup, improve The availability of the cloud computing message queue of this simulation.
Below in conjunction with the attached drawing in the application, clear, complete description is carried out to the technical solution in the application, is shown So, described embodiment is a part of the embodiment of the application, instead of all the embodiments.Based on the implementation in the application Example, those of ordinary skill in the art's every other embodiment obtained without making creative work, all belongs to In the range of the application protection.
As shown in figure 3, being a kind of stream of cloud computing Message Queuing Services local provided in an embodiment of the present invention analogy method Journey schematic diagram, may comprise steps of:
Step 301, when receiving message queue request to create, this simulation message team is created according to the queue request to create Column cluster;Wherein, the message queue in this simulation message queue cluster includes the service queue in main message queue node, with And the corresponding mirror image queue that the service queue is corresponded to from message queue node;Service queue passes through with corresponding mirror image queue Heartbeat mechanism realizes that data are synchronous.
Specifically, in embodiments of the present invention, disappearing in creation to improve the availability of this simulation message queue cluster When ceasing queue, using the framework of principal and subordinate's message queue node, service queue is created in main message queue node, and corresponding The corresponding mirror image queue of the service queue is created from message queue node, service queue and mirror image queue provide service jointly, Sharing for load is realized, a large amount of concurrent request of user can be successfully managed;Meanwhile two-way backup therebetween, effectively keep away The loss of the data in the message queue as caused by Single Point of Faliure is exempted from.
Wherein, when main message queue nodes break down, the main message queue node is corresponding from message queue node It converts as main message queue node, is converted to service queue from the mirror image queue in message queue node;As the master to break down When message queue node restores, which is converted to from message queue node, in the main message queue node Service queue is converted to mirror image queue.
Step 302, when receive the producer transmission message when, which is routed to corresponding message queue.
Specifically, in embodiments of the present invention, when creating this simulation message queue cluster, in the message queue of creation The binding of link is established between corresponding interchanger, and saves switch name, message queue title and bindingkey The corresponding relationship of (binding pathname).
The producer needs to carry switch name and routingkey(routing master within the message when sending message Key).
It correspondingly, can should according to the switch name carried in message when receiving the message of producer's transmission Message is transmitted to corresponding interchanger, and then is routed the message according to the routingkey carried in the message by the interchanger To corresponding message queue.
Wherein, interchanger can inquire the corresponding relationship (exchange of itself storage according to the routingkey carried in message The corresponding relationship of machine title, message queue title and bindingkey), when itself storage corresponding relationship in include and this When the matched bindingkey of routingkey, which is routed to the corresponding message queue of the bindingkey.
In order to further realize load balancing, in embodiments of the present invention, when needing to route messages to corresponding disappear When ceasing in queue, it can first judge whether the major queue of the corresponding message queue of the message is in overload status;If being judged as It is that the message is then routed to the mirror image queue of corresponding message queue;Otherwise, which is routed to corresponding message queue Service queue.
Wherein, message queue can specifically include in overload status:
The practical connection number of message queue is greater than preset maximum number of connections;Or/and
The response time of message queue is greater than preset time threshold.
In order to further increase the safety of data in message queue, avoid Single Point of Faliure that data in message queue is caused to lose It loses, in embodiments of the present invention, this simulation message queue cluster is provided with persistence function;When the producer sends message, It needs to carry persistence property parameters in the message.
Correspondingly, interchanger and message queue are persistence attribute, to guarantee tying up between interchanger and message queue It surely is persistence.
In order to further increase the safety of data in message queue, prevent illegal user from reading the number in message queue According in embodiments of the present invention, the producer needs to send using the message queue key pair that platform distributes when sending message Message is encrypted;Correspondingly, it when receiving the access request to the message in message queue, needs to take in access request The key of band is verified and (determines whether the key can decrypt the message of requested access to encryption), and when being verified (i.e. the key can decrypt requested access to encryption information), allows to access to the message.
Further, in embodiments of the present invention, when receiving message queue state and checking request, web can be passed through The state of the corresponding message queue of showing interface;Wherein, the state of the message queue may include the number of message queue, name The quantity of message in title and each message queue.
The technical solution that embodiment provides for a better understanding of the present invention, below with reference to specific application scenarios to this hair The technical solution that bright embodiment provides is further described in more detail.
In this embodiment, the architecture diagram of cloud computing Message Queuing Services local simulation system can be as shown in figure 4, main Including cloud runtime engine message queue, local exploitation engine, this simulation message queue node cluster, the cloud runtime engine Message queue is connected by internet with local exploitation engine, which can be taken by developer locally It builds.Wherein:
Cloud runtime engine Message Queuing Services are the target message queues of this simulation, it provides distribution for developer Formula Message Queuing Services, the data that can be transmitted between the process of different computer nodes, while realizing that asynchronism and concurrency is efficiently held The HTTP request task that row user submits.User can use Message Queuing Services by API, and the sender of message (produces Person) send a message to message queue after can return immediately, without waiting for the response of recipient (i.e. consumer), message can quilt It saves in the queue, until recipient takes out it, the efficiency of system is can be improved in this asynchronous mode.Moreover, sender is not necessarily to Connection is directly established with recipient, both sides guarantee that message can be routed to recipient from sender by message queue, between completion Grounding connection.
Local exploitation engine modules are the unified Integrated Development Tool that developer provides, it is integrated with using this simulation Message queue cluster SDK(Software Development Kit, Software Development Kit), by it can create queue, Add the functions such as individual task, batch addition task, query request length.
Local message queue node cluster includes High Availabitity mirror image queue cluster and load balancing HAProxy.Wherein:
Mirror image queue cluster, for the message for receiving the message of producer's transmission and being routed to these message in server Queue.In this embodiment, use interchanger Exchange for Direct type route pattern.Node B can as node A from Message queue node, creation has a corresponding mirror image queue of the service queue of node A in node B, the two collectively form leader follower replication, The master/slave mirror image queue cluster of two-way backup.It will create the mirror image queue mirror queue of node A in node B, And by the way that identical cookie is arranged, when there is data variation in the message queue for having node, monitored by the heartbeat mechanism of node Message queue with identical cookie, so finishing service queue in mirror image queue data it is synchronous.As master node A Delay machine, slave node B can switch to master immediately, after node A is repaired, node B can synchrodata to node A, node A at this time Become slave node, B becomes new master node.Meanwhile according to business needs can increase main message queue node and from Message queue node.
Wherein, above-mentioned interchanger Exchange is that Direct type route pattern refers to, the producer needs when sending message A routingkey and specific interchanger Exchange is specified for message, be needed between Exchange and the queue of creation The binding for establishing link, by switch name ExchangeName, message queue title QueueName, binding pathname Bindingkey three binds, and the routingkey of message can be compared after Exchange receives message and has binding The bindingkey in path can be sent the message to after matching in the specified message queue of bindingkey, complete message sending, The function of routing forwarding.
Load balancing HAProxy is responsible for the load balancing of each message queue node, by the producer send message transfers to The producer's monitoring for loading lower message queue node, while having taken over transmission message is maintained into each message queue node connection Task, prevent because the producer is to message queue node connection disconnection and the case where send message failure.
System architecture based on shown in Fig. 4, this simulation of cloud computing Message Queuing Services provided in an embodiment of the present invention side Method may include:
When developer is based on unified Integrated Development Tool (IDE) exploitation program, local message queue service, root are first turned on Need to build message queue cluster according to business.The configuration of default is that node A is main message queue node, for creating specific industry Be engaged in queue QueueA and QueueB, and node B is from message queue node, for creating the mirror image queue MirrorQueueA of business And MirrorQueueB.Configuration message queue node cookie is identical value.Node B is added to cluster in node A In cluster, each node carries out heartbeat monitor according to identical cookie in message queue cluster, and mirror image team is arranged in node A Column strategy, default are to create a mirror image queue by other nodes in the cluster with the queue of " ha. " beginning title MirrorQueue。
Load balancing HAProxy is built for completing the load balancing of High Availabitity message queue node.It can be set herein Maximum number of connections maxconn and time-out time timeout, i.e., when the practical connection number of node be greater than maximum number of connections, or/and, When the response time of node is more than time-out time, it is believed that the node overload.Load balancing uses roundrobin(poll), Each server uses in turn according to weight, if the processing time of server is evenly distributed, this is most smooth and fair calculation Method.Algorithm is dynamically that the weight for starting slow server for example can adjust in operation.Configuration monitoring message team simultaneously Arrange address of node and port.
Before the producer sends message, the function of message queue cluster persistence is set, Single Point of Faliure is avoided to cause in queue Message data is lost.Need to be arranged the persistence property parameters of message when sending message MessageProperties.PERSISTENT_TEXT_PLAIN, while interchanger exchange is set and queue queue is Persistence attribute, this setting guarantee that the binding between them is also persistence.To meet reliability, guarantee recipient only It receives message and deletes former message again, need exist for increasing interchanger exchange and sender and queue and consumer The ack affirmation mechanism of consumer, has ensured the reliable transmission of message.When connection is abnormal, need to retransmit message, Its schematic diagram can be as shown in Figure 5.
When sending message, need to fill in the message queue key accesskey that platform is developer's distribution, all transmissions Message is encrypted in advance using accesskey, and service logic needs accesskey to access specific message queue, only real user Own message queue could be used.This mechanism has ensured that the message content of each business is secure storage, other business cannot The data of non-self business are accessed.
It finally when not using Message Queuing Services, needs to close message queue, prevents from occupying waste system resource.
In this embodiment, the master node, slave node of message queue constitutes master/slave master-slave back-up High Availabitity mould Type can be immediately transferred to master from node slave and externally provide Message Queuing Services when delay machine occurs in host node master. It rejoins message queue cluster when original host node reparation finishes and can be changed into new slave node, constitute again Master/slave master-slave back-up model.
Message is sent, message is received and need to only be tied to specific service queue title, mirror image queue mechanism can be from node Mirror image queue mirror queue is automatically created, even if host node delay machine, without message queue title in change program, is owned Queued name's maintenance work it is transparent to developer.
In this embodiment, exploitation engine unifies Integrated Development Tool by integrated message queue SDK to this simulation Message Queuing Services are called, the main invasive team building column of the method for support, addition individual task, batch addition task, inquiry The functions such as queue length, main support method are shown in Figure 6:
1, developer passes through unified Integrated Development Tool and initiates to use the request of local message queue service, calls TaskQueue (appid) constructed fuction creates message queue, and appid is using id, and platform can apply user according to appid Authenticated using the legitimacy of message queue.
2, developer can call TaskQueue.addTask (task, accesskey, appid) to add individual task, Wherein task is specific tasks image parameter, and accesskey is the key for accessing message queue, and platform can be according to accesskey Whether verifying application has permission the addition task task into queue.If application directly passes through http protocol access message queue, Then message has to pass through base64 coding, and this avoid message sink mistakes caused by the coded format of message confusion.The SDK Method bottom has done base64 code conversion to message.
3, developer can call TaskQueue.addTask (tasklist, accesskey, appid) batch addition to appoint Business, wherein tasklist is batch tasks image parameter, and developer can be put into related task task in tasklist set, It is primary to add task to message queue batch.
4, developer can call TaskQueue.getLeftLength (tasklist, accesskey, appid) to obtain Queue residue length, wherein tasklist is batch tasks image parameter.
5, developer can call TaskQueue.recv (accesskey, appid) to read from the message queue of creation Message.
6, developer can call TaskQueue.release (accesskey, appid) to discharge the message that oneself is created Queue resource.
7, developer can check that the state of message queue, including node have message queue by local web interface Number, title, message number etc. in each queue.
Wherein, above-mentioned appid is using id, and developer passes through runtime engine platform portal application for registration development and application program When, platform can be one appid of each application assigned, be used for this application program of unique identification.
Above-mentioned accesskey is the key that user accesses Message Queuing Services, and user passes through runtime engine platform portal Shen Message Queuing Services please be try out, platform can distribute the key accesskey of access Message Queuing Services for developer, to split Originator carries out legitimacy certification, and encrypts to message, prevents rogue program from stealing information in other application message queue and provides Source.
Above-mentioned base64 coding, when can pass any message to message queue using SDK based on http agreement, due to Message is the byte stream through serializing, and is not belonging to standard code character as defined in http agreement, so needing to carry out base64 volume Code.Message queue SDK method bottom encapsulates base64 coding and realizes, developer does not have to worry Confused-code, can transmit any Message content gives SDK interface.
By above description as can be seen that it is necessary to avoid developer in technical solution provided in an embodiment of the present invention The application program of real-time interconnection ability debugging operations cloud Message Queuing Services, avoids and uses message due to lack of standardization in program The problem of queue service causes cloud message queue data to make malicious attack, while also being capable of full simulation cloud message queue height Availability feature, avoids Single Point of Faliure, has message queue persistence characteristic.
Based on the same technical idea, the embodiment of the invention also provides a kind of this simulations of cloud computing Message Queuing Services System can be applied to above method embodiment.
As shown in fig. 7, being a kind of knot of cloud computing Message Queuing Services local provided in an embodiment of the present invention simulation system Structure schematic diagram may include:
Queue creating unit 71 creates this according to the queue request to create when receiving message queue request to create Simulation message queue cluster;Wherein, the message queue in described simulation message queue cluster includes main message queue section Service queue and the corresponding mirror image queue that the service queue is corresponded to from message queue node in point;The business team Column realize that data are synchronous by heartbeat mechanism with corresponding mirror image queue;
Routing unit 72, for when receiving the message of producer's transmission, the message to be routed to corresponding message Queue.
Wherein, the routing unit 72 specifically includes: forwarding subelement and interchanger subelement;
The forwarding subelement 721, for being transmitted to the message according to the switch name carried in the message Corresponding interchanger;
The interchanger subelement 722, for will be described according to the routing major key routingkey carried in the message Message is routed to corresponding message queue.
Wherein, the queue creating unit 71 is specifically used for, when creating this simulation message queue cluster, in creation The binding of link is established between message queue and corresponding interchanger, and saves switch name, message queue title, and tie up Determine the corresponding relationship of pathname bindingkey;
The interchanger subelement 722 is specifically used for, and the corresponding relationship of itself storage is inquired according to the routingkey, When in the corresponding relationship including bindingkey matched with the routingkey, the message is routed to this The corresponding message queue of bindingkey.
Wherein, the routing unit 72 specifically includes:
Load balancing subelement 723, for judging whether the service queue of the corresponding message queue of the message is in super The message is routed to the mirror image queue in corresponding message queue if being judged as YES by load condition;It otherwise, will be described Message is routed to the service queue in corresponding message queue.
Wherein, message queue is specifically included in overload status:
The practical connection number of message queue is greater than preset maximum number of connections;Or/and
The response time of message queue is greater than preset time threshold.
Wherein, the message that the producer sends is to add by the message queue key that the producer is distributed using platform Message after close;
Cloud computing Message Queuing Services provided in an embodiment of the present invention local simulation system further include:
Authentication unit 73, for receiving when cloud computing Message Queuing Services local simulation system to the message When access request, the key carried in the access request is verified, and when being verified, is allowed to the message Access.
Wherein, cloud computing Message Queuing Services provided in an embodiment of the present invention local simulation system further include:
Display unit 74, for showing corresponding disappear by web interface when receiving message queue state and checking request Cease the state of queue.
Wherein, the state of the message queue includes: message in the number, title and each message queue of message queue Quantity.
Wherein, described to convert from message queue node as main message queue section when main message queue nodes break down Point, the mirror image queue from message queue node are converted to service queue;
When the main message queue node to break down restores, the main message queue node is converted to from message team Column node, the service queue in the main message queue node are converted to mirror image queue.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by Software adds the mode of required general hardware platform to realize, naturally it is also possible to which by hardware, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which is stored in a storage medium, if including Dry instruction is used so that a terminal device (can be mobile phone, personal computer, server or the network equipment etc.) executes sheet Invent method described in each embodiment.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered Depending on protection scope of the present invention.

Claims (14)

1. a kind of cloud computing Message Queuing Services local analogy method characterized by comprising
When receiving message queue request to create, this simulation message queue cluster is created according to the queue request to create;Its In, the message queue in described simulation message queue cluster includes service queue in main message queue node and right The mirror image queue of the service queue is corresponded in the slave message queue node answered;The service queue passes through with corresponding mirror image queue Heartbeat mechanism realizes that data are synchronous;
When receiving the message of producer's transmission, the message is routed to corresponding message queue, specifically: described in judgement Whether the service queue of the corresponding message queue of message is in overload status, if being judged as YES, the message is routed to Otherwise the message is routed to the service queue in corresponding message queue by the mirror image queue in corresponding message queue;
It is described to convert from message queue node as main message queue node when main message queue nodes break down, it is described from Mirror image queue in message queue node is converted to service queue;
When the main message queue node to break down restores, the main message queue node is converted to from message queue section Point, the service queue in the main message queue node are converted to mirror image queue.
2. the method as described in claim 1, which is characterized in that it is described that the message is routed to the message queue, specifically Are as follows:
The message is transmitted to corresponding interchanger according to the switch name carried in the message, by the interchanger root The message is routed to corresponding message queue according to the routing major key routingkey carried in the message.
3. method according to claim 2, which is characterized in that when creating this simulation message queue cluster, in creation The binding of link is established between message queue and corresponding interchanger, and saves switch name, message queue title, and tie up Determine the corresponding relationship of pathname bindingkey;
The message is routed to corresponding disappear according to the routing major key routingkey carried in the message by the interchanger Queue is ceased, specifically:
The interchanger according to the routingkey inquire itself storage corresponding relationship, when in the corresponding relationship comprising with When the matched bindingkey of the routingkey, the message is routed to the corresponding message queue of the bindingkey.
4. the method as described in claim 1, which is characterized in that message queue is specifically included in overload status:
The practical connection number of message queue is greater than preset maximum number of connections;Or/and
The response time of message queue is greater than preset time threshold.
5. method according to claim 2, which is characterized in that described simulation message queue cluster is provided with persistence function Energy;The interchanger and the message queue are persistence attribute;Persistence property parameters are carried in the message.
6. the method as described in claim 1, which is characterized in that the message that the producer sends is to make by the producer The encrypted message of message queue key distributed with platform;
This method further include:
When receiving the access request to the message, the key carried in the access request is verified, and works as and tests When card passes through, allow the access to the message.
7. the method as described in claim 1, which is characterized in that this method further include:
When receiving message queue state and checking request, the state of corresponding message queue is shown by web interface.
8. the method for claim 7, which is characterized in that the state of the message queue include: the number of message queue, The quantity of message in title and each message queue.
9. a kind of cloud computing Message Queuing Services local simulation system characterized by comprising
Queue creating unit creates this simulation according to the queue request to create when receiving message queue request to create Message queue cluster;Wherein, the message queue in described simulation message queue cluster includes in main message queue node Service queue and the corresponding mirror image queue that the service queue is corresponded to from message queue node;The service queue with it is right The mirror image queue answered realizes that data are synchronous by heartbeat mechanism;
Routing unit, for when receiving the message of producer's transmission, the message to be routed to corresponding message queue, institute Routing unit is stated to specifically include: load balancing subelement, for judging that the service queue of the corresponding message queue of the message is It is no that the message is routed to the mirror image queue in corresponding message queue if being judged as YES in overload status, it is no Then, the service queue message being routed in corresponding message queue;
Wherein, described to convert from message queue node as main message queue node, institute when main message queue nodes break down The mirror image queue stated from message queue node is converted to service queue;
When the main message queue node to break down restores, the main message queue node is converted to from message queue section Point, the service queue in the main message queue node are converted to mirror image queue.
10. cloud computing Message Queuing Services as claimed in claim 9 local simulation system, which is characterized in that the routing is single Member specifically includes: forwarding subelement and interchanger subelement;
The forwarding subelement, for the message to be transmitted to corresponding friendship according to the switch name carried in the message It changes planes;
The interchanger subelement, for being routed the message according to the routing major key routingkey carried in the message To corresponding message queue.
11. cloud computing Message Queuing Services as claimed in claim 10 local simulation system, which is characterized in that
The queue creating unit is specifically used for, when creating this simulation message queue cluster, creation message queue and The binding of link is established between corresponding interchanger, and saves switch name, message queue title, and binding pathname The corresponding relationship of bindingkey;
The interchanger subelement is specifically used for, and the corresponding relationship of itself storage is inquired according to the routingkey, when described When in corresponding relationship including bindingkey matched with the routingkey, the message is routed to this bindingkey pairs The message queue answered.
12. cloud computing Message Queuing Services as claimed in claim 9 local simulation system, which is characterized in that at message queue It is specifically included in overload status:
The practical connection number of message queue is greater than preset maximum number of connections;Or/and
The response time of message queue is greater than preset time threshold.
13. cloud computing Message Queuing Services as claimed in claim 9 local simulation system, which is characterized in that the producer The message of transmission is the encrypted message of message queue key for using platform to distribute by the producer;
Cloud computing Message Queuing Services local simulation system further include:
Authentication unit, for being asked when cloud computing Message Queuing Services local simulation system is received to the access of the message When asking, the key carried in the access request is verified, and when being verified, allows the access to the message.
14. cloud computing Message Queuing Services as claimed in claim 9 local simulation system, which is characterized in that further include:
Display unit, for showing corresponding message queue by web interface when receiving message queue state and checking request State.
CN201310727064.7A 2013-12-25 2013-12-25 A kind of cloud computing Message Queuing Services local analogy method and system Active CN104753817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310727064.7A CN104753817B (en) 2013-12-25 2013-12-25 A kind of cloud computing Message Queuing Services local analogy method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310727064.7A CN104753817B (en) 2013-12-25 2013-12-25 A kind of cloud computing Message Queuing Services local analogy method and system

Publications (2)

Publication Number Publication Date
CN104753817A CN104753817A (en) 2015-07-01
CN104753817B true CN104753817B (en) 2019-02-05

Family

ID=53592946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310727064.7A Active CN104753817B (en) 2013-12-25 2013-12-25 A kind of cloud computing Message Queuing Services local analogy method and system

Country Status (1)

Country Link
CN (1) CN104753817B (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357296B (en) * 2015-10-30 2018-10-23 河海大学 Elastic caching system under a kind of Docker cloud platforms
CN106375419A (en) * 2016-08-31 2017-02-01 东软集团股份有限公司 Deployment method and device of distributed cluster
CN108173892B (en) * 2016-12-07 2020-11-13 腾讯科技(深圳)有限公司 Cloud mirror image operation method and device
CN106878197A (en) * 2017-02-22 2017-06-20 郑州云海信息技术有限公司 A kind of management system and method for the transmission of cloud platform message
CN106878473B (en) * 2017-04-20 2021-03-30 腾讯科技(深圳)有限公司 Message processing method, server cluster and system
CN107197015B (en) * 2017-05-23 2020-09-08 阿里巴巴集团控股有限公司 Message processing method and device based on message queue system
CN107315641B (en) * 2017-05-27 2018-08-14 杭州铭师堂教育科技发展有限公司 Message queue high-availability system based on Qconf and method
CN107450999A (en) * 2017-08-07 2017-12-08 郑州云海信息技术有限公司 A kind of method and system of cluster inter-component communication
CN108494880B (en) * 2018-04-18 2021-04-27 云家园网络技术有限公司 Communication method and system based on large-scale data center management
CN108933824A (en) * 2018-06-28 2018-12-04 郑州云海信息技术有限公司 A kind of method, system and relevant apparatus keeping RabbitMQ service
TWI678087B (en) * 2018-11-22 2019-11-21 財團法人工業技術研究院 Method of message synchronization in message queue publish and subscriotion and system thereof
CN111222862A (en) * 2018-11-27 2020-06-02 北京京东金融科技控股有限公司 Data processing method and system, medium and computer system
CN109766195A (en) * 2018-12-13 2019-05-17 平安普惠企业管理有限公司 The method and Related product of loss of data in supervisory messages queue
CN110062055B (en) * 2019-05-31 2021-07-20 四川长虹电器股份有限公司 Websocket-based single-user multi-place login distributed push method
CN110225133B (en) * 2019-06-20 2022-01-21 恒生电子股份有限公司 Message sending method, node, device, system and related equipment
CN110442447B (en) * 2019-07-05 2023-07-28 中国平安人寿保险股份有限公司 Message queue-based load balancing method and device and computer equipment
CN110768873B (en) * 2019-10-31 2021-08-10 广州酷旅旅行社有限公司 Distributed heartbeat detection method, system and device and computer equipment
CN110891032B (en) * 2019-11-27 2023-06-30 佛山市蠢材科技有限公司 Face data parallel issuing method and device and electronic equipment
US11509619B2 (en) * 2020-01-14 2022-11-22 Capital One Services, Llc Techniques to provide streaming data resiliency utilizing a distributed message queue system
CN111314114A (en) * 2020-01-19 2020-06-19 苏州浪潮智能科技有限公司 Deployment method and system for improving high availability of RabbitMQ
CN111787058A (en) * 2020-05-26 2020-10-16 北京航空航天大学 Lightweight information subscription and push method in cross-domain virtual data space
CN111897656B (en) * 2020-08-06 2022-08-16 北京中电兴发科技有限公司 Main queue load balancing method based on mirror image queue
CN112738156B (en) * 2020-12-11 2023-05-26 广东电力通信科技有限公司 Independent mirror image management method suitable for intelligent gateway
CN114095280B (en) * 2022-01-20 2022-04-19 苏州浪潮智能科技有限公司 Cloud platform server communication channel construction method, communication method, device and server
CN115150031B (en) * 2022-06-20 2024-02-27 中国工商银行股份有限公司 Distributed system message response method and device based on distributed message
CN115097941B (en) * 2022-07-13 2023-10-10 北京百度网讯科技有限公司 Character interaction detection method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101014002A (en) * 2006-12-12 2007-08-08 华为技术有限公司 Cluster message transmitting method and distributed cluster system
CN103049317A (en) * 2013-01-10 2013-04-17 中国南方电网有限责任公司超高压输电公司 Highly-concurrent data fast write system and method based on queues in cloud environment
CN103051521A (en) * 2013-01-09 2013-04-17 浪潮电子信息产业股份有限公司 Retransmitting method of message in cloud environment
CN103078893A (en) * 2011-10-25 2013-05-01 中华电信股份有限公司 Control and management device and control and management backup system applied to cloud computing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621819B (en) * 2009-07-24 2012-02-15 中兴通讯股份有限公司 Information synchronization detection method for active-standby switching interface module, network element system and link

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101014002A (en) * 2006-12-12 2007-08-08 华为技术有限公司 Cluster message transmitting method and distributed cluster system
CN103078893A (en) * 2011-10-25 2013-05-01 中华电信股份有限公司 Control and management device and control and management backup system applied to cloud computing
CN103051521A (en) * 2013-01-09 2013-04-17 浪潮电子信息产业股份有限公司 Retransmitting method of message in cloud environment
CN103049317A (en) * 2013-01-10 2013-04-17 中国南方电网有限责任公司超高压输电公司 Highly-concurrent data fast write system and method based on queues in cloud environment

Also Published As

Publication number Publication date
CN104753817A (en) 2015-07-01

Similar Documents

Publication Publication Date Title
CN104753817B (en) A kind of cloud computing Message Queuing Services local analogy method and system
CN106503098B (en) Block chain cloud service framework system built in Paas service layer
US10698717B2 (en) Accelerator virtualization method and apparatus, and centralized resource manager
US20200204352A1 (en) Method and system for facilitating data transfer between blockchains
CN113079159B (en) Edge computing network system based on block chain
US9307017B2 (en) Member-oriented hybrid cloud operating system architecture and communication method thereof
CN109510760A (en) A kind of block chain gateway that internet of things oriented is applied and the method with the gateway management Internet of Things
CN110417896A (en) The system and method for block chain dynamic group net based on cloud
US7548843B2 (en) Simulation of distributed networks
CN102138307B (en) Method and system for load balancing for services
Doan et al. FAST: Flexible and low-latency state transfer in mobile edge computing
CN109783192A (en) A kind of secure virtual machine migratory system
Cunsolo et al. Cloud@ home: Bridging the gap between volunteer and cloud computing
CN104219298B (en) Group system and its method for data backup
CN101123616A (en) A server management method and a server management system
US20200201681A1 (en) Method and system for virtualizing blockchains
CN116305136A (en) Source audit trail for micro-service architecture
CN110213338A (en) A kind of clustering acceleration calculating method and system based on cryptographic calculation
CN112631800A (en) Kafka-oriented data transmission method and system, computer equipment and storage medium
US20230137879A1 (en) In-flight incremental processing
CN203135901U (en) Encryption equipment management device
CN104537284B (en) Software protecting system and method based on remote service
CN110324365A (en) Without key front end cluster system, application method, storage medium, electronic device
CN113297133B (en) Service migration quality guarantee method and system
CN112804202B (en) Multi-internetwork data security interaction method and device, server and storage medium

Legal Events

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