Message middleware management system, device, medium and product
By designing a message middleware management system, using the combination of adapter, conversion layer and core scheduling layer, the problem of integration of multiple message middleware is solved, the number of adapters is reduced, the message transmission efficiency and system maintenance are improved, and the multi-source difference is achieved Efficient processing of message structure.
Patent Information
- Application Number
- CN202411267317.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-31
AI Technical Summary
In enterprise information systems, various types of message middleware have difficulty in integration and scheduling due to differences in architecture, protocol and interface. The existing technology requires an adapter to configure every two different types of message middleware, resulting in the adapter being over More, increasing management and maintenance costs.
Design a message middleware management system, including adapter, conversion layer and core scheduling layer, realize the connection and conversion of different types of message middleware through multiple interface layers, adopt unified interface specifications and routing rules, dynamic management and monitoring, and Reduce adapter quantity and maintenance costs.
It realizes the integration and unified processing of multi-source heterogeneous message middleware, improves message transmission efficiency, reduces system maintenance costs, and improves the system's processing capability and reliability through load balancing and real-time management.
Smart Images

Figure CN119232796A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a message middleware management system, equipment, medium and product. Background Art
[0002] As the level of enterprise informatization continues to improve, enterprise information systems will continue to grow larger, resulting in many different types of message middleware in a system, and thus multi-source heterogeneous message middleware has been widely used in enterprise information systems. However, since these middlewares come from different manufacturers and use different architectures, protocols and interfaces, there are many difficulties in the integration and scheduling process.
[0003] In order to solve this problem, the prior art generally sets an adapter for different types of message middleware, so as to achieve message format conversion between two different types of message middleware through the adapter, so that messages can be transmitted between different types of message middleware.
[0004] However, if there are many different types of message middleware, an adapter needs to be configured between every two different types of message middleware, which will result in too many adapters and increase the management and maintenance costs of the enterprise. Summary of the invention
[0005] The purpose of this application is to provide a message middleware management system, device, medium and product to solve the problems described in the background technology.
[0006] To achieve the above objectives, this application provides the following solutions:
[0007] In a first aspect, the present application provides a message middleware management system, including: an adapter, a conversion layer, and a core scheduling layer;
[0008] The adapter includes an adapter interface layer and an adapter implementation layer; the adapter interface layer includes a plurality of different first interfaces, at least one identical second interface and a plurality of different third interfaces; the plurality of different first interfaces correspond to different types of source message middleware, respectively, to receive source messages sent by different types of source message middleware, and send the source messages to the adapter implementation layer;
[0009] The adapter implementation layer is used to convert the received source message into an adaptation message that can be recognized by the conversion layer, and send the adaptation message to the second interface, so as to send the adaptation message to the conversion layer through the second interface;
[0010] The conversion layer is used to receive the adaptation message, convert the adaptation message into a target message that can be recognized by the target message middleware, and send the target message to the core scheduling layer;
[0011] The core scheduling layer is used to receive the target message and send the target message to the third interface, so as to send the target message to the target message middleware through the third interface.
[0012] Optionally, the multiple first interfaces are determined by the following steps:
[0013] Obtaining a first type, a first communication protocol, and a first message format of each source message middleware;
[0014] Determine the specific requirements for how source messages are routed and transformed;
[0015] Classify source message middlewares having the same first type, first communication protocol, first message format and the same specific requirements as source message middlewares of the same type, thereby obtaining multiple types of source message middlewares;
[0016] Defining a unified first specification for each type of source message middleware, wherein the first specification includes a communication protocol and a message format of the same type of source message middleware;
[0017] The unified first specification is determined as the specification of the first interface.
[0018] Optionally, the adapter implementation layer is generated by:
[0019] Determine the type and interface of the source message middleware;
[0020] Generate the architecture of the adapter implementation layer based on the type and interface of the source message middleware;
[0021] Configure error handling actions and logging.
[0022] Optionally, the core scheduling layer routes the target message as follows:
[0023] The switch receives the target message and obtains the routing key carried in the target message;
[0024] The switch determines a queue corresponding to the target message based on the routing key and the routing rule;
[0025] The switch sends the target message to the corresponding queue to wait for the target message middleware to receive the target message.
[0026] Optionally, the switch sends the target message to a corresponding queue to wait for a target message middleware to receive the target message, including:
[0027] At predetermined intervals, the performance parameters of each target message middleware are obtained, wherein the performance parameters include throughput, response time, and queue length;
[0028] Determine the processing capacity of the target message middleware based on the throughput, response time and queue length, the processing capacity includes primary processing capacity, secondary processing capacity, tertiary processing capacity and quaternary processing capacity, and the processing capacity decreases in sequence, and the corresponding target message middlewares are primary target message middleware, secondary target message middleware, tertiary target message middleware and quaternary target message middleware respectively;
[0029] Obtaining a real-time identifier and a priority identifier of the target message;
[0030] When the real-time identifier and the priority identifier can be obtained from the target message, determining that the target message is a first-level target message, and forwarding the first-level target message to the first-level target message middleware;
[0031] When a real-time identifier can be obtained from the target message but a priority identifier is not obtained, the target message is determined to be a secondary target message, and the secondary target message is forwarded to the secondary target message middleware, and the secondary target message is forwarded after the primary target message;
[0032] When the real-time identification cannot be obtained from the target message, but the priority identification is obtained, the target message is determined to be a third-level target message, and the third-level target message is forwarded to the third-level target message middleware, and the third-level target message is forwarded after the second-level target message;
[0033] When neither the real-time identification nor the priority identification is obtained from the target message, the target message is determined to be a level-four target message; and the level-four target message is sent to the level-four target message middleware, and the level-four target message is forwarded after the level-three target message.
[0034] Optionally, the message middleware management system also includes a configuration management layer, which provides a management interface so that users can define message routing rules and message format conversion rules through the management interface; the configuration management layer is also used to monitor changes in configuration content in real time, and dynamically update message routing rules and message format conversion rules to ensure that the message middleware management system runs according to the latest configuration.
[0035] Optionally, the message middleware management system also includes a monitoring log layer for monitoring the running status of the message middleware management system, including the connection status of the adapter, the success rate of message delivery, and for recording log information to facilitate problem troubleshooting and performance analysis.
[0036] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the system described in any one of the above-mentioned first aspects.
[0037] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the system described in any one of the first aspects above.
[0038] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the system described in any one of the first aspects above.
[0039] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0040] The present application provides a message middleware management system, equipment, medium and product. The system includes an adapter, and the interface layer of the adapter is configured with multiple first interfaces. The multiple first interfaces are used to correspond to different types of message middleware, so that source messages sent by different types of message middleware can be received, and the source messages are converted into adaptation messages through the implementation layer, and then sent to the conversion layer through a unified second interface. With the prior art, one adapter is configured for every two different types of message middleware, resulting in many adapters, which also leads to high management and maintenance costs of the message middleware management system. Therefore, compared with the prior art, the embodiment of the present application realizes connection and management with different types of message middleware through one adapter, reducing management and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 This is an application environment diagram of a message middleware management system in one embodiment of the present application;
[0043] Figure 2 A schematic diagram of a message middleware management system provided in one embodiment of the present application;
[0044] Figure 3 A schematic diagram of a process for determining a first interface specification provided in an embodiment of the present application;
[0045] Figure 4A flowchart of a method for generating an adapter implementation layer provided in another embodiment of the present application;
[0046] Figure 5 A schematic diagram of a routing process of a target message by a core scheduling layer provided in an embodiment of the present application;
[0047] Figure 6 for Figure 5 A refinement of step 403;
[0048] Figure 7 This is an application environment diagram of a message middleware management system in one embodiment of the present application;
[0049] Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0051] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0052] The message middleware management system provided in the embodiment of the present application can be configured as follows: Figure 1 In the application environment shown, the application environment includes a terminal and a server. The terminal communicates with the server through a network. The data storage system can store data that the server needs to process. The data storage system can be set up separately, integrated on the server, or placed on the cloud or other servers.
[0053] The maintainer of the message middleware management system interacts with the message middleware management system through the terminal to modify the relevant parameters in the message middleware management system or other data that needs to be modified. The parameters that need to be modified are sent to the server through the terminal. The server receives the new parameters and modifies them according to the new parameters; after the modification is completed, the modified results are returned to the terminal so that the maintainer knows that the parameter modification is successful.
[0054] The terminals may be, but are not limited to, various desktop computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server may be implemented as an independent server or a server cluster consisting of multiple servers, or a cloud server.
[0055] In an exemplary embodiment, Figure 2 As shown, a message middleware management system is provided, which is executed by a computer device and can be specifically configured in Figure 1 In the server shown, the system includes: an adapter, a conversion layer, and a core scheduling layer.
[0056] The adapter includes an adapter interface layer and an adapter implementation layer; the adapter interface layer includes a plurality of different first interfaces, at least one identical second interface and a plurality of different third interfaces; the plurality of different first interfaces correspond to different types of source message middleware, respectively, to receive source messages sent by different types of source message middleware, and send the source messages to the adapter implementation layer;
[0057] The adapter implementation layer is used to convert the received source message into an adaptation message that can be recognized by the conversion layer, and send the adaptation message to the second interface, so as to send the adaptation message to the conversion layer through the second interface;
[0058] The conversion layer is used to receive the adaptation message, convert the adaptation message into a target message that can be recognized by the target message middleware, and send the target message to the core scheduling layer;
[0059] The core scheduling layer is used to receive the target message and send the target message to the third interface, so as to send the target message to the target message middleware through the third interface.
[0060] The source message middleware is the middleware that sends the message. The source message is the message sent by the source message middleware. The target message middleware is the middleware that receives the message. The target message is the message that the source message is converted by the adapter and the conversion layer and needs to be sent to the target message middleware.
[0061] Among them, the multiple different first interfaces correspond to different types of source message middleware and target message middleware, respectively, and it can be understood that each type of message middleware has at least one first interface. It should be noted here that in this application, if only message middleware is mentioned, it includes all message middleware included in the source message middleware and the target message middleware.
[0062] Among them, the multiple different first interfaces correspond to different types of source message middleware respectively, which can be understood as: each type of source message middleware corresponds to at least one first interface, and the first interface can receive the source message sent by the source message middleware of this type.
[0063] Among them, when the core scheduling layer sends the target message to the target message middleware, the first interface will also be used. The specific process is as follows: the core scheduling layer first sends the target message to the corresponding first interface, and then sends the target message to the target middleware through the first interface.
[0064] In the present application, multiple message middlewares of the same type may correspond to one first interface.
[0065] Wherein, when the at least one second interface includes a plurality of interfaces, it is used to reduce the pressure of the adapter and improve the working efficiency of the adapter.
[0066] It should be noted that when the source message middleware and the target message middleware are of the same type, the first interface and the second interface may be the same, or the same interface may be used. In addition, sometimes the source message middleware may also be the target message middleware.
[0067] Message middleware refers to the message middleware within the same enterprise system. For example, message middleware includes RabbitMQ, Kafka, and ActiveMQ.
[0068] The present application provides a message middleware management system through the above-mentioned embodiments, the system includes an adapter, and the interface layer of the adapter is configured with multiple first interfaces, and the multiple first interfaces are used to correspond to different types of message middleware, so that source messages sent by different types of message middleware can be received, and the source messages are converted into adaptation messages through the implementation layer, and then sent to the conversion layer through a unified second interface. With respect to the prior art, one adapter is configured for every two different types of message middleware, resulting in many adapters, which also leads to high management and maintenance costs of the message middleware management system. Therefore, compared with the prior art, the embodiment of the present application realizes connection and management with different types of message middleware through one adapter, thereby reducing management and maintenance costs.
[0069] In addition, by designing a dedicated adapter to connect and manage different types of message middleware, the integration and unified processing of multi-source heterogeneous message middleware is achieved. This design method not only improves the efficiency of message transmission, but also reduces the cost of system maintenance.
[0070] Alternatively, see Figure 3 In another exemplary embodiment of the present application, the plurality of first interfaces are determined by the following steps 201 to 205:
[0071] Step 201: Obtain the first type, the first communication protocol and the first message format of each source message middleware.
[0072] Step 202, determining the requirements for routing and converting the source message, the requirements including the source message type, priority, and routing destination.
[0073] The requirements may also include other requirements, such as real-time performance, which will not be described in detail in this application.
[0074] Step 203: classify source message middleware with the same first type, first communication protocol, first message format, source message type, priority, and routing destination as source message middleware of the same type, to obtain multiple types of source message middleware.
[0075] Step 204: define a unified first specification for each type of source message middleware, where the first specification includes a communication protocol and a message format of the same type of source message middleware.
[0076] Step 205: determine the unified first specification as the specification of the first interface.
[0077] Among them, defining a unified first specification can be understood as merging the first type, first communication protocol, first message format and the specific requirements of the above-mentioned source message middleware, so that the defined first specification can include the first type, first communication protocol, first message format and the specific requirements included in all source message middleware.
[0078] A unified adapter first interface is defined for the same type of source message middleware, and all operations that can be implemented by the source message middleware can be implemented through the first interface, such as receiving source messages, sending source messages, connection management, disconnection, etc. The first interface can also flexibly connect or disconnect with the source message middleware, so that different types of source message middleware can be flexibly supported.
[0079] Furthermore, the determination of the third interface is similar to the method for determining the second interface described above, and will not be elaborated in this application.
[0080] Furthermore, the second interface is connected between the adapter implementation layer and the conversion layer. Since the adapter implementation layer has converted the source message into an adaptation message that can be recognized by the conversion layer, all the second interfaces are the same and can recognize and receive the adaptation message and send the adaptation message to the conversion layer, following the interface protocol between the adapter and the conversion layer.
[0081] Furthermore, for each source message middleware, the received source message is converted into an adaptation message through the adapter implementation layer. The adapter implementation layer follows the specification defined by the adapter interface layer.
[0082] The adapter implementation layer is also responsible for interacting with its corresponding original message middleware and handling specific operations such as connection, authentication, message sending and receiving.
[0083] Alternatively, see Figure 4 , the adapter implementation layer can be generated by following steps 301-303:
[0084] Step 301: determine the type and interface of the source message middleware.
[0085] First, you need to clarify the type of each source message middleware and the interface it provides. This includes understanding the source middleware's communication protocol, data format, authentication mechanism, etc.
[0086] Step 302: Generate the architecture of the adapter implementation layer according to the type and interface of the source message middleware.
[0087] The architecture of the adapter implementation layer should include functional modules such as source message middleware connection, message format conversion, and error handling.
[0088] The present application can establish the connection between the adapter implementation layer and the source message middleware, message format conversion, error handling and other functional modules by writing code.
[0089] The message format conversion can be understood as follows: since different source message middleware may use different message formats, the adapter implementation layer needs to implement the message format conversion function. For example, a specific message format of a source message middleware is converted into a common format that the integration framework can understand.
[0090] In this application, the integration framework includes an adapter interface layer, an adapter implementation layer, a conversion layer, and a core scheduling layer.
[0091] Step 303: configure error handling operations and logging.
[0092] Implement error handling mechanisms in the adapter implementation layer to properly handle communication failures or data format errors, such as locating the error location to facilitate later repairs. At the same time, implement logging functions to facilitate tracking and debugging problems.
[0093] In addition, before deploying the adapter implementation layer, it is necessary to test and debug the deployed contents to ensure that it can communicate stably with the source message middleware and conversion layer and can correctly process various messages.
[0094] In addition, the adapter (including the adapter interface layer and the adapter implementation layer) adopts a plug-in design, so that it can be dynamically loaded, unloaded, and repaired without the need for large-scale modifications to the entire system.
[0095] In addition, a configuration interface is provided for the adapter, allowing the user to configure the adapter parameters as needed, such as connection information, message format, etc. At the same time, the management functions of the adapter are implemented, such as starting, stopping, restarting, etc.
[0096] In addition, the adapter is integrated into the integration framework through plug-ins. During integration, ensure that the adapter communicates with the framework, which usually involves implementing the communication interface with the framework so that the framework can call the adapter to send and receive messages.
[0097] Through the adapter implementation layer, the differences between different source message middleware can be removed and converted into the same type to achieve unified source message processing. In addition, the adapter adopts a plug-in design, which is easy to expand and maintain.
[0098] The core scheduling layer is mainly used to: receive, route and forward the adapted message; when receiving the adapted message sent from the conversion layer, it determines the target message middleware to receive the adapted message according to the configured routing rules and sends it. The target message middleware can be an adapter or an application service.
[0099] The core scheduling layer is also configured with message queues and routing tables, so the core scheduling layer also needs to maintain message queues and routing tables to ensure that the adapted messages can be routed in the order of the message queues and that the adapted messages are delivered along the predetermined path, so as to ensure that the core scheduling layer can efficiently and accurately handle a large number of concurrent messages.
[0100] Alternatively, see Figure 5 The core scheduling layer routes the target message as follows: Step 401 to Step 403:
[0101] Step 401: The switch receives a target message and obtains a routing key carried in the target message.
[0102] Among them, the switch is the hub of message routing, responsible for receiving and forwarding target messages.
[0103] When a producer creates a message, it specifies a routing key for each message. The routing key will always follow the message for subsequent routing decisions, that is, determine the direction of the message.
[0104] The switch will decide where the message goes based on the routing key and previously set routing rules.
[0105] Step 402: The switch determines a queue corresponding to the target message based on the routing key and the routing rule.
[0106] The created queues include multiple ones, and the queues will be used as storage containers for target messages, waiting for consumers to receive them, and in this application, waiting for target message middleware to receive them.
[0107] Set routing rules for each queue. The routing rules include the correspondence between the target message type and the queue. That is, these routing rules determine which queue the target message should be routed to.
[0108] Through the binding operation, the queue is connected to the switch and the routing rules are specified. In this way, when the switch receives the target message, it can forward the message to the corresponding queue according to these routing rules. After the switch obtains the routing key, it first parses the routing key of the target message; then, based on the routing key and the previously bound routing rules with the queue, the switch makes a routing decision to determine which queue to send the message to.
[0109] Step 403: The switch sends the target message to the corresponding queue to wait for the target message middleware to receive the target message.
[0110] After the target message is routed to the queue that matches its routing key, it waits for receipt by the consumer (ie, the target message in this application) and subsequent processing.
[0111] In summary, the implementation of message routing is mainly completed through steps such as configuring switches and queues, setting routing rules and bindings, switches making routing decisions, messages arriving at queues and being received by consumers, etc. This process ensures that messages can be accurately and efficiently transmitted between multi-source heterogeneous message middleware.
[0112] Alternatively, see Figure 6 , step 403 is implemented by the following steps 4030-4036:
[0113] Step 4030: Obtain performance parameters of each target message middleware at predetermined intervals, wherein the performance parameters include throughput, response time, and queue length.
[0114] Among them, the scheduled time is generally short to ensure the timeliness of collecting the target message middleware.
[0115] The performance parameters of each target message middleware also reflect the load of the target message middleware. The worse the performance parameters, the more excessive the load of the target message middleware. Other parameters may also be included, such as CPU usage, memory usage, etc., which are not described in detail in this application.
[0116] Step 4031, determine the processing capacity of the target message middleware based on the throughput, response time and queue length, the processing capacity includes primary processing capacity, secondary processing capacity, tertiary processing capacity and quaternary processing capacity, and the processing capacity decreases in sequence, and the corresponding target message middleware are primary target message middleware, secondary target message middleware, tertiary target message middleware and quaternary target message middleware respectively.
[0117] Higher throughput, faster response time, and shorter queue lengths indicate greater processing power.
[0118] Step 4032, obtaining the real-time identification and priority identification of the target message.
[0119] The target message here is the target message that reaches the core scheduling layer.
[0120] The real-time flag indicates that the target message needs to be sent in real time, and the priority flag indicates that the target message needs to be sent with priority. On the contrary, if the real-time flag and the priority flag are not obtained, it means that the target message has no real-time requirement and priority sending requirement.
[0121] Step 4033: When the real-time identifier and the priority identifier can be obtained from the target message, the target message is determined to be a first-level target message, and the first-level target message is forwarded to the first-level target message middleware.
[0122] Step 4034, when the real-time identifier can be obtained from the target message but the priority identifier is not obtained, the target message is determined to be a secondary target message, and the secondary target message is forwarded to the secondary target message middleware, and the secondary target message is forwarded after the primary target message.
[0123] Step 4035, when the real-time identifier cannot be obtained from the target message but the priority identifier is obtained, the target message is determined to be a third-level target message, and the third-level target message is forwarded to the third-level target message middleware, and the third-level target message is forwarded after the second-level target message.
[0124] Step 4036, when neither the real-time identifier nor the priority identifier is obtained from the target message, determine that the target message is a fourth-level target message; and send the fourth-level target message to the fourth-level target message middleware, and the fourth-level target message is forwarded after the third-level target message.
[0125] In addition, when an exception occurs in the target message middleware, it is necessary to handle the exception in a timely manner. For example, when a target message middleware fails or its performance degrades, it can be quickly perceived from the processing capacity of the target message and the target message originally assigned to the target message middleware can be reallocated.
[0126] Through the above method, the core scheduling layer actually performs load balancing operations, realizes dynamic allocation and flexible scheduling of target messages, ensures that target messages with high priority and high real-time requirements are processed first and allocated to target message middleware with higher processing capabilities, improves the real-time and reliability of message transmission, and avoids the situation where some target message middleware is overloaded while other target message middleware is idle, thereby improving the processing capacity and efficiency of the entire system and achieving the purpose of maximizing the utilization of target message middleware resources.
[0127] In addition, the management and maintenance of the system is simplified by managing and scheduling the adapters of various message middlewares through a core scheduling layer.
[0128] Conversion layer:
[0129] If the adapted message cannot be recognized by the target message middleware, the conversion layer is responsible for converting the format of the adapted message into a target message that can be recognized by the target message middleware according to the conversion rules established in advance.
[0130] The conversion rules can be configured according to actual needs to ensure that the target message can be sent to the target message middleware smoothly. In addition, configuration options and user interfaces are provided so that users can customize the conversion rules according to their needs.
[0131] Optionally, the conversion layer can implement message conversion by:
[0132] First, define the mapping rules: First, create a mapping configuration file or database that defines the field correspondence between the source message format and the target message format.
[0133] Second, parse the source message: After receiving the source message, the adapter first parses it according to the format specification of the source message middleware and extracts the values of each field.
[0134] Third, apply mapping rules: map the parsed field values to the corresponding fields of the target message format according to the rules in the mapping configuration file or database.
[0135] Fourth, generate the target message: assemble the mapped field values into a new message according to the format specification of the target message middleware.
[0136] Alternatively, see Figure 7 In another exemplary embodiment of the present application, the message middleware management system also includes a configuration management layer, which provides a management interface so that users can define message routing rules and message format conversion rules through the management interface; the configuration management layer is also used to monitor changes in configuration content in real time, and dynamically update message routing rules and message format conversion rules to ensure that the message middleware management system runs according to the latest configuration.
[0137] The coordination relationship between the core scheduling layer and the configuration management layer is as follows:
[0138] 1) The configuration management layer provides a user interface or configuration file to enable users to define message routing rules and message conversion rules.
[0139] 2) The core scheduling layer reads the above configurations and performs message routing and forwarding based on these configurations.
[0140] The dynamic coordination relationship between the configuration management layer and other layers is as follows:
[0141] 1) When the message routing rules or message conversion rules in the configuration management layer change, these changes will be pushed to the core scheduling layer and conversion layer in real time.
[0142] 2) The core scheduling layer and conversion layer dynamically adjust their behaviors according to the new configuration to ensure the accuracy and efficiency of message delivery.
[0143] Alternatively, see Figure 7 In another exemplary embodiment of the present application, the message middleware management system also includes a monitoring log layer for monitoring the running status of the message middleware management system, wherein the running status includes the connection status of the adapter, the success rate of message delivery, and is also used to record log information to facilitate troubleshooting and performance analysis.
[0144] Among them, monitoring includes: the monitoring system monitors the running status of each message middleware, the delay and success rate of message transmission in real time. In this way, the administrator can understand the running status of the message middleware management system at any time, and find and solve problems in time. Furthermore, the monitoring system can be a third-party monitoring tool, such as Prometheus and Grafana. Among them, Prometheus is an open source monitoring and alarm tool that can be used with the exporter provided by the message middleware to collect and store a large amount of monitoring indicator data. Grafana is used to visualize this data and create a rich monitoring dashboard, so that administrators can view various indicators at a glance. :
[0145] Furthermore, the monitoring log layer also includes an alarm mechanism: when an abnormal situation occurs, such as a message middleware failure, performance degradation, or message transmission failure, an alarm is generated in time to notify the administrator to handle it. The alarm mechanism can help administrators respond and solve problems quickly, ensuring the continuity and stability of message transmission.
[0146] Abnormal situations can be learned in a message middleware management system in a variety of ways, and threshold limits are usually set to trigger alarms. Among them, the abnormal situation learning methods include: monitoring tools and alarm systems, log analysis, and performance counters and indicators.
[0147] Among them, the monitoring tools and alarm systems are notified of abnormal situations through the following methods:
[0148] 1) The message middleware management system includes monitoring tools and alarm systems. These monitoring tools can collect and analyze the operation data of the message middleware in real time, such as message throughput, processing speed, queue length, etc.
[0149] 2) When abnormal data is monitored, such as a sudden drop in processing speed or an abnormal increase in queue length, the alarm system will automatically trigger an alarm to inform the administrator or relevant personnel that the system has an abnormality.
[0150] Among them, log analysis obtains abnormal conditions through the following methods:
[0151] 1) The monitoring log layer generates detailed log records, which include both normal and abnormal situations.
[0152] 2) By analyzing the log records, abnormal behaviors or errors, such as connection failures, message losses, etc., can be discovered in a timely manner.
[0153] The process of obtaining abnormal conditions through performance counters and indicators is as follows:
[0154] 1) The message middleware management system is configured with a series of performance counters and indicators, such as CPU usage, memory usage, network I / O, etc.
[0155] 2) When these indicators are outside the normal range, it indicates that there is an abnormality in the system.
[0156] In addition, the monitoring log layer is also used for threshold limits, which can include message accumulation thresholds, resource usage thresholds, connection number thresholds, and response time thresholds. The functions of each threshold are as follows:
[0157] 1) Message accumulation threshold: In order to prevent excessive accumulation of messages in the processing center, a message accumulation threshold is usually set. When the number of messages in the message queue exceeds this threshold, the system will take measures, such as refusing new messages to enter or not triggering alarms, so that managers can take appropriate measures.
[0158] 2) Resource usage threshold: For key performance indicators such as CPU usage and memory usage, corresponding thresholds will also be set. Once these indicators exceed the threshold, the system will treat it as an abnormal situation and respond.
[0159] 3) Connection threshold: In order to control the load of the message middleware management system, the number of message middlewares connected to the message middleware management system is usually set, that is, the connection threshold. When the number of connections exceeds the connection threshold, the message middleware management system will reject new connection requests or reduce the service level.
[0160] 4) Response time threshold: In some cases, the message middleware management system needs to respond quickly. In this case, a response time threshold can be set. If the response time of the message exceeds the response time threshold, it indicates that the message middleware management system has performance problems or bottlenecks.
[0161] In summary, by using monitoring tools, log analysis, performance counters, client feedback and other means, abnormal situations in the message middleware management system can be discovered in a timely manner. At the same time, by setting reasonable threshold limits, the occurrence and impact of abnormal situations can be effectively prevented and controlled.
[0162] In addition, the coordination relationship between the monitoring log layer and other layers is as follows:
[0163] 1) The monitoring log layer permeates all levels of the message middleware management system and is responsible for collecting and recording status information and operation logs at each level.
[0164] 2) Whether it is the adapter interface layer, adapter implementation layer, core scheduling layer or conversion layer, any important operation or event will be captured and recorded by the monitoring and logging layer.
[0165] In summary, the above products and methods achieve the advantages of high efficiency, high reliability, flexibility and easy maintainability through the comprehensive application of efficient scheduling, load balancing, adapter design, monitoring and alarming. These advantages jointly improve the overall performance and user experience of enterprises when processing multi-source heterogeneous messages.
[0166] Possible alternative: message middleware integration solution based on standardized interface
[0167] In addition, it should be noted that in order to facilitate the management of message middleware, in addition to using the method provided in this application, different message middleware adopts a unified standardized interface and protocol to achieve interoperability between message middleware. Further, this can be achieved by formulating industry standards or promoting the development of open source communities, as follows:
[0168] Step 1: Develop standardized message formats and transmission protocols;
[0169] Step 2: Each message middleware is transformed according to the standard to achieve unified interface;
[0170] Step 3: Integrate and schedule message middleware through standardized interfaces;
[0171] The above-mentioned standardized interfaces and protocols can reduce the complexity of integration and improve the compatibility between different middleware.
[0172] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the message middleware management system. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a message middleware management system is implemented.
[0173] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0174] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0175] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0176] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0178] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0179] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0180] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0181] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A message middleware management system, characterized in that: include: Adapter, conversion layer, core scheduling layer; The adapter includes an adapter interface layer and an adapter implementation layer; The adapter interface layer includes a plurality of different first interfaces, at least one identical second interface and a plurality of different third interfaces; the plurality of different first interfaces correspond to different types of source message middleware, respectively, to receive source messages sent by different types of source message middleware, and send the source messages to the adapter implementation layer; The adapter implementation layer is used to convert the received source message into an adaptation message that can be recognized by the conversion layer, and send the adaptation message to the second interface, so as to send the adaptation message to the conversion layer through the second interface; The conversion layer is used to receive the adaptation message, convert the adaptation message into a target message that can be recognized by the target message middleware, and send the target message to the core scheduling layer; The core scheduling layer is used to receive the target message and send the target message to the third interface, so as to send the target message to the target message middleware through the third interface.
2. The message middleware management system according to claim 1, characterized in that: The multiple first interfaces are determined by the following steps: Obtaining a first type, a first communication protocol, and a first message format of each source message middleware; Determine the specific requirements for how source messages are routed and transformed; Classify source message middlewares having the same first type, first communication protocol, first message format and the same specific requirements as source message middlewares of the same type, thereby obtaining multiple types of source message middlewares; Defining a unified first specification for each type of source message middleware, wherein the first specification includes a communication protocol and a message format of the same type of source message middleware; The unified first specification is determined as the specification of the first interface.
3. The message middleware management system according to claim 1, characterized in that: The adapter implementation layer is generated by following these steps: Determine the type and interface of the source message middleware; Generate the architecture of the adapter implementation layer based on the type and interface of the source message middleware; Configure error handling actions and logging.
4. The message middleware management system according to claim 1, characterized in that: The core scheduling layer routes the target message as follows: The switch receives the target message and obtains the routing key carried in the target message; The switch determines a queue corresponding to the target message based on the routing key and the routing rule; The switch sends the target message to the corresponding queue to wait for the target message middleware to receive the target message.
5. The message middleware management system according to claim 4, characterized in that: The switch sends the target message to the corresponding queue to wait for the target message middleware to receive the target message, including: At predetermined intervals, the performance parameters of each target message middleware are obtained, wherein the performance parameters include throughput, response time, and queue length; Determine the processing capacity of the target message middleware based on the throughput, response time and queue length, the processing capacity includes primary processing capacity, secondary processing capacity, tertiary processing capacity and quaternary processing capacity, and the processing capacity decreases in sequence, and the corresponding target message middlewares are primary target message middleware, secondary target message middleware, tertiary target message middleware and quaternary target message middleware respectively; Obtaining a real-time identifier and a priority identifier of the target message; When the real-time identifier and the priority identifier can be obtained from the target message, determining that the target message is a first-level target message, and forwarding the first-level target message to the first-level target message middleware; When a real-time identifier can be obtained from the target message but a priority identifier is not obtained, the target message is determined to be a secondary target message, and the secondary target message is forwarded to the secondary target message middleware, and the secondary target message is forwarded after the primary target message; When the real-time identification cannot be obtained from the target message, but the priority identification is obtained, the target message is determined to be a third-level target message, and the third-level target message is forwarded to the third-level target message middleware, and the third-level target message is forwarded after the second-level target message; When neither the real-time identification nor the priority identification is obtained from the target message, the target message is determined to be a level-four target message; and the level-four target message is sent to the level-four target message middleware, and the level-four target message is forwarded after the level-three target message.
6. The message middleware management system according to any one of claims 1 to 5, characterized in that: The message middleware management system also includes a configuration management layer, which provides a management interface so that users can define message routing rules and message format conversion rules through the management interface; the configuration management layer is also used to monitor changes in configuration content in real time, and dynamically update message routing rules and message format conversion rules to ensure that the message middleware management system runs according to the latest configuration.
7. The message middleware management system according to claim 6, characterized in that: The message middleware management system also includes a monitoring log layer for monitoring the running status of the message middleware management system, which includes the connection status of the adapter, the success rate of message transmission, and is also used to record log information to facilitate problem troubleshooting and performance analysis.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the message middleware management system according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the message middleware management system according to any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the message middleware management system according to any one of claims 1 to 7 is implemented.
