# US 11,115,365 B1 · Messaging overflow service

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,115,365 B1
- Document ID: US11115365B1
- Status: Granted
- Kind: B1
- Application number: 15/662,069
- Filed: 2017-07-27
- Granted: 2021-09-07
- Earliest claimed: 2017-07-27
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Srinivasan Dwarakanathan
- Web page: https://patentgrep.com/patent/US11115365B1

## CPC

- H04L 51/42: Mailbox-related aspects, e.g. synchronisation of mailboxes
- H04L 41/0895: Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
- H04L 43/0852: Delays
- H04L 67/535: {Tracking the activity of the user (network monitoring arrangements H04L43/00; recording of computer activity G06F11/34)}
- H04L 67/562: Brokering proxy services
- H04L 67/568: Storing data temporarily at an intermediate stage, e.g. caching
- H04L 41/0803: Configuration setting
- H04L 43/16: Threshold monitoring
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A technology is provided for reducing latency in a messaging system. Unprocessed messages in a message queue are consumed via a messaging overflow service launched in response to an alarm triggered by a monitoring service that indicates the message queue has reached a predetermined threshold. The unprocessed messages are processed via the messaging overflow service to generate a processed data store values. The processed data store values are stored in a cache associated with the messaging overflow service.

## Claims

### Claim 1

A non-transitory machine readable storage medium having instructions embodied thereon, the instructions when executed cause a processor to perform processing, comprising:
consuming unprocessed messages pending in a message queue using a messaging overflow service launched in response to an alarm triggered by a monitoring service that indicates the message queue has filled to a predetermined threshold, wherein a message handler associated with the message queue processes a first set of messages from the message queue, in parallel to the messaging overflow service, and stores a first set of processed data store values associated with the first set of messages processed by the message handler to a data store;
processing, by the messaging overflow service, a second set of messages from the unprocessed messages, in parallel to the first set of messages being processed by the message handler, to generate a second set of processed data store values;
storing the second set of processed data store values in a cache associated with the messaging overflow service;
enabling the first set of processed data store values and the second set of processed data store values to be available for delivery to a client;
causing a query process making a query request to the data store to check both the data store and the cache associated with the messaging overflow service for the processed data store values; and
the message queue receiving subsequent messages after the messaging overflow service is launched;
wherein the subsequent messages are processed by the message handler associated with the message queue in parallel to the processing of the unprocessed messages using the messaging overflow service.

### Claim 2 (depends on 1)

The non-transitory machine readable storage medium of claim 1, further comprising:
instructing a data store to set an overflow configuration flag associated with the message queue to instruct the query process making the query request to the data store to check both the data store and the cache associated with the messaging overflow service for the processed data store values;
updating the data store with the second set of processed data store values from the cache;
removing the overflow configuration flag; and
shutting down the messaging overflow service.

### Claim 3 (depends on 1)

The non-transitory machine readable storage medium of claim 1, wherein the messaging overflow service is launched in response to the message queue experiencing latency.

### Claim 4

A method, under the control of at least one processor, comprising:
consuming unprocessed messages from a message queue using a messaging overflow service launched in response to an alarm triggered by a monitoring service that indicates the message queue has reached a predetermined threshold, wherein a message handler associated with the message queue processes a first set of messages from the message queue, in parallel to the messaging overflow service, and stores a first set of data store values associated with the first set of messages processed by the message handler to a data store;
processing, by the messaging overflow service, a second set of messages from the unprocessed messages, in parallel to the first set of messages being processed by the message handler, to generate a second set of processed data store values, using the at least one processor;
storing the second set of processed data store values in a cache associated with the messaging overflow service;
enabling the first processed data store values and the second set of processed data store values to be available for delivery to a client; and
the message queue receiving subsequent messages after the messaging overflow service is launched;
wherein the subsequent messages are processed by the message handler associated with the message queue in parallel to the processing of the unprocessed messages using the messaging overflow service.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
requesting activation of an overflow configuration flag in a data store associated with the message queue to instruct a query process making a query request to the data store to check the data store and the cache associated with the messaging overflow service for the processed data store values.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
updating a data store associated with the message queue with the second set of processed data store values from the cache; and
clearing an overflow configuration flag in the data store.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
shutting down the messaging overflow service after the data store has been updated and the overflow configuration flag is cleared.

### Claim 8 (depends on 4)

The method of claim 4, wherein the predetermined threshold is a predefined number of the unprocessed messages.

### Claim 9 (depends on 4)

The method of claim 4, wherein the predetermined threshold is a predefined total payload size of all of the unprocessed messages combined.

### Claim 10 (depends on 4)

The method of claim 4, wherein the predetermined threshold is reached when the unprocessed messages in the message queue are not processed for a predefined period of time.

### Claim 11 (depends on 4)

The method of claim 4, wherein the predetermined threshold is reached when a data store associated with the message queue is experiencing latency.

### Claim 12 (depends on 4)

The method of claim 4, wherein the messaging overflow service is configured to launch on a compute service and is a segment of program code that is capable of receiving parameters and performing processing, and the messaging overflow service is terminated at a computing instance once the messaging overflow service completes processing of the unprocessed messages.

### Claim 13 (depends on 4)

The method of claim 4, wherein the messaging overflow service is shut down in response to a notification from the monitoring service that subsequent messages received in the message queue are below the predetermined threshold after the messaging overflow service consumes the unprocessed messages.

### Claim 14 (depends on 4)

The method of claim 4, wherein the message queue is part of a distributed message queuing service or is part of a message service based on a publish-subscribe model.

### Claim 15

A system for message processing, comprising:
a messaging overflow service comprising:
at least one processor; and
a memory device including instructions to be executed by the at least one processor in order to:
launch the messaging overflow service and consume unprocessed messages pending in a message queue in response to an alarm triggered by a monitoring service that indicates the message queue has reached a predetermined threshold, wherein a message handler associated with the message queue processes a first set of messages from the message queue, in parallel to the messaging overflow service, and stores a first set of data store values associated with the first set of messages processed by the message handler to a data store;
process, by the messaging overflow service using the at least one processor, a second set of messages from the unprocessed messages, in parallel to the first set of messages being processed by the message handler, to generate a second set of processed data store values;
store the second set of processed data store values in a cache associated with the messaging overflow service;
enable the first processed data store values and the second set of processed data store values to be available for delivery to a client; and
receive, by the message queue, subsequent messages after the messaging overflow service is launched;
wherein the subsequent messages are processed by the message handler associated with the message queue in parallel to the processing of the unprocessed messages using the messaging overflow service.

### Claim 16 (depends on 15)

The system of claim 15, the instructions further configured to:
set an overflow configuration flag in a data store associated with the message queue to instruct a query process making a query request to the data store to check both the data store and the cache associated with the messaging overflow service for the processed data store values.

### Claim 17 (depends on 15)

The system of claim 15, the instructions further comprising:
update a data store associated with the message queue with the second set of processed data store values from the cache; and
clear an overflow configuration flag in the data store.

### Claim 18 (depends on 15)

The system of claim 15, wherein the predetermined threshold is a predefined number of the unprocessed messages.

### Claim 19 (depends on 15)

The system of claim 15, wherein the predetermined threshold is a predefined total payload size of all of the unprocessed messages combined.

### Claim 20 (depends on 15)

The system of claim 15, wherein the predetermined threshold is reached when the unprocessed messages in the message queue are not processed for a predefined period of time.
