WO2019205371A1 - 服务器、消息分配的方法及存储介质 - Google Patents

服务器、消息分配的方法及存储介质 Download PDF

Info

Publication number
WO2019205371A1
WO2019205371A1 PCT/CN2018/102090 CN2018102090W WO2019205371A1 WO 2019205371 A1 WO2019205371 A1 WO 2019205371A1 CN 2018102090 W CN2018102090 W CN 2018102090W WO 2019205371 A1 WO2019205371 A1 WO 2019205371A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
message
message queue
clients
service
Prior art date
Application number
PCT/CN2018/102090
Other languages
English (en)
French (fr)
Inventor
詹泽
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019205371A1 publication Critical patent/WO2019205371A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/53Network services using third party service providers

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a server, a method for message distribution, and a storage medium.
  • the message producer can apply for the topic topic of the message in the message system by the producer of the message producer.
  • the message consumer can apply for the subscription in the message system with the message consumer identifier.
  • Message topic topic Consumers typically consume a consumer queue for a cluster of multiple machines. Since the consumer cluster is occupied by the user access thread, some machines consume very slow messages. When the message is released very quickly, and the slow-consuming machine has been occupying the message queue, it will cause the message to accumulate in the message system.
  • the message system is prone to disk IO problems, such as insufficient disk space or data loss. System performance is low.
  • the purpose of the present application is to provide a server, a message distribution method, and a storage medium, which are intended to prevent message accumulation, avoid disk IO problems, and improve system performance.
  • the present application provides a server including a memory and a processor coupled to the memory, the memory storing a processing system operable on the processor, the processing system being The processor implements the following steps when executed:
  • the scanning process is started to scan the backlog value of the client consumption message queue of each service system and the message volume consumed per second;
  • a marking step when a backlog value of a client consumption message queue of a service system is greater than a predetermined threshold, and a ratio of a backlog value of the consumption message queue to a message amount consumed per second is greater than a predetermined ratio, the client of the service system is used as a client
  • the first client marks and sends the tag information to the first client
  • a redistribution step after receiving the balance request of the first client's reassignment message queue, controlling disconnection of the first client from the message queue within a predetermined time, and assigning the message queue to the first Clients of other business systems that consume the message queue outside the client.
  • the present application further provides a method for message allocation, where the method for message allocation includes:
  • the client of the service system is used as the first a client marks and sends the tag information to the first client;
  • the present application also provides a computer readable storage medium having stored thereon a processing system, the processing system being executed by a processor to implement the steps of the method of message distribution described above.
  • the application has the beneficial effects that: when the client of each service system consumes the message queue, the client scans the backlog value of the consumption message queue and the amount of messages consumed per second, and if it finds a client with slow consumption, it Put a slow consumption tag, then initiate a reassignment operation, control the client to consume the message queue within a predetermined time, and assign the message queue to each client other than the client who consumes the message queue, through this In this way, the slow-buying client is detected in time, and the slow-buying client is temporarily unable to consume the message queue, so that the message queue is consumed as soon as possible, preventing accumulation, avoiding disk IO problems, and improving system performance.
  • FIG. 1 is a schematic diagram of an optional application environment of each embodiment of the present application.
  • FIG. 2 is a schematic diagram of a first embodiment of a client consumption message queue according to the present application
  • FIG. 3 is a schematic diagram of a second embodiment of a client consumption message queue according to the present application.
  • FIG. 4 is a schematic diagram of a third embodiment of a client consumption message queue according to the present application.
  • FIG. 5 is a schematic diagram of a fourth embodiment of a client consumption message queue according to the present application.
  • FIG. 6 is a schematic flowchart of a method for distributing a message according to an application of the present application.
  • FIG. 1 it is a schematic diagram of an application environment of a preferred embodiment of a method for message distribution in the present application.
  • the application environment diagram includes a server 1, a client 2 of each service system, and a message management system 3.
  • the server 1 can perform data interaction with the client 2 and the message management system 3 of each business system through a suitable technology such as a network or a near field communication technology.
  • the terminal where the client 2 of the business system is located includes, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer or a tablet.
  • Mobile devices such as computers, smart phones, personal digital assistants (PDAs), game consoles, Internet Protocol Television (IPTV), smart wearable devices, navigation devices, etc., or such as digital TV Fixed terminals for desktop computers, notebooks, servers, etc.
  • the server 1 is a device capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the server 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud-based cloud composed of a large number of hosts or network servers, where cloud computing is a type of distributed computing.
  • a super virtual computer consisting of a group of loosely coupled computers.
  • the server 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 communicably connected to each other through a system bus, and the memory 11 stores a processing system operable on the processor 12. It is pointed out that Figure 1 only shows the server 1 with the components 11-13, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the memory 11 includes a memory and at least one type of readable storage medium.
  • the memory provides a cache for the operation of the server 1;
  • the readable storage medium can be, for example, a flash memory, a hard disk, a multimedia card, a card type memory (for example, SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM).
  • a non-volatile storage medium such as a read only memory (ROM), an electrically erasable programmable read only memory (EEPROM), a programmable read only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, or the like.
  • the readable storage medium may be an internal storage unit of the server 1, such as a hard disk of the server 1; in other embodiments, the non-volatile storage medium may also be an external storage device of the server 1, For example, a plug-in hard disk provided on the server 1, a smart memory card (SMC), a Secure Digital (SD) card, a flash card, and the like.
  • the readable storage medium of the memory 11 is generally used to store an operating system installed on the server 1 and various types of application software, such as program codes of the processing system in an embodiment of the present application. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the server 1, such as performing control and processing related to data interaction or communication with the client 2 of each service system.
  • the processor 12 is configured to run program code or process data stored in the memory 11, such as running a processing system or the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the server 1 and other electronic devices.
  • the network interface 13 is mainly used to connect the server 1 with the client 2 of the plurality of service systems, and establish a data transmission channel and a communication connection between the server 1 and the client 2 of the plurality of service systems.
  • the processing system is stored in the memory 11 and includes at least one computer readable instruction or program stored in the memory 11, the at least one computer readable instruction or program being executable by the processor 12 to implement embodiments of the present application
  • the at least one computer readable instruction can be classified into different logic modules depending on the functions implemented by the various portions thereof.
  • the scanning process is started to scan the backlog value of the client consumption message queue of each service system and the message volume consumed per second;
  • the business system can be a system used by various departments in the enterprise, such as a financial system.
  • the message system is installed in the server to implement the allocation of message queues. After the clients of each service system access the message system, the message queue can be allocated to the clients of one or more business systems for consumption.
  • a scanning process is started to perform real-time or timed scanning on the clients of the accessed service systems, including scanning the backlog value of the client consumption message queue of each service system and the message amount tps consumed per second, Analyze whether the client consumption message queue of each business system is slow.
  • a marking step when a backlog value of a client consumption message queue of a service system is greater than a predetermined threshold, and a ratio of a backlog value of the consumption message queue to a message amount consumed per second is greater than a predetermined ratio, the client of the service system is used as a client
  • the first client marks and sends the tag information to the first client
  • the ratio of the backlog value of the client consumption message queue of the service system to the message volume consumed per second is greater than a predetermined ratio. It indicates that the client consumes the message queue of the service system faster than the backlog of the message queue, that is, the consumption of the message queue is slow.
  • the predetermined threshold is 100,000 and the predetermined ratio is 10,800.
  • the ratio of the amount of messages consumed, etc., and the tag information is sent to the client of the business system.
  • a redistribution step after receiving the balance request of the first client's reassignment message queue, controlling disconnection of the first client from the message queue within a predetermined time, and assigning the message queue to the first Clients of other business systems that consume the message queue outside the client.
  • the first client After receiving the tag information, the first client starts the rebalence process to send a balance request for re-allocating the message queue to the message system, and after receiving the balance request, the message system controls the predetermined time (for example, the predetermined time is 10 minutes).
  • the first client disconnects from the message queue, and only the message queue is allocated to the clients of the other service systems that consume the message queue except the first client, so that the message queue is reassigned to the fast-consuming customers. end.
  • the message queue is allocated to the client of the service system, the client of the service system, the client 3 of the service system, and the client 4 of the service system in the initial stage.
  • the scanning process finds that the backlog value of the client 1 consumption message queue of the service system is greater than a predetermined threshold, and the ratio of the backlog value of the consumption message queue to the message amount consumed per second is greater than a predetermined ratio, the client 1 of the service system is marked.
  • the slow consumption tag sends the tag information to client 1 of the business system.
  • the reallocation operation is performed, as shown in FIG. 3, at this time, the client 1 of the service system will not acquire the consumption queue for consumption, and the consumption queue will be allocated to The client of the business system 2, the client 3 of the business system, and the client 4 of the business system consume.
  • the client of each service system consumes the message queue, by scanning the backlog value of the consumption message queue and the amount of messages consumed per second, if a client with slow consumption is found, It marks the slow consumption, then initiates the reassignment operation, controls the client to consume the message queue within a predetermined time, and assigns the message queue to other clients that consume the message queue except the client, In this way, the slow-buying client is detected in time, and the slow-buying client is temporarily unable to consume the message queue, so that the message queue is consumed as soon as possible, preventing accumulation, avoiding disk IO problems, and improving system performance.
  • the client of each other service system when the backlog value of the client consumption message queue of the service system is greater than a predetermined threshold, and the ratio of the backlog value of the consumption message queue to the message volume consumed per second is greater than a predetermined ratio, The client of the service system is marked as the second client, and the current tag information is sent to the second client;
  • the scanning process finds that the client consumption message queue of the service system is slow, the client of the service system is marked as the second client. And reassign the message queue again.
  • the first client Before the allocation, analyzing whether the connection time between the first client and the message queue is disconnected is greater than or equal to a predetermined time, that is, whether the slow consumption flag has expired, and if it fails, the first client can consume the message queue, if not If it fails, neither the first client nor the second client can consume the message queue. In this way, the client with slow consumption is flexibly controlled, so that the first client can re-sell the message queue, so that the message queue is consumed as soon as possible, preventing accumulation, further avoiding disk IO problems and improving system performance.
  • the scanning process finds that the client 2 of the service system consumes a slow message queue
  • the client 2 of the service system is marked, if the client 1 of the service system is analyzed at this time If the connection of the message queue is disconnected for a predetermined time or longer, the client 1 of the service system connects to the message queue, and the client 2 of the service system is marked to be disconnected; if the client of the service system is analyzed at this time 1
  • the disconnection of the connection with the message queue is less than the predetermined time.
  • the client 1 of the service system and the client 2 of the service system are disconnected, only the client 3 of the service system, and the service The client 4 of the system consumes the message queue.
  • the scanning process scans the client of the service system, and calculates the proportion of the clients of the currently marked service system to the clients of all the service systems that consume the message queue. If the ratio is greater than the preset ratio, preferably, The preset ratio is 2/3, and the reminder message is sent to the message management system, and the message management system notifies the responsible person of the client system according to the reminder message, for example, sending the reminder message to the terminal of the client system administrator by email In order to check the performance of these client consumption message queues, to further avoid disk IO problems and improve system performance.
  • the slow consumption flag of all the marked service system clients will be deleted, and the client of each service system can re-save the message queue, and then the scan process scans to find that the consumption is slow.
  • the client of the business system does not have to wait for the client of the business system after receiving the balance request to have the opportunity to re-save the message queue, increasing flexibility.
  • FIG. 6 is a schematic flowchart of a method for allocating a message according to the present application.
  • the method for distributing the message includes the following steps:
  • Step S1 After the service system of each message consumer accesses the message system, the scanning process is started to scan the backlog value of the client consumption message queue of each service system and the message volume consumed per second;
  • the business system can be a system used by various departments in the enterprise, such as a financial system.
  • the message system is installed in the server to implement the allocation of message queues. After the clients of each service system access the message system, the message queue can be allocated to the clients of one or more business systems for consumption.
  • a scanning process is started to perform real-time or timed scanning on the clients of the accessed service systems, including scanning the backlog value of the client consumption message queue of each service system and the message amount tps consumed per second, Analyze whether the client consumption message queue of each business system is slow.
  • Step S2 When the backlog value of the client consumption message queue of the service system is greater than a predetermined threshold, and the ratio of the backlog value of the consumption message queue to the message amount consumed per second is greater than a predetermined ratio, the client of the service system is used as the client The first client marks and sends the tag information to the first client;
  • the ratio of the backlog value of the client consumption message queue of the service system to the message volume consumed per second is greater than a predetermined ratio. It indicates that the client consumes the message queue of the service system faster than the backlog of the message queue, that is, the consumption of the message queue is slow.
  • the predetermined threshold is 100,000 and the predetermined ratio is 10,800.
  • the ratio of the amount of messages consumed, etc., and the tag information is sent to the client of the business system.
  • Step S3 after receiving the balance request of the first client's reassignment message queue, controlling the disconnection of the first client from the message queue within a predetermined time, and allocating the message queue to the first client The client of each other business system that consumes the message queue.
  • the first client After receiving the tag information, the first client starts the rebalence process to send a balance request for re-allocating the message queue to the message system, and after receiving the balance request, the message system controls the predetermined time (for example, the predetermined time is 10 minutes).
  • the first client disconnects from the message queue, and only the message queue is allocated to the clients of the other service systems that consume the message queue except the first client, so that the message queue is reassigned to the fast-consuming customers. end.
  • the client of each service system consumes the message queue, by scanning the backlog value of the consumption message queue and the amount of messages consumed per second, if a client with slow consumption is found, It marks the slow consumption, then initiates the reassignment operation, controls the client to consume the message queue within a predetermined time, and assigns the message queue to other clients that consume the message queue except the client, In this way, the slow-buying client is detected in time, and the slow-buying client is temporarily unable to consume the message queue, so that the message queue is consumed as soon as possible, preventing accumulation, avoiding disk IO problems, and improving system performance.
  • the method further includes the following steps:
  • the client of each other service system when the backlog value of the client consumption message queue of the service system is greater than a predetermined threshold, and the ratio of the backlog value of the consumption message queue to the message volume consumed per second is greater than a predetermined ratio, The client of the service system is marked as the second client, and the current tag information is sent to the second client;
  • the scanning process finds that the client consumption message queue of the service system is slow, the client of the service system is marked as the second client. And reassign the message queue again.
  • the first client Before the allocation, analyzing whether the connection time between the first client and the message queue is disconnected is greater than or equal to a predetermined time, that is, whether the slow consumption flag has expired, and if it fails, the first client can consume the message queue, if not If it fails, neither the first client nor the second client can consume the message queue. In this way, the client with slow consumption is flexibly controlled, so that the first client can re-sell the message queue, so that the message queue is consumed as soon as possible, preventing accumulation, further avoiding disk IO problems and improving system performance.
  • the method for message allocation further includes:
  • the scanning process scans the client of the service system, and calculates the proportion of the clients of the currently marked service system to the clients of all the service systems that consume the message queue. If the ratio is greater than the preset ratio, preferably, The preset ratio is 2/3, and the reminder message is sent to the message management system, and the message management system notifies the responsible person of the client system according to the reminder message, for example, sending the reminder message to the terminal of the client system administrator by email In order to check the performance of these client consumption message queues, to further avoid disk IO problems and improve system performance.
  • the method for message allocation further includes:
  • the slow consumption flag of all the marked service system clients will be deleted, and the client of each service system can re-save the message queue, and then the scan process scans to find that the consumption is slow.
  • the client of the business system does not have to wait for the client of the business system after receiving the balance request to have the opportunity to re-save the message queue, increasing flexibility.
  • the present application also provides a computer readable storage medium having stored thereon a processing system, the processing system being executed by a processor to implement the steps of the method of message distribution described above.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请涉及一种服务器、消息分配的方法及存储介质,该方法包括:在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;当接收该第一客户端的重新分配消息队列的平衡请求后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。本申请能够防止消息堆积,避免出现磁盘IO问题。

Description

服务器、消息分配的方法及存储介质
优先权申明
本申请基于巴黎公约申明享有2018年04月24日递交的申请号为CN2018103700691、名称为“服务器、消息分配的方法及存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种服务器、消息分配的方法及存储介质。
背景技术
目前,消息系统越来越普及,消息生产者producer可在消息系统中用消息生产者producer身份申请发布相关消息主题topic,消息消费者consumer可在消息系统中用消息消费者consumer身份申请订阅相关的消息主题topic。消费者一般是多台机器的一个集群对消费队列进行消费。由于消费者集群会被用户访问线程占用资源,导致部分机器消费消息非常慢。当消息发布的速度很快,而消费慢的机器又一直占用着消息队列时,将导致消息一直堆积在消息系统中,消息系统容易出现磁盘IO问题,例如磁盘空间不够用或者丢失数据等问题,系统性能低下。
发明内容
本申请的目的在于提供一种服务器、消息分配的方法及存储介质,旨在防止消息堆积,避免出现磁盘IO问题,提高系统性能。
为实现上述目的,本申请提供一种服务器,所述服务器包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
扫描步骤,在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;
标记步骤,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;
重新分配步骤,当接收该第一客户端的重新分配消息队列的平衡请求后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。
为实现上述目的,本申请还提供一种消息分配的方法,所述消息分配的方法包括:
S1,在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;
S2,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;
S3,当接收该第一客户端的重新分配消息队列的平衡请求后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现上述的消息分配的方法的步骤。
本申请的有益效果是:本申请在各业务系统的客户端消费消息队列时, 通过扫描其消费消息队列的积压值及每秒消费的消息量,如果发现有消费慢的客户端,则将其打上消费慢的标记,然后启动重新分配操作,在预定时间内控制该客户端无法消费该消息队列,并将该消息队列分配给除该客户端外消费该消息队列的各其他客户端,通过这种方式,及时发现消费慢的客户端,并控制消费慢的客户端暂时无法消费消息队列,使得消息队列尽快消费,防止堆积,避免出现磁盘IO问题,提高系统性能。
附图说明
图1为本申请各个实施例一可选的应用环境示意图;
图2为本申请客户端消费消息队列第一实施例的示意图;
图3为本申请客户端消费消息队列第二实施例的示意图;
图4为本申请客户端消费消息队列第三实施例的示意图;
图5为本申请客户端消费消息队列第四实施例的示意图;
图6为本申请消息分配的方法一实施例的流程示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必 须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1所示,是本申请消息分配的方法的较佳实施例的应用环境示意图。该应用环境示意图包括服务器1、各业务系统的客户端2及消息管理系统3。服务器1可以通过网络、近场通信技术等适合的技术与各业务系统的客户端2及消息管理系统3进行数据交互。
业务系统的客户端2所在的终端包括,但不限于,任何一种可与用户通过键盘、鼠标、遥控器、触摸板或者声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备、导航装置等等的可移动设备,或者诸如数字TV、台式计算机、笔记本、服务器等等的固定终端。
所述服务器1是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。所述服务器1可以是计算机、也可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量主机或者网络服务器构成的云,其中云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
在本实施例中,服务器1可包括,但不仅限于,可通过系统总线相互通信连接的存储器11、处理器12、网络接口13,存储器11存储有可在处理器12上运行的处理系统。需要指出的是,图1仅示出了具有组件11-13的服务器1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,存储器11包括内存及至少一种类型的可读存储介质。内存为服务器1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型 存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等的非易失性存储介质。在一些实施例中,可读存储介质可以是服务器1的内部存储单元,例如该服务器1的硬盘;在另一些实施例中,该非易失性存储介质也可以是服务器1的外部存储设备,例如服务器1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。本实施例中,存储器11的可读存储介质通常用于存储安装于服务器1的操作系统和各类应用软件,例如本申请一实施例中的处理系统的程序代码等。此外,存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述服务器1的总体操作,例如执行与各业务系统的客户端2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行处理系统等。
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述服务器1与其他电子设备之间建立通信连接。本实施例中,网络接口13主要用于将服务器1与多个业务系统的客户端2相连,在服务器1与多个业务系统的客户端2之间建立数据传输通道和通信连接。
所述处理系统存储在存储器11中,包括至少一个存储在存储器11中的计算机可读指令或者程序,该至少一个计算机可读指令或者程序可被处理器器12执行,以实现本申请各实施例的方法;以及,该至少一个计算机可读指令依据其各部分所实现的功能不同,可被划为不同的逻辑模块。
在一实施例中,上述处理系统被所述处理器12执行时实现如下步骤:
扫描步骤,在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;
其中,业务系统可以是企业中各部门所使用的系统,例如财务系统等。消息系统安装在服务器中,实现消息队列的分配。各个业务系统的客户端接入消息系统后,消息队列可以分配给一个或多个业务系统的客户端进行消费。
在消费过程中,启动一个扫描进程,对接入的各业务系统的客户端进行实时或定时扫描,包括扫描各业务系统的客户端消费消息队列的积压值及每秒消费的消息量tps,以分析各业务系统的客户端消费消息队列是否较慢。
标记步骤,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;
本实施例中,当有业务系统的客户端消费消息队列的积压值较大,大于预定阈值,且该业务系统的客户端消费消息队列的积压值与每秒消费的消息量的比值大于预定比值,说明该业务系统的客户端消费消息队列的速度比消息队列的积压的速度慢,即消费消息队列的速度较慢。优选地,预定阈值为10万条,预定比值为10800。
将上述消费消息队列的速度较慢的业务系统的客户端打上标记,记录标记信息,该标记信息包括客户端标识、与该消息队列的连接断开的时间、消费消息队列的积压值及每秒消费的消息量的比值等,并将标记信息发送给该业务系统的客户端。
重新分配步骤,当接收该第一客户端的重新分配消息队列的平衡请求 后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。
当第一客户端接收到标记信息后,启动rebalence进程向消息系统发送重新分配消息队列的平衡请求,消息系统接收到该平衡请求后,在预定时间(例如,预定时间为10分钟)内控制该第一客户端与该消息队列的连接断开,而仅将消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端,这样消息队列重新分配给消费快的客户端。
在一具体的实例中,如图2所示,消息队列在初始阶段分配给业务系统的客户端1、业务系统的客户端2、业务系统的客户端3、业务系统的客户端4消费。当扫描进程发现业务系统的客户端1消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,给业务系统的客户端1打上消费慢的标记,将标记信息发送给业务系统的客户端1。在接收到业务系统的客户端1发送的平衡请求时,进行重新分配操作,如图3所示,此时,业务系统的客户端1将获取不到消费队列进行消费,该消费队列将分配给业务系统的客户端2、业务系统的客户端3、业务系统的客户端4消费。
与现有技术相比,本实施例在各业务系统的客户端消费消息队列时,通过扫描其消费消息队列的积压值及每秒消费的消息量,如果发现有消费慢的客户端,则将其打上消费慢的标记,然后启动重新分配操作,在预定时间内控制该客户端无法消费该消息队列,并将该消息队列分配给除该客户端外消费该消息队列的各其他客户端,通过这种方式,及时发现消费慢的客户端,并控制消费慢的客户端暂时无法消费消息队列,使得消息队列尽快消费,防止堆积,避免出现磁盘IO问题,提高系统性能。
在一优选的实施例中,在上述实施例的基础上,处理系统被所述处理器 执行时,还实现如下步骤:
在各其他业务系统的客户端中,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第二客户端进行标记,并将本次标记信息发送给该第二客户端;
当接收到该第二客户端的重新分配消息队列的平衡请求后,分析该第一客户端与该消息队列的连接断开的时间是否大于等于所述预定时间;
若是,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第二客户端外消费该消息队列的各其他业务系统的客户端;
若否,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端、第二客户端外消费该消息队列的各其他业务系统的客户端。
其中,在上述第一客户端与该消息队列的连接断开之后,如果扫描进程发现还有业务系统的客户端消费消息队列较慢,则将该业务系统的客户端作为第二客户端进行标记,并将该消息队列再次重新分配。
在分配前,分析第一客户端与该消息队列的连接断开的时间是否大于等于预定时间,即消费慢的标记是否已经失效,如果失效,则该第一客户端可以消费消息队列,如果没有失效,则第一客户端、第二客户端均不能消费消息队列。通过这种方式,对消费慢的客户端进行灵活控制,使得第一客户端能够重新消费消息队列,使得消息队列尽快消费,防止堆积,进一步避免出现磁盘IO问题,提高系统性能。
在一具体的实例中,如图4所示,当扫描进程发现业务系统的客户端2消费消息队列慢,则业务系统的客户端2被标记,如果此时分析到业务系统的客户端1与该消息队列的连接断开的时间大于等于预定时间,则业务系统 的客户端1连接该消息队列,而业务系统的客户端2被标记则断开连接;如果此时分析到业务系统的客户端1与该消息队列的连接断开的时间小于预定时间,如图5所示,则业务系统的客户端1、业务系统的客户端2均断开连接,仅由业务系统的客户端3、业务系统的客户端4消费该消息队列。
在一优选的实施例中,在上述实施例的基础上,处理系统被所述处理器执行时,还实现如下步骤:
统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
分析该比例是否大于预设比例;
若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
其中,在扫描进程扫描业务系统的客户端的过程中,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例,如果该比例大于预设比例,优选地,预设比例为2/3,则发送提醒消息至消息管理系统,由消息管理系统根据该提醒消息将通知该客户端系统负责人,例如,以邮件方式发送提醒消息至客户端系统负责人的终端,以便检查这些客户端消费消息队列的性能是否正常,进一步避免出现磁盘IO问题,提高系统性能。
在一优选的实施例中,在上述实施例的基础上,处理系统被所述处理器执行时,还实现如下步骤:
当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
其中,如果消息系统重启实例,则所有被标记的业务系统的客户端的消费慢的标记将被删除,各业务系统的客户端可以重新消费该消息队列,之后再由扫描进程来扫描发现消费慢的业务系统的客户端,而不必等待接收到平衡请求后业务系统的客户端才有机会重新消费消息队列,提高灵活性。
如图6所示,图6为本申请消息分配的方法一实施例的流程示意图,该消息分配的方法包括以下步骤:
步骤S1,在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;
其中,业务系统可以是企业中各部门所使用的系统,例如财务系统等。消息系统安装在服务器中,实现消息队列的分配。各个业务系统的客户端接入消息系统后,消息队列可以分配给一个或多个业务系统的客户端进行消费。
在消费过程中,启动一个扫描进程,对接入的各业务系统的客户端进行实时或定时扫描,包括扫描各业务系统的客户端消费消息队列的积压值及每秒消费的消息量tps,以分析各业务系统的客户端消费消息队列是否较慢。
步骤S2,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;
本实施例中,当有业务系统的客户端消费消息队列的积压值较大,大于预定阈值,且该业务系统的客户端消费消息队列的积压值与每秒消费的消息量的比值大于预定比值,说明该业务系统的客户端消费消息队列的速度比消息队列的积压的速度慢,即消费消息队列的速度较慢。优选地,预定阈值为 10万条,预定比值为10800。
将上述消费消息队列的速度较慢的业务系统的客户端打上标记,记录标记信息,该标记信息包括客户端标识、与该消息队列的连接断开的时间、消费消息队列的积压值及每秒消费的消息量的比值等,并将标记信息发送给该业务系统的客户端。
步骤S3,当接收该第一客户端的重新分配消息队列的平衡请求后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。
当第一客户端接收到标记信息后,启动rebalence进程向消息系统发送重新分配消息队列的平衡请求,消息系统接收到该平衡请求后,在预定时间(例如,预定时间为10分钟)内控制该第一客户端与该消息队列的连接断开,而仅将消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端,这样消息队列重新分配给消费快的客户端。
与现有技术相比,本实施例在各业务系统的客户端消费消息队列时,通过扫描其消费消息队列的积压值及每秒消费的消息量,如果发现有消费慢的客户端,则将其打上消费慢的标记,然后启动重新分配操作,在预定时间内控制该客户端无法消费该消息队列,并将该消息队列分配给除该客户端外消费该消息队列的各其他客户端,通过这种方式,及时发现消费慢的客户端,并控制消费慢的客户端暂时无法消费消息队列,使得消息队列尽快消费,防止堆积,避免出现磁盘IO问题,提高系统性能。
在一优选的实施例中,在上述图6实施例的基础上,所述步骤S3之后,还包括以下步骤:
在各其他业务系统的客户端中,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比 值大于预定比值后,将该业务系统的客户端作为第二客户端进行标记,并将本次标记信息发送给该第二客户端;
当接收到该第二客户端的重新分配消息队列的平衡请求后,分析该第一客户端与该消息队列的连接断开的时间是否大于等于所述预定时间;
若是,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第二客户端外消费该消息队列的各其他业务系统的客户端;
若否,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端、第二客户端外消费该消息队列的各其他业务系统的客户端。
其中,在上述第一客户端与该消息队列的连接断开之后,如果扫描进程发现还有业务系统的客户端消费消息队列较慢,则将该业务系统的客户端作为第二客户端进行标记,并将该消息队列再次重新分配。
在分配前,分析第一客户端与该消息队列的连接断开的时间是否大于等于预定时间,即消费慢的标记是否已经失效,如果失效,则该第一客户端可以消费消息队列,如果没有失效,则第一客户端、第二客户端均不能消费消息队列。通过这种方式,对消费慢的客户端进行灵活控制,使得第一客户端能够重新消费消息队列,使得消息队列尽快消费,防止堆积,进一步避免出现磁盘IO问题,提高系统性能。
在一优选的实施例中,在上述实施例的基础上,所述消息分配的方法还包括:
统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
分析该比例是否大于预设比例;
若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
其中,在扫描进程扫描业务系统的客户端的过程中,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例,如果该比例大于预设比例,优选地,预设比例为2/3,则发送提醒消息至消息管理系统,由消息管理系统根据该提醒消息将通知该客户端系统负责人,例如,以邮件方式发送提醒消息至客户端系统负责人的终端,以便检查这些客户端消费消息队列的性能是否正常,进一步避免出现磁盘IO问题,提高系统性能。
在一优选的实施例中,在上述实施例的基础上,所述消息分配的方法还包括:
当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
其中,如果消息系统重启实例,则所有被标记的业务系统的客户端的消费慢的标记将被删除,各业务系统的客户端可以重新消费该消息队列,之后再由扫描进程来扫描发现消费慢的业务系统的客户端,而不必等待接收到平衡请求后业务系统的客户端才有机会重新消费消息队列,提高灵活性。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现上述的消息分配的方法的步骤。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种服务器,其特征在于,所述服务器包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
    扫描步骤,在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;
    标记步骤,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;
    重新分配步骤,当接收该第一客户端的重新分配消息队列的平衡请求后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。
  2. 根据权利要求1所述的服务器,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    在各其他业务系统的客户端中,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第二客户端进行标记,并将本次标记信息发送给该第二客户端;
    当接收到该第二客户端的重新分配消息队列的平衡请求后,分析该第一客户端与该消息队列的连接断开的时间是否大于等于所述预定时间;
    若是,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第二客户端外消费该消息队列的各其他业务系统的客户端;
    若否,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端、第二客户端外消费该消息队列的各其他业务系统的客户端。
  3. 根据权利要求1所述的服务器,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
    分析该比例是否大于预设比例;
    若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
  4. 根据权利要求2所述的服务器,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
    分析该比例是否大于预设比例;
    若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
  5. 根据权利要求1所述的服务器,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
  6. 根据权利要求2所述的服务器,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系 统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
  7. 根据权利要求1或2所述的服务器,其特征在于,所述预定阈值为10万条,所述预定比值为10800。
  8. 一种消息分配的方法,其特征在于,所述消息分配的方法包括:
    S1,在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;
    S2,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;
    S3,当接收该第一客户端的重新分配消息队列的平衡请求后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。
  9. 根据权利要求8所述的消息分配的方法,其特征在于,所述步骤S3之后,还包括:
    在各其他业务系统的客户端中,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第二客户端进行标记,并将本次标记信息发送给该第二客户端;
    当接收到该第二客户端的重新分配消息队列的平衡请求后,分析该第一客户端与该消息队列的连接断开的时间是否大于等于所述预定时间;
    若是,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第二客户端外消费该消息队列的各其他业务系统的客户端;
    若否,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端、第二客户端外消费该消息队列的各其他业务系统的客户端。
  10. 根据权利要求8所述的消息分配的方法,其特征在于,所述消息分配的方法,还包括:
    统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
    分析该比例是否大于预设比例;
    若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
  11. 根据权利要求9所述的消息分配的方法,其特征在于,所述消息分配的方法,还包括:
    统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
    分析该比例是否大于预设比例;
    若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
  12. 根据权利要求8所述的消息分配的方法,其特征在于,所述消息分配的方法,还包括:
    当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
  13. 根据权利要求9所述的消息分配的方法,其特征在于,所述消息分配的方法,还包括:
    当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系 统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
  14. 根据权利要求8或9所述的消息分配的方法,其特征在于,所述预定阈值为10万条,所述预定比值为10800。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现步骤:
    扫描步骤,在各消息消费者的业务系统接入消息系统后,启动扫描进程对各业务系统的客户端消费消息队列的积压值及每秒消费的消息量进行扫描;
    标记步骤,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第一客户端进行标记,并将标记信息发送给该第一客户端;
    重新分配步骤,当接收该第一客户端的重新分配消息队列的平衡请求后,在预定时间内控制该第一客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端外消费该消息队列的各其他业务系统的客户端。
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    在各其他业务系统的客户端中,当有业务系统的客户端消费消息队列的积压值大于预定阈值,且该消费消息队列的积压值与每秒消费的消息量的比值大于预定比值后,将该业务系统的客户端作为第二客户端进行标记,并将本次标记信息发送给该第二客户端;
    当接收到该第二客户端的重新分配消息队列的平衡请求后,分析该第一客户端与该消息队列的连接断开的时间是否大于等于所述预定时间;
    若是,则在预定时间内控制该第二客户端与该消息队列的连接断开,并 将该消息队列分配给除该第二客户端外消费该消息队列的各其他业务系统的客户端;
    若否,则在预定时间内控制该第二客户端与该消息队列的连接断开,并将该消息队列分配给除该第一客户端、第二客户端外消费该消息队列的各其他业务系统的客户端。
  17. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
    分析该比例是否大于预设比例;
    若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
  18. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    统计当前已被标记的业务系统的客户端的数量,计算当前已被标记的业务系统的客户端占消费该消息队列的所有业务系统的客户端的比例;
    分析该比例是否大于预设比例;
    若是,则发送提醒消息至消息管理系统,以供消息管理系统将提醒消息发送给预定的终端。
  19. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
  20. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述处 理系统被所述处理器执行时,还实现如下步骤:
    当接收到针对该消息队列的重启实例的消息时,将所有被标记的业务系统的客户端的标记及标记信息删除,并重新将该消息队列分配给消费该消息队列的各业务系统的客户端。
PCT/CN2018/102090 2018-04-24 2018-08-24 服务器、消息分配的方法及存储介质 WO2019205371A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810370069.1 2018-04-24
CN201810370069.1A CN108848039B (zh) 2018-04-24 2018-04-24 服务器、消息分配的方法及存储介质

Publications (1)

Publication Number Publication Date
WO2019205371A1 true WO2019205371A1 (zh) 2019-10-31

Family

ID=64212225

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102090 WO2019205371A1 (zh) 2018-04-24 2018-08-24 服务器、消息分配的方法及存储介质

Country Status (2)

Country Link
CN (1) CN108848039B (zh)
WO (1) WO2019205371A1 (zh)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008087A (zh) * 2019-12-25 2020-04-14 上海众源网络有限公司 一种消息处理方法及装置
CN111475313A (zh) * 2020-03-04 2020-07-31 江苏理工学院 适用于卷积神经网络前向传播的消息队列构建方法及装置
CN111858099A (zh) * 2020-07-24 2020-10-30 海尔优家智能科技(北京)有限公司 消息订阅方法及装置
CN112000476A (zh) * 2020-08-21 2020-11-27 南京星邺汇捷网络科技有限公司 基于队列的任务执行流程控制方法及系统
CN112612631A (zh) * 2020-12-29 2021-04-06 杭州涂鸦信息技术有限公司 一种消息队列堆积检测方法以及相关装置
CN113806102A (zh) * 2020-06-15 2021-12-17 中国移动通信集团浙江有限公司 消息队列处理方法、装置及计算设备
CN114584625A (zh) * 2022-01-24 2022-06-03 北京达佳互联信息技术有限公司 一种消息处理方法、装置、电子设备及存储介质
CN114827033A (zh) * 2022-04-15 2022-07-29 咪咕文化科技有限公司 数据流控方法、装置、设备与计算机可读存储介质
CN115412208A (zh) * 2022-08-09 2022-11-29 唯阜德(武汉)科技有限公司 一种用于消息队列管理系统的消息传送方法及系统

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110515746A (zh) * 2019-08-22 2019-11-29 北京宝兰德软件股份有限公司 一种处理慢消费者的方法及装置
CN110502402B (zh) * 2019-08-28 2023-03-21 中国联合网络通信集团有限公司 消息处理方法、设备及终端设备
CN112764892A (zh) * 2019-10-21 2021-05-07 伊姆西Ip控股有限责任公司 管理进程的方法、设备和计算机程序产品
CN111045837B (zh) * 2019-11-26 2023-10-20 福建天泉教育科技有限公司 跨服务消费的方法、存储介质
CN112181737A (zh) * 2020-09-25 2021-01-05 中国建设银行股份有限公司 消息处理方法、装置、电子设备及介质
CN112612607A (zh) * 2020-12-16 2021-04-06 平安消费金融有限公司 基于消息队列的数据处理方法、装置、计算机设备和介质
CN115174682B (zh) * 2022-06-17 2023-07-28 中国银联股份有限公司 数据分流方法、系统、中心、装置及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150271256A1 (en) * 2014-03-19 2015-09-24 Dell Products L.P. Message Processing Using Dynamic Load Balancing Queues in a Messaging System
CN105786909A (zh) * 2014-12-25 2016-07-20 北京东方通科技股份有限公司 一种自适应消息队列积压负载的应用触发方法和系统
CN106385375A (zh) * 2015-07-31 2017-02-08 北京国双科技有限公司 用于消息队列的负载均衡方法和装置
CN106656760A (zh) * 2016-12-28 2017-05-10 广州赛意信息科技股份有限公司 一种基于消息队列的消息传递方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457906B (zh) * 2010-10-26 2014-01-08 中国移动通信集团河南有限公司 一种消息队列的负载均衡控制方法及系统
KR20180058880A (ko) * 2016-11-24 2018-06-04 (주)케이아이엔엑스 오픈스택 기반의 분산 클라우드 데이터센터 환경에서 메시지 큐 부하 분산 및 성능 최적화 방법

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150271256A1 (en) * 2014-03-19 2015-09-24 Dell Products L.P. Message Processing Using Dynamic Load Balancing Queues in a Messaging System
CN105786909A (zh) * 2014-12-25 2016-07-20 北京东方通科技股份有限公司 一种自适应消息队列积压负载的应用触发方法和系统
CN106385375A (zh) * 2015-07-31 2017-02-08 北京国双科技有限公司 用于消息队列的负载均衡方法和装置
CN106656760A (zh) * 2016-12-28 2017-05-10 广州赛意信息科技股份有限公司 一种基于消息队列的消息传递方法及系统

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008087A (zh) * 2019-12-25 2020-04-14 上海众源网络有限公司 一种消息处理方法及装置
CN111008087B (zh) * 2019-12-25 2024-03-15 上海众源网络有限公司 一种消息处理方法及装置
CN111475313A (zh) * 2020-03-04 2020-07-31 江苏理工学院 适用于卷积神经网络前向传播的消息队列构建方法及装置
CN113806102B (zh) * 2020-06-15 2023-11-21 中国移动通信集团浙江有限公司 消息队列处理方法、装置及计算设备
CN113806102A (zh) * 2020-06-15 2021-12-17 中国移动通信集团浙江有限公司 消息队列处理方法、装置及计算设备
CN111858099A (zh) * 2020-07-24 2020-10-30 海尔优家智能科技(北京)有限公司 消息订阅方法及装置
CN111858099B (zh) * 2020-07-24 2024-05-28 海尔优家智能科技(北京)有限公司 消息订阅方法及装置
CN112000476A (zh) * 2020-08-21 2020-11-27 南京星邺汇捷网络科技有限公司 基于队列的任务执行流程控制方法及系统
CN112612631B (zh) * 2020-12-29 2024-04-02 杭州涂鸦信息技术有限公司 一种消息队列堆积检测方法以及相关装置
CN112612631A (zh) * 2020-12-29 2021-04-06 杭州涂鸦信息技术有限公司 一种消息队列堆积检测方法以及相关装置
CN114584625A (zh) * 2022-01-24 2022-06-03 北京达佳互联信息技术有限公司 一种消息处理方法、装置、电子设备及存储介质
CN114584625B (zh) * 2022-01-24 2024-03-26 北京达佳互联信息技术有限公司 一种消息处理方法、装置、电子设备及存储介质
CN114827033A (zh) * 2022-04-15 2022-07-29 咪咕文化科技有限公司 数据流控方法、装置、设备与计算机可读存储介质
CN114827033B (zh) * 2022-04-15 2024-04-19 咪咕文化科技有限公司 数据流控方法、装置、设备与计算机可读存储介质
CN115412208A (zh) * 2022-08-09 2022-11-29 唯阜德(武汉)科技有限公司 一种用于消息队列管理系统的消息传送方法及系统

Also Published As

Publication number Publication date
CN108848039B (zh) 2021-11-02
CN108848039A (zh) 2018-11-20

Similar Documents

Publication Publication Date Title
WO2019205371A1 (zh) 服务器、消息分配的方法及存储介质
US10740136B2 (en) Automatic virtual machine termination in a cloud
US11336583B2 (en) Background processes in update load balancers of an auto scaling group
US9647957B2 (en) Throttling usage of resources
US10038640B2 (en) Managing state for updates to load balancers of an auto scaling group
CN109766172B (zh) 一种异步任务调度方法以及装置
CN113641457A (zh) 容器创建方法、装置、设备、介质及程序产品
JP2008152591A (ja) 情報処理装置の割当て方法、情報処理システム及び管理サーバ
CN114155026A (zh) 一种资源分配方法、装置、服务器及存储介质
CN104793982A (zh) 一种创建虚拟机的方法和设备
CN110851276A (zh) 一种业务请求处理方法、装置、服务器和存储介质
CN107682389B (zh) 一种执行网络请求的方法、终端及计算机可读存储介质
CN112600761A (zh) 一种资源分配的方法、装置及存储介质
US10936192B2 (en) System and method for event driven storage management
CN111282263A (zh) 事件消息的处理方法、装置、电子设备及可读存储介质
US11709707B2 (en) Low latency distributed counters for quotas
CN107229424B (zh) 一种分布式存储系统数据写入方法及分布式存储系统
CN108429780B (zh) 关联系统间的数据调用系统及方法
CN116069518A (zh) 动态调配处理任务方法及装置、电子设备和可读存储介质
US11233847B1 (en) Management of allocated computing resources in networked environment
CN107209882B (zh) 对于处在管理之下的设备的多阶段撤销注册
CN110959151A (zh) 用于长期运行的软件操作的连接器租用
US11061602B2 (en) System and method for event based storage management
CN108073440B (zh) 一种虚拟化环境下的显卡管理方法、装置及系统
CN117785486A (zh) 环境资源调配方法、装置、设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18916131

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18916131

Country of ref document: EP

Kind code of ref document: A1