CN112486478B - Event processing method and device based on field driving - Google Patents

Event processing method and device based on field driving Download PDF

Info

Publication number
CN112486478B
CN112486478B CN202011353778.2A CN202011353778A CN112486478B CN 112486478 B CN112486478 B CN 112486478B CN 202011353778 A CN202011353778 A CN 202011353778A CN 112486478 B CN112486478 B CN 112486478B
Authority
CN
China
Prior art keywords
event
target
event processing
type
processing center
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011353778.2A
Other languages
Chinese (zh)
Other versions
CN112486478A (en
Inventor
程伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wanwu Xinsheng Environmental Technology Group Co
Original Assignee
Shanghai Wanwu Xinsheng Environmental Technology Group Co
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 Shanghai Wanwu Xinsheng Environmental Technology Group Co filed Critical Shanghai Wanwu Xinsheng Environmental Technology Group Co
Priority to CN202011353778.2A priority Critical patent/CN112486478B/en
Publication of CN112486478A publication Critical patent/CN112486478A/en
Application granted granted Critical
Publication of CN112486478B publication Critical patent/CN112486478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

The application aims to provide an event processing method and equipment based on field driving, wherein an event processor component is introduced into a service system, and registers corresponding event processing centers and event processing basic information of the event processing centers for different field models; when a business system is started, an event processor component associates consumers with different event types for an event processing center, and distributes a thread pool and message queue MQ processing resources; the domain model of the publisher publishes the published event of the target event type and the event message thereof to the corresponding target event processing center; the target event processing center sends the event information to the corresponding target consumer for processing according to the target event type and the event processing basic information, so that a plurality of event processing modes are provided for the service system through the event processor assembly, the use cost of different event processing modes is reduced, and the reusability of codes is improved.

Description

Event processing method and device based on field driving
Technical Field
The present application relates to the field of computers, and in particular, to a method and apparatus for event processing based on domain driving.
Background
In the code development process of the domain driving mode, two important steps are building a domain model and dividing a service boundary, wherein a scheme for clearly dividing the service boundary generally isolates and decouples the models with dependency relations among a plurality of domains through an event mode. The current practical scheme of the event mode mainly comprises the following three steps of firstly, carrying out local event synchronous processing based on a subscription release mode; 2. asynchronous processing of local events based on a queue thread pool; 3. remote event asynchronous processing based on MQ middleware, but because each technical scheme in the existing practice scheme needs additional development cost, multiplexing cost is higher, and there is no unified interface for event processing, the access and switching costs of different event processing modes are high.
Disclosure of Invention
The application aims to provide an event processing method and equipment based on field driving, which are used for integrating the existing event processing modes, reducing the use cost of different event processing modes and improving the reusability of codes.
According to an aspect of the present application, there is provided a domain-driven based event processing method, wherein the method includes:
introducing an event processor component into a service system, wherein the event processor component registers corresponding event processing centers and event processing basic information of the event processing centers for different field models;
when the business system is started, the event processor component associates consumers with different event types for the event processing center and distributes a thread pool and message queue MQ processing resources;
the method comprises the steps that a domain model of a publisher publishes a published event of a target event type and an event message of the published event to a target event processing center corresponding to the domain model of the publisher;
and the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information so that the target consumer processes the release event based on the event message.
Further, in the above method, the event processing basic information of the event processing center includes: the name of the event processing center, the event type and the event processing mode corresponding to the event type.
Further, in the above method, when the service system involves an event of the domain model of the subscriber, a corresponding consumer is registered in an event processing center corresponding to the domain model of the publisher, and a processing mode of the consumer receiving the event and a type of the event consumed are preset.
Further, in the above method, the issuing event of the object event type and the event message thereof are issued by the domain model of the issuer to the object event processing center corresponding to the domain model of the issuer, including:
the field model of the publisher obtains the context related information of the published event of the published target event type;
packaging the context related information of the release event into an event message object to obtain an event message of the release event;
and sending the event message of the release event to a target event processing center corresponding to the domain model of the release party.
Further, in the above method, the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, including:
the target event processing center determines an event processing mode corresponding to the target event type according to the event processing basic information of the target event processing center;
the target event processing center sends the event message to a corresponding target consumer in an event processing mode corresponding to the target event type, so that the target consumer processes the release event based on the event message.
Further, in the above method, the event type in the event processing basic information of the event processing center includes a local synchronous type event, a local asynchronous type event, and a remote asynchronous type event.
Further, in the above method, if the target event type is a local synchronization type event, the sending, by the target event processing center, the event message to the corresponding target consumer by an event processing manner corresponding to the target event type includes:
the target event processing center directly sends the event message to the corresponding target consumer.
Further, in the above method, if the target event type is a local asynchronous event, the sending, by the target event processing center, the event message to the corresponding target consumer by an event processing manner corresponding to the target event type includes:
and asynchronously sending the event message to the corresponding target consumer through the thread pool distributed by the target event processing center.
Further, in the above method, the MQ processing resource includes an MQ sender, an MQ middleware, and an MQ consumer, where if the target event type is a remote asynchronous event, the sending, by the target event processing center, the event message to the corresponding target consumer by an event processing manner corresponding to the target event type includes:
and sending the event message to a target MQ middleware distributed by the target event processing center through a target MQ sender distributed by the target event processing center, forwarding the event message to a target MQ consumer distributed by the target event processing center by the target MQ middleware, and sending the event message to a corresponding target consumer by the target MQ consumer.
According to another aspect of the present application, there is also provided a non-volatile storage medium having stored thereon computer readable instructions which, when executed by a processor, cause the processor to implement a domain-driven event processing method as described above.
According to another aspect of the present application, there is also provided an apparatus for domain-driven event processing, wherein the apparatus includes:
one or more processors;
a computer readable medium for storing one or more computer readable instructions,
the one or more computer-readable instructions, when executed by the one or more processors, cause the one or more processors to implement the domain-driven event handling method as described above.
Compared with the prior art, the method has the advantages that the event processor component is introduced into the service system, and the event processor component registers corresponding event processing centers and event processing basic information of the event processing centers for different field models; when the business system is started, the event processor component associates consumers with different event types for the event processing center and distributes a thread pool and message queue MQ processing resources; the method comprises the steps that a domain model of a publisher publishes a published event of a target event type and an event message of the published event to a target event processing center corresponding to the domain model of the publisher; the target event processing center sends the event message to the corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, the release event sent to the event processing center in a service system is realized, the release event is sent to the consumer subscribing the target event type according to the event processing mode corresponding to the target event type of the release event, so that the consumer processes the release event, the event processor component provides a plurality of event processing modes for the service system to support unified access use, packages a plurality of event processing modes in the form of the event processing center, provides a standardized event sending processing interface, integrates the existing event processing modes, reduces the use cost of different event processing modes, and improves the code reusability.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 illustrates a flow diagram of a domain-driven based event processing method in accordance with an aspect of the present application;
fig. 2 is a schematic diagram of a practical application scenario of a domain-driven event processing method according to an aspect of the present application.
The same or similar reference numbers in the drawings refer to the same or similar parts.
Detailed Description
The application is described in further detail below with reference to the accompanying drawings.
In one exemplary configuration of the application, the terminal, the device of the service network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
As shown in fig. 1, a flow chart of a domain-driven event processing method according to an aspect of the present application includes: step S11, step S12, step S13 and step S14, wherein the method specifically comprises the following steps:
step S11, introducing an event processor component into a service system, wherein the event processor component registers corresponding event processing centers and event processing basic information of the event processing centers for different field models; here, the event processing basic information of the event processing center includes: the name of the event processing center, the event type and the event processing mode corresponding to the event type. For example, in step S11, an event handler component is introduced into the service system, where the event handler component registers corresponding event processing centers for different domain models that need to issue event notifications, that is, different collar models correspond to respective event processing centers, and when registering event processing centers corresponding to different domain models, it is required to determine event processing basic information of the event processing centers, for example, names of event processing centers, event processing modes supported by the time processing centers, event types that can be processed, different event processing modes corresponding to different event types, that is, different event processing modes corresponding to different event types, and relevant configuration information of different event processing modes.
In the step S11, when the service system involves an event of the domain model of the subscriber, a corresponding consumer needs to be registered in an event processing center corresponding to the domain model of the publisher, and a processing manner of the event received by the consumer and a type of the event consumed are preset, so as to process a published event corresponding to the subscribed event type.
In step S12, when the service system is started, the event processor component associates consumers with different event types for the event processing center, and allocates a thread pool and a Message Queue MQ (MQ) processing resource, so that when determining the event processing center to which the published event belongs, the allocated thread pool and MQ processing resource can be directly invoked later, and the published event and an event Message thereof can be sent to the consumer corresponding to the event type associated with the event processing center to which the published event belongs, so as to improve the publishing efficiency of the published event. The MQ processing resources comprise an MQ sender, an MQ middleware and an MQ consumer, so that the subsequent forwarding of event messages of the issued events is facilitated.
Step S13, a domain model of a publisher publishes a published event of a target event type and an event message thereof to a target event processing center corresponding to the domain model of the publisher;
and step S14, the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, and the consumer processes the release event.
Through the steps S11 to S14, the event processor component provides a plurality of event processing modes for the service system, supports the unified access and use, packages the plurality of event processing modes in the form of an event processing center, provides a standardized event sending processing interface, integrates the existing event processing modes, reduces the use cost of different event processing modes, and improves the reusability of codes.
Further, the step S13 of the domain model of the publisher publishing the published event of the target event type and the event message thereof to the target event processing center corresponding to the domain model of the publisher specifically includes:
the field model of the publisher obtains the context related information of the published event of the published target event type;
packaging the context related information of the release event into an event message object to obtain an event message of the release event;
and sending the event message of the release event to a target event processing center corresponding to the domain model of the release party.
For example, when a domain model in a service system needs to issue an event notification, the domain model of the issuer first acquires context related information of an issued event of a target event type needing to be issued; then, the context related information of the release event is packaged into an event message object to obtain an event message of the release event; and finally, sending the event message of the release event to a target event processing center corresponding to the field model of the release party, so as to send the event message of the release event through the target event processing center corresponding to the field model of the release party, realize the encapsulation of the event message of the release event required to be released by the field model of the release party, and send the event message to the target event processing center corresponding to the field model of the release party to carry out the sending processing of the release event and the event message thereof.
Further, the step S14 of the target event processing center sending the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, specifically includes:
the target event processing center determines an event processing mode corresponding to the target event type according to the event processing basic information of the target event processing center; here, the event processing basic information of the event processing center includes: the name of the event processing center, the event type and the event processing mode corresponding to the event type.
The target event processing center sends the event message to a corresponding target consumer in an event processing mode corresponding to the target event type, so that the target consumer processes the release event based on the event message.
For example, the event processing center registered in the event processor component may distribute events corresponding to different event types to the consumer through the processors of the event processing modes corresponding to the different event types, so, in an application scenario of actually publishing events, when a domain model in a business system needs to publish event notifications, the domain model of the publisher sends event facts of the published events to be published to a target event processing center corresponding to the domain model of the publisher so as to send event messages of the published events through a target event processing center corresponding to the domain model of the publisher; the target event processing center determines an event processing mode corresponding to the target event type according to the event processing basic information registered by the target event processing center, and then sends the event message to a corresponding target consumer through the event processing mode corresponding to the target event type, so that the target consumer processes the release event based on the event message, and the purpose of sending the event message of the release event through the target event processing center by adopting the corresponding event processing mode is achieved.
Further, the event types in the event processing basic information of the event processing center include a local synchronous type event, a local asynchronous type event and a remote asynchronous type event.
In this embodiment, if the target event type is a local synchronization type event, where the target event processing center directly sends the local synchronization type event and the event message thereof to the corresponding target consumer when sending the event message to the corresponding target consumer in an event processing manner corresponding to the target event type, so as to implement a direct sending process of the local synchronization type event.
In this embodiment, if the target event type is a local asynchronous event, the target event processing center sends the event message to a corresponding target consumer in an event processing manner corresponding to the target event type, and asynchronously sends the local asynchronous event and the event message thereof to the corresponding target consumer through a thread pool allocated by the target event processing center, so that the sending process of the local asynchronous event is realized through the thread pool allocated by the target event processing center.
In this embodiment, the MQ processing resource includes an MQ sender, an MQ middleware, and an MQ consumer, where if the target event type is a remote asynchronous type event, when the target event processing center sends the event message to the corresponding target consumer in an event processing manner corresponding to the target event type, the remote asynchronous type event and the event message thereof are sent to the target MQ middleware distributed by the target event processing center through the target MQ sender distributed by the target event processing center, and the target MQ middleware forwards the remote asynchronous type event and the event message thereof to the target MQ consumer distributed by the target event processing center, and the target MQ consumer sends the remote asynchronous type event and the event message thereof to the corresponding target consumer, so that the sending of the remote asynchronous type event is processed through the MQ processing resource distributed by the target event processing center.
As shown in fig. 2, a schematic diagram of an actual application scenario of a domain-driven event processing method according to an aspect of the present application is provided, where a domain model a is a domain model of a publisher, and a domain model B and a domain model C are domain models of subscribers. The method comprises the steps of packaging various event processing modes, such as event processing modes corresponding to local synchronous events, local asynchronous events and remote asynchronous events, by means of an event processing center object registered in an event processor assembly, providing a standardized event sending processing interface, namely an event processing center, and sending events sent to the event processing center by a service system to be sequentially sent to consumers subscribed to the event type according to the event processing modes corresponding to the event type subscribed by the consumers for processing, wherein the method comprises the following steps of: in an actual application scene, an event processor component is introduced into a service system, and registers corresponding event processing centers for different domain models which need to issue event notifications, namely, different collar models correspond to respective event processing centers, and when registering event processing centers corresponding to different domain models, event processing basic information of the event processing centers needs to be determined, for example, names of the event processing centers, event processing modes supported by the time processing centers, event types which can be processed, different event processing modes corresponding to different event types, namely, different event processing modes corresponding to different event types, related configuration information of different event processing modes, and the like.
When the service system relates to an event of a domain model of a subscriber, a corresponding consumer is registered in an event processing center corresponding to the domain model of the publisher, and a processing mode of the event received by the consumer and a consumed event type are preset so as to process a published event corresponding to the subscribed event type.
When the service system is started, the event processor component associates consumers with different event types for the event processing center, and allocates a thread pool and a Message Queue (MQ) processing resource, so that when the event processing center to which the released event belongs is determined later, the allocated thread pool and the MQ processing resource can be directly called, and the released event and an event Message thereof can be sent to the consumer corresponding to the event type associated with the event processing center to which the released event belongs, and release efficiency of the released event is improved. The MQ processing resources comprise an MQ sender, an MQ middleware and an MQ consumer, so that the subsequent forwarding of event messages of the issued events is facilitated. Here, the consumer corresponds to the domain model of the subscriber in fig. 2, such as domain model B and domain model C in fig. 2.
When a domain model A of a publisher in a service system publishes an event notification, firstly, context related information of a published event is packaged into an event message object to obtain an event message of the published event, and then the published event and the event message thereof are sent through a target event processing center corresponding to a target event type of the published event.
The target event processing center will distribute the different types of published events to consumers including domain model B and/or domain model C through the corresponding processors of different event handling means, as shown in fig. 2. If the release event is a local synchronous event, the target event processing center directly sends the local synchronous event and the event message thereof to a consumer; and if the target event type is a local asynchronous event, asynchronously sending the local asynchronous event and the event message thereof to a corresponding target consumer through a thread pool distributed by the target event processing center. If the published event is a remote asynchronous type event, the remote asynchronous type event and an event message thereof are sent to a target MQ middleware distributed by the target event processing center through a target MQ sender distributed by the target event processing center, the target MQ middleware forwards the remote asynchronous type event and the event message thereof to a target MQ consumer distributed by the target event processing center, and the target MQ consumer sends the remote asynchronous type event and the event message thereof to a corresponding target consumer, as shown in fig. 2, and sends events of different event types to different domain models B and C.
The consumer receives the event message and then automatically processes the release event corresponding to the event message, the domain model of the subscriber is responsible for monitoring, exception handling and the like in the event processing process, such as processing monitoring and log printer exception alarm lamps, in the event processing process, and finally, the event processor component realizes isolation of event interaction in different processing modes among different domain models through a unified access mode, namely, the event processor component.
Through the embodiment of the application, the existing event processing modes are integrated, the use cost of different event processing modes is reduced, and the reusability of codes is improved; the method also unifies the access mode of event processing, and realizes the standardization of event processing and the rapid switching of different event processing modes; the event processor component uniformly manages the event processing process to realize uniform monitoring and exception handling; improving the performance of various event processing operations.
According to another aspect of the present application, there is also provided a non-volatile storage medium having stored thereon computer readable instructions which, when executed by a processor, cause the processor to implement a domain-driven event processing method as described above.
According to another aspect of the present application, there is also provided an apparatus for domain-driven event processing, wherein the apparatus includes:
one or more processors;
a computer readable medium for storing one or more computer readable instructions,
the one or more computer-readable instructions, when executed by the one or more processors, cause the one or more processors to implement the domain-driven event handling method as described above.
For details of each embodiment of the domain-based event processing device, reference may be made specifically to the corresponding portion of the embodiment of the domain-based event processing method, which is not described herein.
In summary, by introducing an event processor component into a service system, the event processor component registers corresponding event processing centers and event processing basic information of the event processing centers for different domain models; when the business system is started, the event processor component associates consumers with different event types for the event processing center and distributes a thread pool and message queue MQ processing resources; the method comprises the steps that a domain model of a publisher publishes a published event of a target event type and an event message of the published event to a target event processing center corresponding to the domain model of the publisher; the target event processing center sends the event message to the corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, the release event sent to the event processing center in a service system is realized, the release event is sent to the consumer subscribing the target event type according to the event processing mode corresponding to the target event type of the release event, so that the consumer processes the release event, the event processor component provides a plurality of event processing modes for the service system to support unified access use, packages a plurality of event processing modes in the form of the event processing center, provides a standardized event sending processing interface, integrates the existing event processing modes, reduces the use cost of different event processing modes, and improves the code reusability.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, e.g., using Application Specific Integrated Circuits (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application may be executed by a processor to perform the steps or functions described above. Likewise, the software programs of the present application (including associated data structures) may be stored on a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. In addition, some steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
Furthermore, portions of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application by way of operation of the computer. Program instructions for invoking the inventive methods may be stored in fixed or removable recording media and/or transmitted via a data stream in a broadcast or other signal bearing medium and/or stored within a working memory of a computer device operating according to the program instructions. An embodiment according to the application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to operate a method and/or a solution according to the embodiments of the application as described above.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.

Claims (9)

1. A domain-driven based event processing method, wherein the method comprises:
introducing an event processor component into a service system, wherein the event processor component registers corresponding event processing centers and event processing basic information of the event processing centers for different field models;
when the business system is started, the event processor component associates consumers with different event types for the event processing center and distributes a thread pool and message queue MQ processing resources;
the method comprises the steps that a domain model of a publisher publishes a published event of a target event type and an event message of the published event to a target event processing center corresponding to the domain model of the publisher;
the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information so that the target consumer processes the release event based on the event message;
the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, and the method comprises the following steps:
the target event processing center determines an event processing mode corresponding to the target event type according to the event processing basic information of the target event processing center;
the target event processing center sends the event message to a corresponding target consumer in an event processing mode corresponding to the target event type so that the target consumer processes the release event based on the event message;
if the target event type is a local synchronization type event, the target event processing center sends the event message to a corresponding target consumer in an event processing manner corresponding to the target event type, where the event processing center includes: the target event processing center directly sends the event message to the corresponding target consumer.
2. The method of claim 1, wherein the event processing basic information of the event processing center comprises: the name of the event processing center, the event type and the event processing mode corresponding to the event type.
3. The method of claim 2, wherein when the service system involves an event of a domain model of a subscriber, registering a corresponding consumer at an event processing center corresponding to the domain model of the publisher, and presetting a processing manner of the consumer receiving the event and an event type of the consumption.
4. A method according to claim 3, wherein the publisher's domain model publishes a published event of a target event type and its event messages to a target event processing center corresponding to the publisher's domain model, comprising:
the field model of the publisher obtains the context related information of the published event of the published target event type;
packaging the context related information of the release event into an event message object to obtain an event message of the release event;
and sending the event message of the release event to a target event processing center corresponding to the domain model of the release party.
5. The method of claim 4, wherein the event type in the event processing basic information of the event processing center includes a local synchronous type event, a local asynchronous type event, and a remote asynchronous type event.
6. The method of claim 4, wherein if the target event type is a local asynchronous type event, the sending, by the target event processing center, the event message to the corresponding target consumer by an event handling manner corresponding to the target event type, comprises:
and asynchronously sending the event message to the corresponding target consumer through the thread pool distributed by the target event processing center.
7. The method of claim 5, wherein the MQ processing resources comprise MQ senders, MQ middleware, and MQ consumers, wherein if the target event type is a remote asynchronous type event, the target event processing center sends the event message to the corresponding target consumer by means of an event handling corresponding to the target event type, comprising:
and sending the event message to a target MQ middleware distributed by the target event processing center through a target MQ sender distributed by the target event processing center, forwarding the event message to a target MQ consumer distributed by the target event processing center by the target MQ middleware, and sending the event message to a corresponding target consumer by the target MQ consumer.
8. A non-volatile storage medium having stored thereon computer readable instructions which, when executed by a processor, cause the processor to implement the method of any of claims 1 to 7.
9. An apparatus for domain-driven event handling, wherein the apparatus comprises:
one or more processors;
a computer readable medium for storing one or more computer readable instructions,
when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 7.
CN202011353778.2A 2020-11-26 2020-11-26 Event processing method and device based on field driving Active CN112486478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011353778.2A CN112486478B (en) 2020-11-26 2020-11-26 Event processing method and device based on field driving

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011353778.2A CN112486478B (en) 2020-11-26 2020-11-26 Event processing method and device based on field driving

Publications (2)

Publication Number Publication Date
CN112486478A CN112486478A (en) 2021-03-12
CN112486478B true CN112486478B (en) 2023-08-11

Family

ID=74935614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011353778.2A Active CN112486478B (en) 2020-11-26 2020-11-26 Event processing method and device based on field driving

Country Status (1)

Country Link
CN (1) CN112486478B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006116497A2 (en) * 2005-04-25 2006-11-02 Invensys Systems, Inc. Recording and tracing non-trending production data and events in an industrial process control environment
CN102340495A (en) * 2010-07-26 2012-02-01 中国移动通信集团广东有限公司 Event center supporting cross-system service linkage and event processing method of event center
CN110162391A (en) * 2019-05-27 2019-08-23 浪潮云信息技术有限公司 A kind of asynchronous frame and its implementation
US10454795B1 (en) * 2017-03-22 2019-10-22 Amazon Technologies, Inc. Intermediate batch service for serverless computing environment metrics
CN110750269A (en) * 2019-10-25 2020-02-04 浪潮云信息技术有限公司 Software implementation method based on step driving
CN111158877A (en) * 2019-12-28 2020-05-15 山东爱德邦智能科技有限公司 Event management method and device for big data platform and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9483329B2 (en) * 2015-02-09 2016-11-01 Sap Se Categorizing and modeling integration adapters
CN110769018A (en) * 2018-07-27 2020-02-07 北京国双科技有限公司 Message pushing method and device
CN110968586B (en) * 2018-09-30 2023-08-25 北京国双科技有限公司 Distributed transaction processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006116497A2 (en) * 2005-04-25 2006-11-02 Invensys Systems, Inc. Recording and tracing non-trending production data and events in an industrial process control environment
CN102340495A (en) * 2010-07-26 2012-02-01 中国移动通信集团广东有限公司 Event center supporting cross-system service linkage and event processing method of event center
US10454795B1 (en) * 2017-03-22 2019-10-22 Amazon Technologies, Inc. Intermediate batch service for serverless computing environment metrics
CN110162391A (en) * 2019-05-27 2019-08-23 浪潮云信息技术有限公司 A kind of asynchronous frame and its implementation
CN110750269A (en) * 2019-10-25 2020-02-04 浪潮云信息技术有限公司 Software implementation method based on step driving
CN111158877A (en) * 2019-12-28 2020-05-15 山东爱德邦智能科技有限公司 Event management method and device for big data platform and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
消息中间件;朱律玮等;应用技术;全文 *

Also Published As

Publication number Publication date
CN112486478A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US8806506B2 (en) System and method for processing messages using a common interface platform supporting multiple pluggable data formats in a service-oriented pipeline architecture
US10038762B2 (en) Request and response decoupling via pluggable transports in a service oriented pipeline architecture for a request response message exchange pattern
CN110401592B (en) Method and equipment for data transfer in message channel
US7996562B2 (en) Messaging system interface to web services
US8135785B2 (en) System and method for processing messages using pluggable protocol processors in a service-oriented pipeline architecture
US10592314B2 (en) Message queueing in middleware by a message broker
CN107276970B (en) Unbinding and binding method and device
CN110944018A (en) Rpc communication method, device and medium based on annotation and dynamic proxy
US10218661B2 (en) Dynamic granular messaging persistence
CN114860473A (en) Message processing method, processor and storage medium
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN112486478B (en) Event processing method and device based on field driving
CN110764930B (en) Request or response processing method and device based on message mode
CN112363946B (en) Message forwarding method and device based on service system
CN114513483A (en) Message notification method and device based on service system
CN112738181B (en) Method, device and server for cluster external IP access
CN111611092B (en) Notification processing method, device and equipment
CN112416980A (en) Data service processing method, device and equipment
CN113094189B (en) Method and equipment for processing messages in multi-channel message queue
CN115237722A (en) Asynchronous message monitoring method and device, storage medium and electronic equipment
CN115866016B (en) Global exit method, equipment and medium
CN112395023B (en) Operation activity display method, device and system
CN112486486B (en) Lottery drawing method and equipment based on static resources
CN111639936B (en) Transaction information acquisition method and device, electronic equipment and readable storage medium
CN117201581A (en) Message queue log recording method, device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Applicant after: Shanghai wanwansheng Environmental Protection Technology Group Co.,Ltd.

Address before: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Applicant before: SHANGHAI YUEYI NETWORK INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant