CN104360843A - Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system - Google Patents
Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system Download PDFInfo
- Publication number
- CN104360843A CN104360843A CN201410569898.4A CN201410569898A CN104360843A CN 104360843 A CN104360843 A CN 104360843A CN 201410569898 A CN201410569898 A CN 201410569898A CN 104360843 A CN104360843 A CN 104360843A
- Authority
- CN
- China
- Prior art keywords
- message
- priority
- master control
- service
- control queue
- 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
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a priority-based JMS (java messaging service) message scheduling method in an SOA (service-oriented architecture) system. The priority-based JMS message scheduling method comprises the following steps: increasing a general control queue between service requesters and a service provider, temporarily storing messages and related information and decoupling the service requesters and the service provider; designing related attribute information of JMS messages; selecting an algorithm by which high-priority messages conforming to rules can be selected from the general control queue and low-priority messages are taken into account, selecting the messages, and sending the messages to the service provider. Through the adoption of the priority-based JMS message scheduling method, congestion caused when a large number of service requesters request the service provider at the same time is solved; different service requester are differently treated, high-priority service requesters can be served first, and a hunger phenomenon of low-priority service requesters caused by long-term no services is taken into account.
Description
Technical field
The present invention relates to system architecture and heterogeneous system integration field, be specifically related in a kind of SOA system based on excellent
The JMS message dispatching method of first level.
Background technology
Along with the development of business event, the complicacy of its infosystem, diversity are also in continuous expansion, the proposition of Services Oriented Achitecture (Service-Oriented Architecture, SOA) is namely the scheme solving integration problem between each Legacy System.ESB (Enterprise Service Bus, ESB) as the infrastructure portion of abstract SOA design concept framework, for the information interaction between independent in conventional systems " information island " provides bottom guarantee.Service " being assigned " is on ESB, and the access of service requester to service changes the request to Service Provider Interface on ESB into.In SOA environment, one of feature of service is exactly its reusability, so may there is other a large amount of infosystems service interaction therewith, namely occurs the situation of a large amount of service requesters.Due to configuration and the service restriction of ISP self, ISP provides service ability limited within the unit interval, in this case, for different service requester defines a kind of priority level, ESB is when corresponding ISP is busy, and the message only selecting priority high is very necessary to its ISP.
Summary of the invention
For Problems existing in current various infosystem, the invention provides a kind of JMS(Java Messaging Service based on priority, Java messenger service) scheduling message model.The present invention is directed to a large amount of service requester synchronization in the infosystem according to the design of SOA theory send the request of ISP and cause congested phenomenon, distinguish service requester and treat, the JMS message sent for each service requester prints the mark of upper priority.Simultaneously, between service requester and ISP, add a master control queue, and to master control queue real-time listening, control and management in the whole life cycle of infosystem, reach the object of decoupling zero between service requester and ISP, finally solve the difficult problem that the service requester harsher to time requirement can not get serving for a long time.Considering " hunger " appears in low priority phenomenon because can not get for a long time serving simultaneously, ensure that the priority of the message of low priority dynamically can promote along with the growth of time.
Technical scheme of the present invention is as described below.
Based on a JMS message dispatching method for priority in SOA system, described method comprises: between service requester and ISP, increase master control queue, temporary transient storing message and relevant information thereof, makes service requester and ISP's decoupling zero; The correlation attribute information of design JMS message; Choose and can select legal high-priority message and taken into account the algorithm of low priority message from master control queue, select message and mail to ISP.Wherein: high-priority message refers to the message of in prioritization front 20%; Low priority message refers to the message of after in prioritization 30%.
Between service requester and ISP, increase master control queue in the present invention, temporary transient storing message and relevant information thereof, the step of service requester and ISP's decoupling zero is comprised: (1) sets up master control queue; (2) for master control queue increases authentication, ensure to only have the user through authentication can send out message or cancel breath in queue; (3) the JMS message duration arriving master control queue is stored, ensure to recover also not by the message selected in the Shi Nengcong that breaks down deposits; (4) according to first in first out (FIFO) mode to message queueing; (5) design map (Map) data structure, storing message mark and message arrive the time of master control queue; (6) monitor master control queue, when master control queue full, increase master control queue length in real time.
The correlation attribute information designing JMS message in the present invention comprises: (1) increases priority (Priority) the Custom Attributes information of JMS; (2) with the association ID(Correlation ID that global identifier (UUID) is JMS message) message header attribute assignment; (3) service queue (service Queue) attribute of JMS is increased.
Can select legal high-priority message in the present invention from master control queue and take into account the algorithm of low priority message, its step is as follows:
(1) for each class ISP opens a services selection thread.
(2) selector switch attribute is set according to the load of ISP.
(3) from master control queue, take out message and be put among memory data structure.
(4) take out the priority of current message and select thread to hold priority and compare, if the priority of current message is high, just adjustment thread holds priority is limit priority.
(5) according to formula: final priority=current priority-(current time in system-message time of arrival)/modifying factor, final priority is tried to achieve.
(6) if to hold the final priority that priority ratio step (5) draws low for thread, just take out message, mail to respective service supplier.
(7) if also have more message in master control queue after the current location of traversal, the 3rd step is just returned.
(8) increase thread and hold attribute, reduce the grade of traversal message and return second step, again traveling through master control queue.
Accompanying drawing explanation
Fig. 1 is topology diagram of the present invention.
Fig. 2 is that the present invention monitors respective service supplier load diagram.
Embodiment
In SOA environment, one of feature of service is exactly its reusability, so may there is other a large amount of infosystems service interaction therewith, namely occurs the situation of a large amount of service requesters.ESB is as the infrastructure portion of abstract SOA design concept framework in addition, for the information interaction in conventional systems between independent " information island " provides bottom guarantee.The present invention is the message priority administrative model set up on JBoss ESB technology.JBoss ESB is the realization of the ESB that JBoss releases, and is also the basis of the SOA product of JBoss.It is as the mutual medium of enterprise application, business service, Service Component and middleware, integrates and operation flow robotization plays an important role to realization.JBoss Messaging(JBM is used, JBoss Message routing in JBoss application server) as its JMS message-oriented middleware, the complete compatible JMS1.1 specification of JBM.And use JMX(Java administration extensions in JBoss application server) manage, monitor its system operation situation, such as empty buffer memory, reload configuration file etc.When implementing SOA system, introducing JBoss and JBoss ESB is a well selection.
Based on a JMS message dispatching method for priority in SOA system, described method comprises: between service requester and ISP, increase master control queue, temporary transient storing message and relevant information thereof, makes service requester and ISP's decoupling zero; The correlation attribute information of design JMS message, for the route of JMS message and select the message of high priority to provide foundation from master control queue; Choose the algorithm selecting legal high-priority message from master control queue, take into account low priority message, select message and mail to ISP.Wherein: high-priority message refers to the message of in prioritization front 20%; Low priority message refers to the message of after in prioritization 30%.
Between service requester and ISP, increase master control queue, the step of service requester and ISP's decoupling zero is comprised: (1) sets up master control queue; (2) for master control queue increases authentication, ensure to only have the user through authentication can forget send out message in queue or cancel breath; (3) the JMS message duration arriving master control queue is stored, ensure to recover also not by the message selected in the Shi Nengcong that breaks down deposits; (4) according to first in first out (FIFO) mode to message queueing; (5) design Hash mapping (hash Map) data structure, in key word (key), store Java messenger service association ID (JMS Correlation ID), in value (value), storing message arrives the time of master control queue; (6) monitor master control queue by Java administration extensions (JMX), when master control queue full, increase master control queue length in real time.
The JMS message attributes information that design priority is relevant comprises: (1) increases the Priority(priority of JMS) Custom Attributes information, Priority span is 1-5, i.e. five kinds of priority; (2) with global identifier (UUID) association ID (Correlation ID) the message header attribute assignment that is JMS message, the JMS message enabling this client correctly receive ISP to return; (3) increase service queue (service Queue) attribute of JMS, ensure that after being selected from master control queue, can be found oneself final destination.
The algorithm steps selecting legal high-priority message from master control queue is as follows:
(1) initialization selector switch traversal attribute traversal priority (scan Priority).
(2) obtained the load of corresponding ISP by JMX, if be in high load condition, just establish
Putting scan Priority is limit priority, is 1.
(3) browse by queue the next message that (Queue Browser) obtain in master control queue, all judge whether it exists in data structure Hash mapping table (Hash Map), if there is no, just using Java messenger service association ID (JMS Correlation ID) as key, current time, as value, joins among Hash mapping table (Hash Map).
(4) if current message priority is less than traversal priority (scan Priority), just explanation
There is the message of higher priority to be present among master control queue, at this moment also traversal priority (scan Priority) is set to 1.
(5) according to formula: final priority=current priority-(current time in system-message time of arrival)/modifying factor, final priority is tried to achieve.
(6) if traversal priority (scan Priority) is equal to, or greater than by the public affairs in step (5)
The final priority that formula is calculated, just selects this message, and is sent to corresponding service requester queue.
(7) if also have more message in master control queue after the current location of traversal, the 3rd is just returned
Step, otherwise perform the 7th step.
(8) increase traversal priority (scan Priority), reduce the grade of traversal message and return second step, again traveling through master control queue.
JMS scheduling message model overall process based on priority in SOA system is as follows:
(1) current load situation of monitoring service supplier.
(2) the selection priority attribute that thread is held is selected in adjustment.
(3) message is stored in Hash table time of arrival.
(4) final priority is determined by selection algorithm.
(5) from master control queue, corresponding message is chosen.
(6) final services listen queue is mail to.
As shown in drawings, based on the JMS scheduling message model of priority in SOA system, the structure of Message routing in whole system is illustrated.Master control queue existence and between service requester and ISP, reach the object of decoupling zero between the two, the user making ISP can be preferably priority high provides service.
In JBoss ESB, message processing procedure is as follows:
(1) for monitoring queue is set up in each service, these queues become the resource of JBoss ESB own, are outwards provided by supplier (Provider).
(2) requestor served will arrange the header attribute information sending message according to the rule appointed in advance.
(3) JBoss ESB is the rule that each ISP (i.e. message consumer) defines message selection, when by the time having message to arrive, just chooses corresponding message, according to header or attribute information route messages.
(4) after ISP obtains message, judge type of message, according to prior treaty rule, obtain message and return to destination, processing messages and mail to message return to destination.
Claims (4)
1. in SOA system based on a JMS message dispatching method for priority, described method comprises:
Between service requester and ISP, increase master control queue, temporary transient storing message and relevant information thereof, make service requester and ISP's decoupling zero;
The correlation attribute information of design JMS message;
Choose and can select legal high-priority message and taken into account the algorithm of low priority message from master control queue, select message and mail to ISP;
Wherein: high-priority message refers to the message of in prioritization front 20%; Low priority message refers to the message of after in prioritization 30%.
2. method according to claim 1, describedly increases master control queue, temporary transient storing message and relevant information thereof between service requester and ISP, and the step of service requester and ISP's decoupling zero is comprised:
(1) master control queue is set up;
(2) for master control queue increases authentication, ensure to only have the user through authentication can send out message or cancel breath in queue;
(3) the JMS message duration arriving master control queue is stored, ensure to recover also not by the message selected in the Shi Nengcong that breaks down deposits;
(4) according to first-in first-out to message queueing;
(5) design map data structure, storing message mark and message arrive the time of master control queue;
(6) monitor master control queue, when master control queue full, increase master control queue length in real time.
3. method according to claim 1, the correlation attribute information of described design JMS message comprises:
(1) the priority Custom Attributes information of JMS is increased;
(2) with UUID be the association ID message header attribute assignment of JMS message;
(3) the service queue attribute of JMS is increased.
4. method according to claim 1, describedly can select legal high-priority message and take into account the algorithm of low priority message from master control queue, and its step is as follows:
(1) for each class ISP opens a services selection thread;
(2) selector switch attribute is set according to the load of ISP;
(3) from master control queue, take out message and be put among memory data structure;
(4) take out the priority of current message and select thread to hold priority and compare, if the priority of current message is high, just adjustment thread holds priority is limit priority;
(5) according to formula: final priority=current priority-(current time in system-message time of arrival)/modifying factor, final priority is tried to achieve;
(6) if to hold the final priority that priority ratio step (5) draws low for thread, just take out message, mail to respective service supplier;
(7) if also have more message in master control queue after the current location of traversal, the 3rd step is just returned;
(8) increase thread and hold attribute, reduce the grade of traversal message and return second step, again traveling through master control queue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410569898.4A CN104360843A (en) | 2014-10-23 | 2014-10-23 | Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410569898.4A CN104360843A (en) | 2014-10-23 | 2014-10-23 | Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104360843A true CN104360843A (en) | 2015-02-18 |
Family
ID=52528107
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410569898.4A Pending CN104360843A (en) | 2014-10-23 | 2014-10-23 | Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104360843A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9940163B2 (en) | 2015-09-08 | 2018-04-10 | International Business Machines Corporation | Ordering repeating elements within a message |
CN113535426A (en) * | 2021-06-16 | 2021-10-22 | 福建天泉教育科技有限公司 | Message issuing optimization method and server |
CN114640638A (en) * | 2020-12-16 | 2022-06-17 | 华为技术有限公司 | Message transmission method and sending terminal equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101976062A (en) * | 2010-08-12 | 2011-02-16 | 华南理工大学 | Open type control method based on lightweight service-oriented architectures (LSOA) framework |
CN102340495A (en) * | 2010-07-26 | 2012-02-01 | 中国移动通信集团广东有限公司 | Event center supporting cross-system service linkage and event processing method of event center |
CN102497419A (en) * | 2011-12-09 | 2012-06-13 | 电子科技大学 | ESB (Enterprise Service Bus) task scheduling method orienting to large-scale requests and scheduling system |
WO2014036715A1 (en) * | 2012-09-07 | 2014-03-13 | 运软网络科技(上海)有限公司 | System and method for controlling real-time resource supply process based on delivery point |
US20140189638A1 (en) * | 2009-07-01 | 2014-07-03 | International Business Machines Corporation | Generating a service component architecture (sca) module with service oriented architecture (soa) model elements |
-
2014
- 2014-10-23 CN CN201410569898.4A patent/CN104360843A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140189638A1 (en) * | 2009-07-01 | 2014-07-03 | International Business Machines Corporation | Generating a service component architecture (sca) module with service oriented architecture (soa) model elements |
CN102340495A (en) * | 2010-07-26 | 2012-02-01 | 中国移动通信集团广东有限公司 | Event center supporting cross-system service linkage and event processing method of event center |
CN101976062A (en) * | 2010-08-12 | 2011-02-16 | 华南理工大学 | Open type control method based on lightweight service-oriented architectures (LSOA) framework |
CN102497419A (en) * | 2011-12-09 | 2012-06-13 | 电子科技大学 | ESB (Enterprise Service Bus) task scheduling method orienting to large-scale requests and scheduling system |
WO2014036715A1 (en) * | 2012-09-07 | 2014-03-13 | 运软网络科技(上海)有限公司 | System and method for controlling real-time resource supply process based on delivery point |
Non-Patent Citations (2)
Title |
---|
QIMING TIAN ET AL: "《2009 IEEE International Conference on Web Services》", 31 December 2009, IEEE * |
汤子丹等: "《计算机操作系统(第三版)》", 31 May 2007 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9940163B2 (en) | 2015-09-08 | 2018-04-10 | International Business Machines Corporation | Ordering repeating elements within a message |
CN114640638A (en) * | 2020-12-16 | 2022-06-17 | 华为技术有限公司 | Message transmission method and sending terminal equipment |
CN114640638B (en) * | 2020-12-16 | 2024-05-14 | 华为技术有限公司 | Message transmission method and transmitting terminal equipment |
CN113535426A (en) * | 2021-06-16 | 2021-10-22 | 福建天泉教育科技有限公司 | Message issuing optimization method and server |
CN113535426B (en) * | 2021-06-16 | 2023-11-03 | 福建天泉教育科技有限公司 | Message issuing optimization method and server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107959636B (en) | Method and device for sending BGP (Border gateway protocol) message | |
EP3076596B1 (en) | System and method for network bandwidth, buffers and timing management using hybrid scheduling of traffic with different priorities and guarantees | |
US9769075B2 (en) | Interference cognizant network scheduling | |
US8705363B2 (en) | Packet scheduling method and apparatus | |
US8489722B2 (en) | System and method for providing quality of service in wide area messaging fabric | |
EP3076620B1 (en) | Scheduling of different traffic classes | |
Li et al. | An enhanced reconfiguration for deterministic transmission in time-triggered networks | |
CN111512602B (en) | Method, equipment and system for sending message | |
CN110493145A (en) | A kind of caching method and device | |
CN101471854A (en) | Method and device for forwarding message | |
CN106713378B (en) | Method and system for providing service by multiple application servers | |
WO2015131744A1 (en) | Network device alarm reporting method and network device | |
WO2024104284A1 (en) | Nwdaf-based management and decision-making method for computing resources | |
CN104360843A (en) | Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system | |
CN100466593C (en) | Method of implementing integrated queue scheduling for supporting multi service | |
CN105700940A (en) | Scheduler and dynamic multiplexing method thereof | |
CN103312628B (en) | The dispatching method and device of aggregated links in a kind of packet network | |
JP5673057B2 (en) | Congestion control program, information processing apparatus, and congestion control method | |
Qian et al. | Hybrid edf packet scheduling for real-time distributed systems | |
WO2016170559A1 (en) | Method and system for bandwidth reservation for multiple tree based traffic engineering in content centric networks | |
CN101902405A (en) | Emergency service-oriented temporary bandwidth allocation method and system thereof | |
JP2009159341A (en) | Data distribution system | |
CN103888366A (en) | Real-time enterprise service bus system | |
Vutukury et al. | A multipath framework architecture for integrated services | |
Subedi et al. | SDN‐based fault‐tolerant on‐demand and in‐advance bandwidth reservation in data center interconnects |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150218 |