WO2020067872A1 - A method of prioritizing message handling in a publisher/subscriber broker - Google Patents
A method of prioritizing message handling in a publisher/subscriber broker Download PDFInfo
- Publication number
- WO2020067872A1 WO2020067872A1 PCT/MY2019/050066 MY2019050066W WO2020067872A1 WO 2020067872 A1 WO2020067872 A1 WO 2020067872A1 MY 2019050066 W MY2019050066 W MY 2019050066W WO 2020067872 A1 WO2020067872 A1 WO 2020067872A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- priority
- queue
- messages
- pub
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
Definitions
- the invention relates to a method of prioritizing message handling in a publisher/subscriber, pub/sub broker from publisher to subscriber on an asynchronous messaging platform.
- an aim of the invention is to provide a method and system for efficiently dealing with any changes of priority of the messages within the pub/sub broker.
- a method of prioritizing message handling in a publisher/subscriber, pub/sub broker including the steps of retrieving a message from an incoming interface of the pub/sub broker and validating the message against configured rules, placing into one of a plurality of queues depending on a priority of the message, each queue having a different priority; sending out the message to an outgoing interface of the pub/sub broker, characterized in that if no pre-assigned priority is found for the message during validation, the message is iterated through configured rules until the message is matched to conditions of a first matching rule out of a list ordered according to rule salience and the message is placed into a queue based on the priority determined by the first matching rule; and the message is dispatched to the outgoing interface from the highest priority queue, (i) in message arriving order at the outgoing interface; or (ii) based on predetermined conditions, wherein the message in the queue is optionally reprioritized to a different queue based on the predetermined conditions
- priority of the message would be set to a default priority. If the retrieved message contains a pre assigned priority, 1 to n, and a pass through configuration is set the message is inserted into tail of an assigned priority queue together with a timestamp if the priority queue is not at full capacity. Typically, if the assigned priority queue is full, Queue Full Handling Configuration is checked for circular, block or discard instructions.
- dispatching the message from the queue to the outgoing interface is done based on First in First Out, FIFO mechanism where messages in lower priority queues are dispatched once higher priority queues are drained.
- dispatching the message from the queue to the outgoing interface is done based on Round Robin mechanism by using two service windows, Priority Service Window and Starvation Service Window.
- a ratio of time slice in each service window is configurable based on a set of rules, Dispatch Scheduling Configuration, wherein the method switches between Priority Service Window and Starvation Service Window based on the ratio of time slice, in a repetitive cycle under Round Robin mechanism.
- the messages in lower priority queues would be handled using Round Robin mechanism when Starvation Service Window is in effect.
- the lower priority queues are checked for messages if no pre-empt function is configured during Starvation Service Window and reverts to FIFO if no messages are found.
- each message queue is serviced in accordance to a Starvation Queue Weightage during the Starvation Service Window.
- a pre-empt function is triggered if one of the following predetermined conditions is met: when average waiting time of messages to be dispatched exceeds a predetermined waiting duration, when average service time of messages in a priority queue exceeds a predetermined service duration or when average number of dispatched messages exceed a predetermined load average.
- a prioritized message handling system in a publisher/subscriber, pub/sub broker includes a listener for handling one or a plurality of priority queues for containing messages, wherein initial settings thereof being defined by a configuration profile, a moderator assigns priority to the messages, and schedules dispatch of messages from the queues, based on the settings of the configuration profile, wherein the moderator groups a plurality of incoming messages into priority queues based on the settings from the configuration profile at a pub/sub incoming broker interface, a promoter moves stale messages from the priority queues and promotes other messages based on the configuration profile, such that the stale messages are either serviced or optionally reprioritized to a different queue based on predetermined conditions.
- the listener loads the configuration profile and sends the settings and any updates to the moderator and the promoter.
- the configuration profile contains settings, parameters and rules for execution of the moderator and promoter.
- the moderator inspects incoming messages for pre-assigned priority and pass through configuration and performs rule validation if no pre-assigned priority is found or pass through configuration is not set.
- the moderator performs rule validation in a particular order and assigns a message with priority based on a matched rule.
- the promoter checks a message timestamp against a pre-set deadline, escalates message priority to next level if the deadline is exceeded and space is available in next higher priority queue.
- the promoter instructs the moderator to serve a particular priority queue when pre-empted.
- the moderator serves the pre-empted priority queue while pre-empt is in effect and until a Starvation Service Window expires or all messages in the pre-empted priority queue have been dispatched.
- pre-empt is triggered by the promoter at the predetermined conditions of average waiting time of messages to be dispatched exceeds a predetermined waiting duration, when average service time of messages in a priority queue exceeds a predetermined service duration or when average number of dispatched messages exceeds a predetermined load average.
- Figure 1 illustrates a main block diagram of a prioritized message handling system in a publisher/subscriber, pub/sub broker.
- Figure 2 illustrates a block diagram showing a method of prioritizing message handling in a pub/sub broker.
- Figure 3 illustrates a flow chart showing detailed steps of an incoming inspection process in a moderator.
- Figure 4 illustrates a flow chart showing detailed steps of an outgoing selection process in a moderator.
- Figure 5 illustrates a flow chart showing operation in a listener in the system.
- Figure 6 illustrates a flow chart showing steps of checking a message deadline in a promoter.
- Figure 7 illustrates a flow chart showing steps of pre-empt function in the promoter.
- a method of prioritizing message handling in a publisher/subscriber, pub/sub broker (100) is described herein as seen in Figure 1.
- a configuration profile (112) sends rules, parameters and settings to a listener (106) that uses this information to operate a moderator (108) and promoter (110) in order to manage priority queues (104).
- the method for each message includes the steps, of retrieving a message from an incoming interface (200) of the pub/sub broker (100) validating the message against configured rules, placing into one of a plurality of queues depending on a priority of the message, each queue having a different priority, and sending out the message to an outgoing interface (202) of the pub/sub broker (100), characterized in that if no pre-assigned priority is found for the message during validation, the message is iterated through configured rules until the message is matched to conditions of a first matching rule out of a list ordered according to rule salience and the message placed into a queue based on the priority determined by the first matching rule; and the message is dispatched to the outgoing interface (202) from the highest priority queue, (i) in message arriving order at the outgoing interface (202); or (ii) based on predetermined conditions.
- the message in the queue may be advantageously reprioritized to a different queue based on predetermined conditions.
- Figure 2 shows an incoming interface (200) of a pub/sub broker (100) and an outgoing interface (202) of the pub/sub broker (100).
- a message is retrieved from the pub/sub broker incoming interface (200).
- Figure 3 shows the incoming inspection process. If the retrieved message contains pre-assigned priority, 1 to n, and if a pass through configuration is set, the message is inserted into tail of an assigned priority queue (204) together with a timestamp if the priority queue (204) is not at full capacity. However, if the assigned priority queue (204) is full, Queue Full Handling Configuration is checked for rules that address this instance.
- the configuration is set as circular write, the oldest received message at head of assigned priority queue (204) will be removed and the new message is inserted into tail of assigned priority queue (204) together with timestamp. If the configuration is set at block, all new messages are blocked at arrival until the assigned priority queue (204) is no longer full or the rule configuration is changed. However, if the configuration is set at discard, all new messages will be discarded if the assigned priority queue (204) is full. If no pre-assigned priority is found in the retrieved message or if pre-assigned priority is available but pass through configuration is not set, the retrieved message is validated against configured rules. The message would be validated against defined rules by iterating the message in a particular salient order. The iteration breaks on a first matching rule wherein priority would be assigned to the message based on a matched rule. If no rules match for the message, the message priority would be set based on a default priority.
- Figure 4 shows an outgoing selection process that will be used to send out messages to the pub/sub broker outgoing interface (202).
- the method is used to check Dispatch Scheduling Configuration for preferred mechanism that has been set up by a user for dealing with priority queues based on a specified configuration in the configuration profile (112).
- One mechanism that can be used is that messages in the highest priority queue, i.e Priority Queue 1 would be dispatched from the queue in arriving order based on First in First Out, FIFO principle. Messages in the lower priority queues would only be dispatched from the queue once higher priority queues are drained.
- a serviced queue is a continually defined term as the priority queue (204) where a message that was last serviced based on FIFO occurred.
- the method performs a check from the highest to lowest priority queue (204) for the first pending message. If any message is found, the priority queue (204) where the pending message originates from is termed as serviced queue. The pending message is removed from the priority queue (204) and sent to pub/sub broker outgoing interface (202) to be further sent to subscribers.
- duration of Dispatch Scheduling is divided into cycles of two service windows, which are Priority Service Window and Starvation Service Window.
- This mechanism is used to prevent staleness of messages in lower priority queues.
- the ratio of time slice in each service window is configurable. For example, 80% of the time is used for Priority Service Window and 20% of the time for Starvation Service Window.
- This Priority Service Window and Starvation Service Window are operational configuration settings which can be set by a user in the configuration profile (112) as Dispatch Scheduling Configuration. Once this is done, the method switches between Priority Service Window and Starvation Service Window based on the ratio of time slice, in a repetitive cycle under Round Robin mechanism.
- the message dispatch handling mechanism works exactly as described for FIFO on priority queue (104, 204) as described earlier.
- the Starvation Service Window is in effect, messages in the lower priority queues compared to the currently serviced priority queue would be handled using Round Robin mechanism.
- every priority queue (204) is configured with a Starvation Queue Weightage, which defines a ratio of allocated duration of service on a particular queue during Starvation Service Window. If no pre-empt function is configured, the lower priority queues (in comparison to currently serviced priority queue) are checked for messages. If no messages are found, the mechanism reverts to FIFO.
- this pre-empted priority queue (104, 204) is served while the pre-empt is in effect and until the Starvation Service Window expires or all the messages within the pre empted priority queue (104, 204) have been dispatched.
- Pre-empt is triggered at anytime when one of the following predetermined conditions is met:
- a prioritized message handling system (102) in a publisher/subscriber, pub/sub broker (100) is described herein as seen in Figure 1.
- the system (102) includes a listener (106) for handling one or a plurality of priority queues (104, 204) for containing messages, wherein initial settings thereof being defined by a configuration profile (112), a moderator (108) assigns priority to the messages, and schedules dispatch of messages from the queues (104, 204), based on the settings of the configuration profile (1 12), wherein the moderator (108) groups a plurality of incoming messages into priority queues (104, 204) based on the settings from the configuration profile (112) at a pub/sub incoming broker interface (201) a promoter (110) moves stale messages from the priority queues (104, 204) and promotes other messages based on the configuration profile (112), such that the stale messages are either serviced or optionally reprioritized to a different queue based on predetermined conditions.
- the listener (106) loads the configuration profile (112) and sends the settings and any updates to the moderator (108) and the promoter (110) as seen in Figure 5.
- the configuration profile (112) contains settings, parameters and rules for execution of the moderator (108) and promoter (110).
- the moderator (108) inspects incoming messages for pre-assigned priority and if pass through configuration is set and performs rule validation if no pre-assigned priority is found or pass through configuration is not set. Rules are defined in a salient order. Validation against the defined rules are done in the same order. Messages coming in are then assigned with a specific priority when matched with the rules. However, if no match is found a default priority is assigned to the message.
- the moderator (108) also schedules dispatch of messages from the queues (104, 204) to subscribers using FIFO and Round Robin mechanisms on the priority queues (104, 204) as described earlier.
- the promoter (110) checks a message timestamp against a pre-set deadline, escalates message priority to next level if the deadline is exceeded and space is available in next higher priority queue as seen in Figure 6.
- the promoter prompts iteration of the messages to be done from second highest to lowest priority queue (104) in order to identify these messages by checking the timestamp against message deadline.
- the promoter (110) promotes as many messages as possible based on availability of next higher priority queue.
- the promoter (110) also instructs the moderator (108) to serve a particular priority queue (104, 204) when pre-empted. This is done while pre-empt is in effect and until a Starvation Service Window expires or all messages in the pre-empted priority queue (104, 204) have been dispatched. Pre-empt is triggered by the promoter (110) at predetermined conditions as seen in Figure 7. If pre-empt is set within the configuration profile (112) and communicated by the listener (106) to the promoter (110), the promoter (110) scans through all priority queues (104, 204) and compiles the queue statistics for average waiting time, average service time and load average. All queues that exceed the predetermined conditions of average waiting time and average service time as well as exceed defined load average are identified.
- the moderator (108) is then pre-empted with the identified priority queue (pre-empted) (104, 204) in order to meet these average time and load.
- the promoter (110) then replaces the pre-empted priority queue with the next priority queue (104, 204) which exceeds the predetermined conditions through continuous evaluation of queue statistics. Therefore, the promoter (110) is capable of clearing or ending any prior pre-empt to the moderator (108).
- the method may be implemented in publisher/subscriber broker (100) on an asynchronous messaging platform to provide for filtering functions from publisher to subscriber. This reprioritizing of messages based on a preferred sequence of priority allows the messages to be delivered to subscribers in a timely manner.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A method of prioritizing message handling in a publisher/subscriber, pub/sub broker (100) is provided, the method including the steps of retrieving a message from an incoming interface (200) of the pub/sub broker (100) validating the message against configured rules, placing into one of a plurality of queues depending on a priority of the message, each queue having a different priority and sending out the message to an outgoing interface (202) of the pub/sub broker (100), characterized in that if no pre-assigned priority is found for the message during validation, the message is iterated through configured rules until the message is matched to conditions of a first matching rule out of a list ordered according to rule salience and the message placed into a queue based on the priority determined by the first matching rule; and the message is dispatched to the outgoing interface (202) from the highest priority queue, (i) in message arriving order at the outgoing interface (202); or (ii) based on predetermined conditions, wherein a message in a queue is optionally reprioritized to a different queue based on the predetermined conditions.
Description
A METHOD OF PRIORITIZING MESSAGE HANDLING IN A PUBLISHER/SUBSCRIBER BROKER
Field of Invention
The invention relates to a method of prioritizing message handling in a publisher/subscriber, pub/sub broker from publisher to subscriber on an asynchronous messaging platform.
Background
In a publisher/subscriber, pub/sub system, publishers send messages to a message broker and subscribers register subscriptions with the broker. The broker would generally perform a filtering function to select published messages for each subscriber to receive. Generally speaking, the broker performs a“store and forward” function without much contribution to the order of the messages that are sent through to the subscriber. US2014/0324959 Al describes a time-sensitive data delivery transmitted from a server to client terminals using a separate queue for each terminal. The queue serving engine determines when to transmit messages depending on the contents of the queue, where each queue has a low priority and high priority sub-queue. Low priority messages are only transmitted when no high priority messages are pending. Lower priority messages are further divided into fragments, such that their transmission does not impede incoming higher priority messages. However, this is not an efficient manner of dealing with message queues with dynamically changing priorities.
US 2015/0120854 Al describes a subscriber based priority of messages in a publisher-subscriber domain. The messages are prioritized based on subscriber priority preferences. However, the document does not also deal with any changing priorities during message processing in the pub/sub broker.
Therefore an aim of the invention is to provide a method and system for efficiently dealing with any changes of priority of the messages within the pub/sub broker.
Summary of Invention
In an aspect of the invention, a method of prioritizing message handling in a publisher/subscriber, pub/sub broker is provided, the method including the steps of retrieving a message from an incoming interface of the pub/sub broker and validating the message against configured rules, placing into one of a plurality of queues depending on a priority of the message, each queue having a different priority; sending out the message to an outgoing interface of the pub/sub broker, characterized in that if no pre-assigned priority is found for the message during validation, the message is iterated through configured rules until the message is matched to conditions of a first matching rule out of a list ordered according to rule salience and the message is placed into a queue based on the priority determined by the first matching rule; and the message is dispatched to the outgoing interface from the highest priority queue, (i) in message arriving order at the outgoing interface; or (ii) based on predetermined conditions, wherein the message in the queue is optionally reprioritized to a different queue based on the predetermined conditions.
Typically, the method of prioritizing message handling in a pub/sub broker is performed on each message.
Typically, if no rules match a message after all rules are iterated , priority of the message would be set to a default priority. If the retrieved message contains a pre assigned priority, 1 to n, and a pass through configuration is set the message is inserted into tail of an assigned priority queue together with a timestamp if the priority queue is not at full capacity. Typically, if the assigned priority queue is full, Queue Full Handling Configuration is checked for circular, block or discard instructions.
In one embodiment, dispatching the message from the queue to the outgoing interface is done based on First in First Out, FIFO mechanism where messages in lower priority queues are dispatched once higher priority queues are drained.
In one embodiment, dispatching the message from the queue to the outgoing interface is done based on Round Robin mechanism by using two service windows, Priority Service Window and Starvation Service Window. Advantageously, a ratio of time slice in each service window is configurable based on a set of rules, Dispatch Scheduling Configuration, wherein the method switches between Priority Service Window and Starvation Service Window based on the ratio of time slice, in a repetitive cycle under Round Robin mechanism.
Typically, the messages in lower priority queues would be handled using Round Robin mechanism when Starvation Service Window is in effect. Advantageously, the lower priority queues are checked for messages if no pre-empt function is configured during Starvation Service Window and reverts to FIFO if no messages are found. Typically, each message queue is serviced in accordance to a Starvation Queue Weightage during the Starvation Service Window.
Typically, a pre-empt function is triggered if one of the following predetermined conditions is met: when average waiting time of messages to be dispatched exceeds a predetermined waiting duration, when average service time of messages in a priority queue exceeds a predetermined service duration or when average number of dispatched messages exceed a predetermined load average.
In further aspect of the invention, a prioritized message handling system in a publisher/subscriber, pub/sub broker, the system includes a listener for handling one or a plurality of priority queues for containing messages, wherein initial settings thereof being defined by a configuration profile, a moderator assigns priority to the messages, and schedules dispatch of messages from the queues, based on the settings of the configuration profile, wherein the moderator groups a plurality of incoming messages into priority queues based on the settings from the configuration profile at a pub/sub incoming broker interface, a promoter moves stale messages from the priority queues and promotes other messages based on the configuration profile, such that the stale messages are either serviced or optionally reprioritized to a different queue based on predetermined conditions.
Typically, the listener loads the configuration profile and sends the settings and any updates to the moderator and the promoter. The configuration profile contains settings, parameters and rules for execution of the moderator and promoter.
Typically, the moderator inspects incoming messages for pre-assigned priority and pass through configuration and performs rule validation if no pre-assigned priority is found or pass through configuration is not set. The moderator performs rule validation in a particular order and assigns a message with priority based on a matched rule.
Advantageously, the promoter checks a message timestamp against a pre-set deadline, escalates message priority to next level if the deadline is exceeded and space is available in next higher priority queue.
Advantageously, the promoter instructs the moderator to serve a particular priority queue when pre-empted. The moderator serves the pre-empted priority queue while pre-empt is in effect and until a Starvation Service Window expires or all messages in the pre-empted priority queue have been dispatched.
Typically, pre-empt is triggered by the promoter at the predetermined conditions of average waiting time of messages to be dispatched exceeds a predetermined waiting duration, when average service time of messages in a priority queue exceeds a
predetermined service duration or when average number of dispatched messages exceeds a predetermined load average.
Brief Description of Drawings
It will be convenient to further describe the present invention with respect to the accompanying drawings that illustrate possible arrangements of the invention. Other arrangements of the invention are possible, and consequently the particularity of the accompanying drawings is not to be understood as superseding the generality of the preceding description of the invention.
Figure 1 illustrates a main block diagram of a prioritized message handling system in a publisher/subscriber, pub/sub broker. Figure 2 illustrates a block diagram showing a method of prioritizing message handling in a pub/sub broker.
Figure 3 illustrates a flow chart showing detailed steps of an incoming inspection process in a moderator.
Figure 4 illustrates a flow chart showing detailed steps of an outgoing selection process in a moderator.
Figure 5 illustrates a flow chart showing operation in a listener in the system.
Figure 6 illustrates a flow chart showing steps of checking a message deadline in a promoter. Figure 7 illustrates a flow chart showing steps of pre-empt function in the promoter.
Detailed Description
A method of prioritizing message handling in a publisher/subscriber, pub/sub broker (100) is described herein as seen in Figure 1. A configuration profile (112) sends rules, parameters and settings to a listener (106) that uses this information to operate a moderator (108) and promoter (110) in order to manage priority queues (104). With further reference to Figure 2, the method for each message includes the steps, of retrieving a message from an incoming interface (200) of the pub/sub broker (100) validating the message against configured rules, placing into one of a plurality of queues depending on a priority of the message, each queue having a different priority, and sending out the message to an outgoing interface (202) of the pub/sub broker (100), characterized in that if no pre-assigned priority is found for the message during validation, the message is iterated through configured rules until the message is matched to conditions of a first matching rule out of a list ordered according to rule salience and the message placed into a queue based on the priority determined by the first matching rule; and the message is dispatched to the outgoing interface (202) from the highest priority queue, (i) in message arriving order at the outgoing interface (202); or (ii) based on predetermined conditions. The message in
the queue may be advantageously reprioritized to a different queue based on predetermined conditions.
Figure 2 shows an incoming interface (200) of a pub/sub broker (100) and an outgoing interface (202) of the pub/sub broker (100). At an incoming inspection stage, a message is retrieved from the pub/sub broker incoming interface (200). Figure 3 shows the incoming inspection process. If the retrieved message contains pre-assigned priority, 1 to n, and if a pass through configuration is set, the message is inserted into tail of an assigned priority queue (204) together with a timestamp if the priority queue (204) is not at full capacity. However, if the assigned priority queue (204) is full, Queue Full Handling Configuration is checked for rules that address this instance. If the configuration is set as circular write, the oldest received message at head of assigned priority queue (204) will be removed and the new message is inserted into tail of assigned priority queue (204) together with timestamp. If the configuration is set at block, all new messages are blocked at arrival until the assigned priority queue (204) is no longer full or the rule configuration is changed. However, if the configuration is set at discard, all new messages will be discarded if the assigned priority queue (204) is full. If no pre-assigned priority is found in the retrieved message or if pre-assigned priority is available but pass through configuration is not set, the retrieved message is validated against configured rules. The message would be validated against defined rules by iterating the message in a particular salient order. The iteration breaks on a first matching rule wherein priority would be assigned to the message based on a
matched rule. If no rules match for the message, the message priority would be set based on a default priority.
Figure 4 shows an outgoing selection process that will be used to send out messages to the pub/sub broker outgoing interface (202). The method is used to check Dispatch Scheduling Configuration for preferred mechanism that has been set up by a user for dealing with priority queues based on a specified configuration in the configuration profile (112). One mechanism that can be used is that messages in the highest priority queue, i.e Priority Queue 1 would be dispatched from the queue in arriving order based on First in First Out, FIFO principle. Messages in the lower priority queues would only be dispatched from the queue once higher priority queues are drained. A serviced queue is a continually defined term as the priority queue (204) where a message that was last serviced based on FIFO occurred. In order to ensure that the highest priority message is dispatched first, the method performs a check from the highest to lowest priority queue (204) for the first pending message. If any message is found, the priority queue (204) where the pending message originates from is termed as serviced queue. The pending message is removed from the priority queue (204) and sent to pub/sub broker outgoing interface (202) to be further sent to subscribers.
Throughout the continual operation of Dispatch Scheduling, there are 2 modes of operation which are (i) FIFO on priority queue (as described earlier), or (ii) Round
Robin on priority queues (104, 204). In the case where FIFO mode is set in the configuration profile (112), the FIFO mechanism is continuously used.
If Round Robin is set in the configuration profile (112), then duration of Dispatch Scheduling is divided into cycles of two service windows, which are Priority Service Window and Starvation Service Window. This mechanism is used to prevent staleness of messages in lower priority queues. The ratio of time slice in each service window is configurable. For example, 80% of the time is used for Priority Service Window and 20% of the time for Starvation Service Window. This Priority Service Window and Starvation Service Window are operational configuration settings which can be set by a user in the configuration profile (112) as Dispatch Scheduling Configuration. Once this is done, the method switches between Priority Service Window and Starvation Service Window based on the ratio of time slice, in a repetitive cycle under Round Robin mechanism.
When the Priority Service Window is in effect, the message dispatch handling mechanism works exactly as described for FIFO on priority queue (104, 204) as described earlier. When the Starvation Service Window is in effect, messages in the lower priority queues compared to the currently serviced priority queue would be handled using Round Robin mechanism. In order to execute the Round Robin mechanism, every priority queue (204) is configured with a Starvation Queue Weightage, which defines a ratio of allocated duration of service on a particular queue during Starvation
Service Window. If no pre-empt function is configured, the lower priority queues (in comparison to currently serviced priority queue) are checked for messages. If no messages are found, the mechanism reverts to FIFO. However, if any message is found in these lower priority queues, this message is serviced in accordance to the Starvation Queue Weightage that has been configured, wherein the message is removed from the priority queue (204) and sent to the pub/sub broker outgoing interface (202). All lower priority queues than the current serviced queue must be served according to the weighted duration until the Starvation Service Window expires or a pre-empt event is triggered.
In the event that a particular priority queue (104, 204) is tagged as a pre-empt, this pre-empted priority queue (104, 204) is served while the pre-empt is in effect and until the Starvation Service Window expires or all the messages within the pre empted priority queue (104, 204) have been dispatched. Pre-empt is triggered at anytime when one of the following predetermined conditions is met:
i. If average time of messages pending dispatch to the pub/sub broker outgoing interface (202) has exceeded a predetermined waiting duration and have become stale;
ii. If average service time of messages spent in each priority queue (104, 204) have exceeded a predetermined service duration; or
iii. If the average number of dispatched messages of each priority queue (104, 204) exceeds a predetermined load average over a fixed duration.
This is to ensure that no messages become stale due to a lengthy waiting or service time or if insufficient messages are being dispatched through over a fixed duration.
While pre-empt is still in effect, and the messages in the pre-empted priority queue (104, 204) have been serviced and sent to the pub/sub broker outgoing interface (202), the method reverts to checking if there are any messages in lower priority queues in the Starvation Service Window. Similarly, these messages are serviced and sent to the pub/sub broker outgoing interface (202) until there are no more messages to be serviced.
A prioritized message handling system (102) in a publisher/subscriber, pub/sub broker (100) is described herein as seen in Figure 1. The system (102) includes a listener (106) for handling one or a plurality of priority queues (104, 204) for containing messages, wherein initial settings thereof being defined by a configuration profile (112), a moderator (108) assigns priority to the messages, and schedules dispatch of messages from the queues (104, 204), based on the settings of the configuration profile (1 12), wherein the moderator (108) groups a plurality of incoming messages into priority queues (104, 204) based on the settings from the configuration profile (112) at a pub/sub incoming broker interface (201) a promoter (110) moves stale messages from the priority queues (104, 204) and promotes other messages based on the configuration profile (112), such that the stale messages are either serviced or optionally reprioritized to a different queue based on predetermined conditions.
The listener (106) loads the configuration profile (112) and sends the settings and any updates to the moderator (108) and the promoter (110) as seen in Figure 5. The
configuration profile (112) contains settings, parameters and rules for execution of the moderator (108) and promoter (110).
The moderator (108) inspects incoming messages for pre-assigned priority and if pass through configuration is set and performs rule validation if no pre-assigned priority is found or pass through configuration is not set. Rules are defined in a salient order. Validation against the defined rules are done in the same order. Messages coming in are then assigned with a specific priority when matched with the rules. However, if no match is found a default priority is assigned to the message. The moderator (108) also schedules dispatch of messages from the queues (104, 204) to subscribers using FIFO and Round Robin mechanisms on the priority queues (104, 204) as described earlier.
The promoter (110) checks a message timestamp against a pre-set deadline, escalates message priority to next level if the deadline is exceeded and space is available in next higher priority queue as seen in Figure 6. The promoter prompts iteration of the messages to be done from second highest to lowest priority queue (104) in order to identify these messages by checking the timestamp against message deadline. The promoter (110) promotes as many messages as possible based on availability of next higher priority queue.
The promoter (110) also instructs the moderator (108) to serve a particular priority queue (104, 204) when pre-empted. This is done while pre-empt is in effect and until a Starvation Service Window expires or all messages in the pre-empted priority
queue (104, 204) have been dispatched. Pre-empt is triggered by the promoter (110) at predetermined conditions as seen in Figure 7. If pre-empt is set within the configuration profile (112) and communicated by the listener (106) to the promoter (110), the promoter (110) scans through all priority queues (104, 204) and compiles the queue statistics for average waiting time, average service time and load average. All queues that exceed the predetermined conditions of average waiting time and average service time as well as exceed defined load average are identified. The moderator (108) is then pre-empted with the identified priority queue (pre-empted) (104, 204) in order to meet these average time and load. The promoter (110) then replaces the pre-empted priority queue with the next priority queue (104, 204) which exceeds the predetermined conditions through continuous evaluation of queue statistics. Therefore, the promoter (110) is capable of clearing or ending any prior pre-empt to the moderator (108).
It is to be appreciated that the method may be implemented in publisher/subscriber broker (100) on an asynchronous messaging platform to provide for filtering functions from publisher to subscriber. This reprioritizing of messages based on a preferred sequence of priority allows the messages to be delivered to subscribers in a timely manner.
Claims
1. A method of prioritizing message handling in a publisher/subscriber, pub/sub broker (100), the method including the steps of:
retrieving a message from an incoming interface (200) of the pub/sub broker (100);
validating the message against configured rules,
placing into one of a plurality of queues depending on a priority of the message, each queue having a different priority;
sending out the message to an outgoing interface (202) of the pub/sub broker (100),
characterized in that if no pre-assigned priority is found for the message during validation, the message is iterated through configured rules until the message is matched to conditions of a first matching rule out of a list ordered according to rule salience and the message placed into a queue based on the priority determined by the first matching rule; and the message is dispatched to the outgoing interface (202) from the highest priority queue
(i) in message arriving order at the outgoing interface
(202); or
(ii) based on predetermined conditions
wherein the message in the queue is optionally reprioritized to a different queue based on the predetermined conditions.
2. The method as claimed in claim 1, wherein the method is performed on each message.
3. The method as claimed in claim 1, wherein if no rules match a message after all rules are iterated, priority of the message would be set to a default priority. 4. The method as claimed in claim 1, wherein if the retrieved message contains pre-assigned priority, 1 to n, and if a pass through configuration is set, the message is inserted into tail of an assigned priority queue (104, 204) together with a timestamp if the priority queue (104, 204) is not at full capacity. 5. The method as claimed in claim 4, wherein if the assigned priority queue
(104, 204) is full, Queue Full Handling Configuration is checked for circular, block or discard instructions.
6. The method as claimed in claim 1, wherein dispatching the message from the queue to the outgoing interface (202) is done based on First In First Out,
FIFO mechanism where messages in lower priority queues are dispatched once higher priority queues are drained.
7. The method as claimed in claim 1, wherein dispatching the message from the queue to the outgoing interface (202) is done based on Round Robin mechanism by using two service windows, Priority Service Window and Starvation Service Window.
8. The method as claimed in claim 7, wherein a ratio of time slice in each service window is configurable based on a set of rules, Dispatch Scheduling Configuration, wherein the method switches between Priority Service Window and Starvation Service Window based on the ratio of time slice, in a repetitive cycle under Round Robin mechanism.
9. The method as claimed in claim 7, wherein the messages in lower priority queues would be handled using Round Robin mechanism when Starvation Service Window is in effect.
10. The method as claimed in claim 7, wherein the lower priority queues are checked for messages if no pre-empt function is configured during Starvation Service Window and reverts to FIFO if no messages are found.
11. The method as claimed in claim 7, wherein each message queue is serviced in accordance to a Starvation Queue Weightage during the Starvation Service
Window.
12. The method as claimed in claim 7, wherein a pre-empt function is triggered if one of the following predetermined conditions is met :
when average waiting time of messages to be dispatched exceeds a predetermined waiting duration, when average service time of messages in a priority queue exceeds a predetermined service duration or when average number of dispatched messages exceed a predetermined load average.
13. A prioritized message handling system (102) in a publisher/subscriber, pub/sub broker (100), characterized in that, the system (102) includes:
a listener (106) for handling one or a plurality of priority queues (104, 204) for containing messages, wherein initial settings thereof being defined by a configuration profile (112); and a moderator (108) assigns priority to the messages, and schedules dispatch of messages from the priority queues (104, 204), based on the settings of the configuration profile (112), wherein the moderator (108) groups a plurality of incoming messages into the priority queues (104, 204) based on the settings from the configuration profile (112) at a pub/sub incoming broker interface (201); and a promoter (110) moves stale messages from the priority queues (104, 204) and promotes other messages based on the configuration profile (112), such that the stale messages are either serviced or optionally reprioritized to a different queue based on predetermined conditions.
14. The system (102) as claimed in claim 13, wherein the moderator (108) inspects incoming messages for pre-assigned priority and pass through configuration and performs rule validation if no pre-assigned priority is found or pass through configuration is not set, and further performs the rule validation in a particular order and assigns a message with priority based on a matched rule.
15. The system (102) as claimed in claim 13, wherein the promoter (110) checks a message timestamp against a pre-set deadline, escalates message priority to next level if the deadline is exceeded and space is available in next higher priority queue.
16. The system (102) as claimed in claim 12, wherein the promoter (110) instructs the moderator (108) to serve a particular priority queue (104, 204) when pre-empted and the moderator (108) serves the pre-empted priority queue (104, 204) while pre-empt is in effect and until a Starvation Service Window expires or all messages in the pre-empted priority queue (104, 204) have been dispatched.
17. The system (102) as claimed in claim 16, wherein pre-empt is triggered by the promoter (110) at the predetermined conditions of average waiting time of messages to be dispatched exceeds a predetermined waiting duration, when
average service time of messages in a priority queue exceeds a predetermined service duration or when average number of dispatched messages exceeds a predetermined load average.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
MYPI2018001660 | 2018-09-28 | ||
MYPI2018001660 | 2018-09-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020067872A1 true WO2020067872A1 (en) | 2020-04-02 |
Family
ID=69949478
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/MY2019/050066 WO2020067872A1 (en) | 2018-09-28 | 2019-09-25 | A method of prioritizing message handling in a publisher/subscriber broker |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2020067872A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115514616A (en) * | 2022-07-12 | 2022-12-23 | 北方信息控制研究院集团有限公司 | Integrated interconnection reliable transmission method between remote test training simulation systems |
CN115665238A (en) * | 2022-09-21 | 2023-01-31 | 深圳市米糠云科技有限公司 | Method and system for processing data publishing and subscribing of call center |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6108307A (en) * | 1997-12-12 | 2000-08-22 | Newbridge Networks Corporation | Frame relay priority queses to offer multiple service classes |
US6205150B1 (en) * | 1998-05-28 | 2001-03-20 | 3Com Corporation | Method of scheduling higher and lower priority data packets |
US20050089053A1 (en) * | 2003-10-23 | 2005-04-28 | Telefonaktiebolaget L M Ericsson (Publ) | Virtual queuing support system and method |
KR20100038191A (en) * | 2007-07-13 | 2010-04-13 | 인터내셔널 비지네스 머신즈 코포레이션 | Enhancement of end-to-end network qos |
JP2014187421A (en) * | 2013-03-21 | 2014-10-02 | Fujitsu Ltd | Communication device and packet scheduling method |
-
2019
- 2019-09-25 WO PCT/MY2019/050066 patent/WO2020067872A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6108307A (en) * | 1997-12-12 | 2000-08-22 | Newbridge Networks Corporation | Frame relay priority queses to offer multiple service classes |
US6205150B1 (en) * | 1998-05-28 | 2001-03-20 | 3Com Corporation | Method of scheduling higher and lower priority data packets |
US20050089053A1 (en) * | 2003-10-23 | 2005-04-28 | Telefonaktiebolaget L M Ericsson (Publ) | Virtual queuing support system and method |
KR20100038191A (en) * | 2007-07-13 | 2010-04-13 | 인터내셔널 비지네스 머신즈 코포레이션 | Enhancement of end-to-end network qos |
JP2014187421A (en) * | 2013-03-21 | 2014-10-02 | Fujitsu Ltd | Communication device and packet scheduling method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115514616A (en) * | 2022-07-12 | 2022-12-23 | 北方信息控制研究院集团有限公司 | Integrated interconnection reliable transmission method between remote test training simulation systems |
CN115514616B (en) * | 2022-07-12 | 2023-08-22 | 北方信息控制研究院集团有限公司 | Integrated interconnection reliable transmission method between remote test training simulation systems |
CN115665238A (en) * | 2022-09-21 | 2023-01-31 | 深圳市米糠云科技有限公司 | Method and system for processing data publishing and subscribing of call center |
CN115665238B (en) * | 2022-09-21 | 2023-09-08 | 深圳市米糠云科技有限公司 | Method and system for processing call center data publish and subscribe |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7519067B2 (en) | Method, system, and computer product for controlling input message priority | |
Hamdaoui et al. | A dynamic priority assignment technique for streams with (m, k)-firm deadlines | |
US7155716B2 (en) | Weighted and prioritized task scheduler | |
US7559062B2 (en) | Intelligent scheduler for multi-level exhaustive scheduling | |
US20060029079A1 (en) | Pipeline scheduler including a hierarchy of schedulers and multiple scheduling lanes | |
US20090207846A1 (en) | Propagation of minimum guaranteed scheduling rates among scheduling layers in a hierarchical schedule | |
US20060291495A1 (en) | Hardware self-sorting scheduling queue | |
US7756977B2 (en) | Random early detect and differential packet aging flow control in switch queues | |
EP2783490A1 (en) | Time-sensitive data delivery | |
US9667561B2 (en) | Packet output controller and method for dequeuing multiple packets from one scheduled output queue and/or using over-scheduling to schedule output queues | |
CN113312160B (en) | Method and system for behavior pairing in a task allocation system | |
EP2437166A1 (en) | Method and device for scheduling queues based on chained list | |
WO2006091175A1 (en) | Method and apparatus for buffer management in shared memory packet processors | |
WO2020067872A1 (en) | A method of prioritizing message handling in a publisher/subscriber broker | |
CN112395067A (en) | Task scheduling method, system, device and medium | |
RU2641250C2 (en) | Device and method of queue management | |
EP1638273B1 (en) | Scheduling using quantum and deficit values | |
US7330477B2 (en) | Method and apparatus for starvation-free scheduling of communications | |
CN113835611A (en) | Storage scheduling method, device and storage medium | |
CN111638986A (en) | QoS queue scheduling method, device, system and readable storage medium | |
US8233391B2 (en) | System, method and computer program product for transmitting data entities | |
US8612647B2 (en) | Priority aware queue | |
WO2020090132A1 (en) | Resource allocation method and resource allocation system | |
CA2575814C (en) | Propagation of minimum guaranteed scheduling rates | |
CN115250440B (en) | Short message queue structure, short message queue scheduling method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19865394 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19865394 Country of ref document: EP Kind code of ref document: A1 |