CN116701013A - Message consumption method, device, electronic equipment and computer readable medium - Google Patents

Message consumption method, device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN116701013A
CN116701013A CN202310595340.2A CN202310595340A CN116701013A CN 116701013 A CN116701013 A CN 116701013A CN 202310595340 A CN202310595340 A CN 202310595340A CN 116701013 A CN116701013 A CN 116701013A
Authority
CN
China
Prior art keywords
message
environment
configuration information
determining
consumer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310595340.2A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202310595340.2A priority Critical patent/CN116701013A/en
Publication of CN116701013A publication Critical patent/CN116701013A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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

Abstract

Embodiments of the present disclosure disclose message consumption methods, apparatuses, electronic devices, and computer-readable media. One embodiment of the method comprises the following steps: acquiring a consumer configuration information set of a message object, wherein the consumer configuration information set is stored in an object container; determining an environment configuration file of an operating environment corresponding to the message object; determining whether the running environment is a prefire environment according to the environment configuration file; in response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container. This embodiment is related to cloud computing, where the message object is not instantiated after the consumer configuration information set is removed from the object container. Thus, message consumption can be stopped without relying on the MQ profile.

Description

Message consumption method, device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computers, and in particular, to a message consumption method, apparatus, electronic device, and computer readable medium.
Background
MQ (Message Queue) message queues are important middleware for service decoupling and traffic peaking. In real systems, there are production and prefire environments (simulating an environment on a real line, isolated from real traffic by applications, but data co-exist). In this context, it is desirable for the prefire Consumer Consumer to stop consuming messages sent by the Producer's Producer in the production environment, but when the power is verified prior to being online, it is desirable for the prefire Consumer to be consumable. At present, the message sent by the Producer in the production environment is stopped, and the method is generally adopted as follows: based on JDOS deployment system, extracting the configuration file in the MQ configuration file coverage image, redeploying the prefire environment, and stopping consumption by Consumer.
However, the following technical problems generally exist in the above manner: message consumption is stopped through the MQ configuration file, the configuration file configuration is complex, and the development efficiency is reduced.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, may contain information that does not form the prior art that is already known to those of ordinary skill in the art in this country.
Disclosure of Invention
The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose message consumption methods, apparatuses, electronic devices, computer-readable media and program products to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a message consumption method, the method comprising: acquiring a consumer configuration information set of a message object, wherein the consumer configuration information set is stored in an object container; determining an environment configuration file of an operating environment corresponding to the message object; determining whether the running environment is a prefire environment according to the environment configuration file; in response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container.
Optionally, before determining the environment configuration file of the running environment corresponding to the message object, the method further includes: caching the consumer configuration information set into an associated virtual machine.
Optionally, the method further comprises: in response to detecting a start operation to start the environment configuration file, reading a customer configuration information set from the virtual machine; adding the set of consumer configuration information to the object container, and initiating a message subscription operation.
Optionally, the method further comprises: determining whether the environment configuration file starts a consumption operation; responsive to determining that the environment profile does not initiate a consuming operation, determining whether a set of consumer configuration information for the message object is in the object container; in response to determining that the set of consumer configuration information is in the object container, the message subscription operation is canceled, and the set of consumer configuration information is removed from the object container.
Optionally, the method further comprises: in response to receiving a message sent by a message production end, determining whether the message needs to be consumed or not based on configured message configuration information; in response to determining that the message is to be consumed, a message consuming operation is performed.
In a second aspect, some embodiments of the present disclosure provide a message consumption apparatus, the apparatus comprising: an acquisition unit configured to acquire a set of consumer configuration information of a message object, wherein the set of consumer configuration information is stored in an object container; a first determining unit configured to determine an environment configuration file of an operating environment corresponding to the message object; a second determining unit configured to determine whether the running environment is a prefire environment according to the environment configuration file; and a removing unit configured to remove the set of consumer configuration information from the object container in response to determining that the execution environment is a prefire environment.
Optionally, before the first determining unit, the message consuming apparatus further comprises: and the caching unit is configured to cache the consumer configuration information set into an associated virtual machine.
Optionally, the message consumption device further comprises: a reading unit configured to read a set of consumer configuration information from the virtual machine in response to detecting a start operation to open the environment configuration file; an adding unit configured to add the set of consumer configuration information to the object container, and initiate a message subscription operation.
Optionally, the message consumption device further comprises: a consumption determination unit configured to determine whether the environment profile starts a consumption operation; a third determining unit configured to determine whether a set of consumer configuration information of the message object is in the object container in response to determining that the environment profile does not initiate a consuming operation; and a cancellation unit configured to cancel a message subscription operation and remove the set of consumer configuration information from the object container in response to determining that the set of consumer configuration information is in the object container.
Optionally, the message consumption device further comprises: a fourth determining unit configured to determine whether the message needs to be consumed based on the configured message configuration information in response to receiving the message sent by the message generating end; and the execution unit is configured to execute message consumption operation in response to the fact that the message is required to be consumed.
In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors causes the one or more processors to implement the method described in any of the implementations of the first aspect above.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
In a fifth aspect, some embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
The above embodiments of the present disclosure have the following advantageous effects: with the message consumption method of some embodiments of the present disclosure, message consumption can be stopped without relying on the MQ profile. Thus, the subsequent development efficiency is improved. Specifically, the reason why development efficiency is lowered is that: message consumption is stopped through the MQ profile, and profile configuration is complex. Based on this, the message consumption method of some embodiments of the present disclosure first obtains a set of consumer configuration information for a message object. Wherein the set of consumer configuration information is stored in the object container. Then, determining the environment configuration file of the operation environment corresponding to the message object. Therefore, whether to stop consuming the message is conveniently judged according to the environment configuration file. And then, determining whether the running environment is a prefire environment according to the environment configuration file. Finally, in response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container. Thus, after the consumer configuration information set is removed from the object container, the message object is rendered non-instantiated. Thus, message consumption can be stopped without relying on the MQ profile.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a schematic illustration of one application scenario of a message consumption method of some embodiments of the present disclosure;
FIG. 2 is a flow chart of some embodiments of a message consumption method according to the present disclosure;
FIG. 3 is a flow chart of other embodiments of a message consumption method according to the present disclosure;
FIG. 4 is a schematic structural diagram of some embodiments of a message consuming device according to the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of one application scenario of a message consumption method according to some embodiments of the present disclosure.
In the application scenario of fig. 1, first, computing device 101 may obtain a set of consumer configuration information 102 for a message object. Wherein the set of consumer configuration information 102 is stored in an object container. The computing device 101 may then determine the environment profile 104 of the execution environment 103 to which the message object corresponds. The computing device 101 may then determine whether the runtime environment 103 is a prefire environment 105 based on the environment profile 104. Finally, in response to determining that the runtime environment 103 is a prefire environment, the set of consumer configuration information 102 is removed from the object container.
The computing device 101 may be hardware or software. When the computing device is hardware, the computing device may be implemented as a distributed cluster formed by a plurality of servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices listed above. It may be implemented as a plurality of software or software modules, for example, for providing distributed services, or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of computing devices in fig. 1 is merely illustrative. There may be any number of computing devices, as desired for an implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a message consumption method according to the present disclosure is shown. The message consumption method comprises the following steps:
step 201, a set of consumer configuration information for a message object is obtained.
In some embodiments, the execution body of the message consumption method (e.g., computing device 101 shown in fig. 1) may obtain the set of consumer configuration information for the message object through the lifecycle interface by way of a wired connection or a wireless connection. Wherein the set of consumer configuration information is stored in the object container. For example, the lifecycle interface may be a Spring lifecycle interface. The message object may refer to a Consumer Consumer. The set of consumer configuration information may refer to a set of configuration meta-information interfaces for message objects, i.e., a set of beandefmination. The object container may refer to a set interface container, i.e., a Bean container.
Step 202, determining an environment configuration file of the running environment corresponding to the message object.
In some embodiments, the execution body may determine an environment configuration file of the execution environment corresponding to the message object. Here, the execution Environment may refer to an execution Environment (Environment) in which the above-described message object is located. The environment Profile may refer to a Profile (Profile) of the operating environment.
Step 203, determining whether the running environment is a prefire environment according to the environment configuration file.
In some embodiments, the execution body may determine whether the execution environment is a prefire environment according to the environment configuration file. Here, the prefire environment may refer to an environment on a simulated real line, isolated from the real environment by an application, but data coexist. That is, whether the above-described running environment is a prefire environment may be determined by configuration information in an environment configuration file.
In response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container, step 204.
In some embodiments, the execution body may remove the set of consumer configuration information from the object container in response to determining that the execution environment is a prefire environment.
Thus, after the consumer configuration information set is removed from the object container, the message object cannot be instantiated, so that the message sent by the consumer Producer in the production environment is stopped.
The above embodiments of the present disclosure have the following advantageous effects: with the message consumption method of some embodiments of the present disclosure, message consumption can be stopped without relying on the MQ profile. Thus, the subsequent development efficiency is improved. Specifically, the reason why development efficiency is lowered is that: message consumption is stopped through the MQ profile, and profile configuration is complex. Based on this, the message consumption method of some embodiments of the present disclosure first obtains a set of consumer configuration information for a message object. Wherein the set of consumer configuration information is stored in the object container. Then, determining the environment configuration file of the operation environment corresponding to the message object. Therefore, whether to stop consuming the message is conveniently judged according to the environment configuration file. And then, determining whether the running environment is a prefire environment according to the environment configuration file. Finally, in response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container. Thus, after the consumer configuration information set is removed from the object container, the message object is rendered non-instantiated. Thus, message consumption can be stopped without relying on the MQ profile.
With continued reference to fig. 3, fig. 3 illustrates a flow 300 of further embodiments of a message consumption method according to the present disclosure. The message consumption method comprises the following steps:
step 301, a set of consumer configuration information for a message object is obtained.
In some embodiments, the content of step 301 is the same as that of step 201, and will not be described in detail here.
Step 302, caching the consumer configuration information set into an associated virtual machine.
In some embodiments, the execution body of the message consumption method (e.g., computing device 101 shown in fig. 1) may cache the set of consumer configuration information described above into an associated virtual machine. The associated virtual machine may refer to a set Java virtual machine.
Step 303, determining an environment configuration file of the running environment corresponding to the message object.
Step 304, determining whether the running environment is a prefire environment according to the environment configuration file.
In response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container, step 305.
In some embodiments, the content of steps 303-305 is the same as the content of steps 202-204, and will not be described in detail herein.
In response to detecting the start-up operation to start the environment configuration file, the set of consumer configuration information is read from the virtual machine, step 306.
In some embodiments, the executing entity may read the set of consumer configuration information from the virtual machine in response to detecting a start-up operation to start the environment configuration file. That is, the start-up operation may refer to opening a consumable environment profile through the container-aware interface. For example, a Spring container aware interface.
Step 307, adding the set of consumer configuration information to the object container, and initiating a message subscription operation.
In some embodiments, the execution body may add the set of consumer configuration information to the object container and initiate a message subscription operation. Initiating a message subscription operation may refer to opening a subscription to a message queue.
Optionally, it is determined whether the above-described environment profile initiates a consuming operation.
In some embodiments, the execution body may determine whether the environment profile initiates a consuming operation. That is, initiating a consumption operation may characterize opening the above-described environment profile consumable message.
Optionally, in response to determining that the environment profile does not initiate a consuming operation, determining whether a set of consumer configuration information for the message object is in the object container.
In some embodiments, the execution body may determine whether a set of consumer configuration information for the message object is in the object container in response to determining that the environment profile does not initiate a consumption operation.
Optionally, in response to determining that the set of consumer configuration information is in the object container, canceling the message subscription operation, and removing the set of consumer configuration information from the object container.
In some embodiments, the executing entity may cancel a message subscription operation and remove the set of consumer configuration information from the object container in response to determining that the set of consumer configuration information is in the object container. The cancel message subscription operation may refer to canceling a subscription of a message queue.
Optionally, in response to receiving a message sent by the message producer, determining whether the message needs to be consumed based on the configured message configuration information.
In some embodiments, the executing entity may determine whether the message needs to be consumed based on the configured message configuration information in response to receiving the message sent by the message producer. That is, the message configuration information may refer to information of a consumable message set in advance. For example, the message configuration information may refer to the type of consumable message. That is, it can be determined whether the above-described message needs to be consumed (read) through the message configuration information.
Optionally, in response to determining that the message is to be consumed, a message consumption operation is performed.
In some embodiments, the executing entity may execute the message consuming operation in response to determining that the message is to be consumed. Here, the message consuming operation may refer to an operation of reading a message.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, the flow 300 of the message consumption method in some embodiments corresponding to fig. 3 can achieve the effect of starting the message sent by the consumption Producer in the production environment by configuring the consumable environment configuration file.
With further reference to fig. 4, as an implementation of the method illustrated in the above figures, the present disclosure provides some embodiments of a message consuming apparatus, corresponding to those illustrated in fig. 2, which may find particular application in a variety of electronic devices.
As shown in fig. 4, the message consumption device 400 of some embodiments includes: an acquisition unit 401, a first determination unit 402, a second determination unit 403, and a removal unit 404. Wherein, the obtaining unit 401 is configured to obtain a set of consumer configuration information of the message object, wherein the set of consumer configuration information is stored in the object container; a first determining unit 402 configured to determine an environment configuration file of an operating environment corresponding to the message object; a second determining unit 403 configured to determine whether the running environment is a prefire environment according to the environment configuration file; a removing unit 404 configured to remove the set of consumer configuration information from the object container in response to determining that the execution environment is a prefire environment.
Optionally, before the first determining unit 402, the message consumption device 400 further includes: and the caching unit is configured to cache the consumer configuration information set into an associated virtual machine.
Optionally, the message consumption device 400 further includes: a reading unit configured to read a set of consumer configuration information from the virtual machine in response to detecting a start operation to open the environment configuration file; an adding unit configured to add the set of consumer configuration information to the object container, and initiate a message subscription operation.
Optionally, the message consumption device 400 further includes: a consumption determination unit configured to determine whether the environment profile starts a consumption operation; a third determining unit configured to determine whether a set of consumer configuration information of the message object is in the object container in response to determining that the environment profile does not initiate a consuming operation; and a cancellation unit configured to cancel a message subscription operation and remove the set of consumer configuration information from the object container in response to determining that the set of consumer configuration information is in the object container.
Optionally, the message consumption device 400 further includes: a fourth determining unit configured to determine whether the message needs to be consumed based on the configured message configuration information in response to receiving the message sent by the message generating end; and the execution unit is configured to execute message consumption operation in response to the fact that the message is required to be consumed.
It will be appreciated that the elements recited in the message consuming device 400 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting benefits described above with respect to the method are equally applicable to the message consumption device 400 and the units contained therein, and are not described in detail herein.
Referring now to FIG. 5, a schematic diagram of an electronic device (e.g., computing device 101 shown in FIG. 1) 500 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), car terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 5 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communications device 509, or from the storage device 508, or from the ROM 502. The above-described functions defined in the methods of some embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that, the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a consumer configuration information set of a message object, wherein the consumer configuration information set is stored in an object container; determining an environment configuration file of an operating environment corresponding to the message object; determining whether the running environment is a prefire environment according to the environment configuration file; in response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor comprising: an acquisition unit, a first determination unit, a second determination unit, and a removal unit. The names of these units do not constitute a limitation on the unit itself in some cases, and for example, the first determining unit may also be described as "a unit that determines whether the above-described running environment is a prefire environment according to the above-described environment profile".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
Some embodiments of the present disclosure also provide a computer program product comprising a computer program which, when executed by a processor, implements any of the message consumption methods described above.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (10)

1. A message consumption method, comprising:
obtaining a consumer configuration information set of a message object, wherein the consumer configuration information set is stored in an object container;
determining an environment configuration file of an operating environment corresponding to the message object;
determining whether the running environment is a prefire environment according to the environment configuration file;
in response to determining that the execution environment is a prefire environment, the set of consumer configuration information is removed from the object container.
2. The method of claim 1, wherein prior to the determining the environment profile of the execution environment to which the message object corresponds, the method further comprises:
caching the set of consumer configuration information into an associated virtual machine.
3. The method of claim 2, wherein the method further comprises:
in response to detecting a start-up operation to open the environment configuration file, reading a set of consumer configuration information from the virtual machine;
adding the set of consumer configuration information to the object container, and initiating a message subscription operation.
4. A method according to claim 3, wherein the method further comprises:
determining whether the environment configuration file initiates a consuming operation;
in response to determining that the environment profile does not initiate a consumption operation, determining whether a set of consumer configuration information for the message object is in the object container;
in response to determining that the set of consumer configuration information is in the object container, a message subscription operation is canceled, and the set of consumer configuration information is removed from the object container.
5. A method according to claim 3, wherein the method further comprises:
in response to receiving a message sent by a message production end, determining whether the message needs to be consumed or not based on configured message configuration information;
in response to determining that the message needs to be consumed, a message consumption operation is performed.
6. A message consuming apparatus, comprising:
an acquisition unit configured to acquire a set of consumer configuration information of a message object, wherein the set of consumer configuration information is stored in an object container;
a first determining unit configured to determine an environment configuration file of an operating environment corresponding to the message object;
a second determining unit configured to determine whether the running environment is a prefire environment according to the environment configuration file;
a removal unit configured to remove the set of consumer configuration information from the object container in response to determining that the execution environment is a prefire environment.
7. The message consumption device of claim 6, wherein prior to the first determination unit, the device further comprises:
and the caching unit is configured to cache the consumer configuration information set into an associated virtual machine.
8. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
9. A computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method of any of claims 1-6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-6.
CN202310595340.2A 2023-05-24 2023-05-24 Message consumption method, device, electronic equipment and computer readable medium Pending CN116701013A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310595340.2A CN116701013A (en) 2023-05-24 2023-05-24 Message consumption method, device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310595340.2A CN116701013A (en) 2023-05-24 2023-05-24 Message consumption method, device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN116701013A true CN116701013A (en) 2023-09-05

Family

ID=87833201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310595340.2A Pending CN116701013A (en) 2023-05-24 2023-05-24 Message consumption method, device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN116701013A (en)

Similar Documents

Publication Publication Date Title
CN111459364B (en) Icon updating method and device and electronic equipment
CN110865852B (en) Webpage component loading method and device, electronic equipment and storage medium
CN112214408A (en) Dependency conflict detection method and device, electronic equipment and computer readable medium
CN111625422B (en) Thread monitoring method, thread monitoring device, electronic equipment and computer readable storage medium
CN111596991A (en) Interactive operation execution method and device and electronic equipment
CN110727566A (en) Method, device, medium and electronic equipment for acquiring process crash information
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN110865846B (en) Application management method, device, terminal, system and storage medium
CN112416303B (en) Software development kit hot repair method and device and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111460432B (en) On-line document authority control method, device, equipment and computer readable medium
CN111858381B (en) Application fault tolerance capability test method, electronic device and medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN111240801A (en) Method, device, medium and electronic equipment for generating heap memory snapshot file
CN110851281A (en) Method, server, terminal, system and storage medium for detecting memory leakage
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN113391860B (en) Service request processing method and device, electronic equipment and computer storage medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN111625326B (en) Task pipeline execution method and device and electronic equipment
CN110764995B (en) Method, device, medium and electronic equipment for detecting file access abnormality
CN116701013A (en) Message consumption method, device, electronic equipment and computer readable medium
CN113518183A (en) Camera calling method and device and electronic equipment
CN111538717A (en) Data processing method and device, electronic equipment and computer readable medium
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN115827415B (en) System process performance test method, device, equipment and computer 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