IP Library Granted Patent US 7,562,365
Granted Patent B2
US 7,562,365 · App. 10/755,823 · Granted Jul 14, 2009

Random access for processing messages in a message queue

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,562,365
App. No.
10/755,823
Granted
Jul 14, 2009
Kind
B2
Abstract

Methods, systems, and products for random access for processing messages in a message queue that include creating a map relating message identification and message position, including adding an entry in the map whenever a message enters the queue; instantiating a plurality of consumers for the messages; and consuming, with the consumers, the messages in dependence upon the map. In typical embodiments, the plurality of consumers includes a particular number of consumers and such embodiments typically include assigning an ordinal value to each consumer and consuming the messages further comprises identifying the messages to be processed by each consumer in dependence upon the ordinal values, the number of consumers, and the message positions.

Claims (39)

1. A method of random access for processing messages in a message queue, the method comprising:

creating a map relating message identification and message position, including adding an entry in the map whenever a message enters the queue;

instantiating a number of consumer applications for the messages, including assigning an ordinal value to each consumer application; and

consuming, with the consumer applications, the messages in dependence upon the map, including identifying the messages to be processed by each consumer application in dependence upon the ordinal value, the number of the consumer applications, and the message position, including assigning for consumption by a consumer application a message having a message position identified by adding the ordinal value of the consumer application to the product of the number of the consumer applications multiplied by the number of messages consumed by the consumer application.

2. The method of claim 1 wherein instantiating the number of the consumer applications further comprises:

registering the consumer applications with a queue manager; and

creating a snapshot of the map when a first consumer application is registered, including moving to the snapshot all map entries in the map when the first consumer application is registered.

3. The method of claim 2 wherein instantiating the number of the consumer applications further comprises determining a number of the consumer applications in dependence upon the number of map entries in the snapshot.

4. The method of claim 1 wherein instantiating the number of the consumer applications further comprises determining a number of the consumer applications in dependence upon the number of map entries in the map.

5. The method of claim 1 further comprising:

counting messages entering the queue;

counting messages consumed by the consumer applications; and

changing the number of the consumer applications in dependence upon the number of messages consumed and the number of messages entering the queue.

6. An apparatus providing random access for processing messages in a message queue, the apparatus comprising a computer processor, a computer memory operatively coupled to the computer processor, the computer memory having disposed within it computer program instructions capable when executed of causing the apparatus to carry out the steps of:

creating a map relating message identification and message position, including adding an entry in the map whenever a message enters the queue;

instantiating a number of consumer applications for the messages, including assigning an ordinal value to each consumer application; and

consuming, with the consumer applications, the messages in dependence upon the map, including identifying the messages to be processed by each consumer application in dependence upon the ordinal value, the number of the consumer applications, and the message position, including assigning for consumption by a consumer application a message having a message position identified by adding the ordinal value of the consumer application to the product of the number of the consumer applications multiplied by the number of messages consumed by the consumer application.

7. The apparatus of claim 6 wherein instantiating the number of the consumer applications further comprises:

registering the consumer applications with a queue manager; and

creating a snapshot of the map when a first consumer application is registered, including moving to the snapshot all map entries in the map when the first consumer application is registered.

8. The apparatus of claim 7 wherein instantiating the number of the consumer applications further comprises determining a number of the consumer applications in dependence upon the number of map entries in the snapshot.

9. The apparatus of claim 6 wherein instantiating the number of the consumer applications further comprises determining a number of the consumer applications in dependence upon the number of map entries in the map.

10. The apparatus of claim 6 further comprising computer program instructions capable of causing the apparatus to carry out the steps of:

counting messages entering the queue;

counting messages consumed by the consumer applications; and

changing the number of the consumer applications in dependence upon the number of messages consumed and the number of messages entering the queue.

11. A computer program product providing random access for processing messages in a message queue, the computer program product embodied on a computer-readable recording medium, the computer program product comprising computer program instructions, which when installed and executed on automated apparatus, perform the steps of:

creating a map relating message identification and message position, including adding an entry in the map whenever a message enters the queue;

instantiating a number of consumer applications for the messages, including assigning an ordinal value to each consumer application; and

consuming, with the consumer applications, the messages in dependence upon the map, including identifying the messages to be processed by each consumer application in dependence upon the ordinal value, the number of the consumer applications, and the message position, including assigning for consumption by a consumer application a message having a message position identified by adding the ordinal value of the consumer application to the product of the number of the consumer applications multiplied by the number of messages consumed by the consumer application.

12. The computer program product of claim 11 wherein instantiating the number of the consumer applications further comprises:

registering the consumer applications with a queue manager; and

creating a snapshot of the map when a first consumer application is registered, including moving to the snapshot all map entries in the map when the first consumer application is registered.

13. The computer program product of claim 12 wherein instantiating the number of the consumer applications further comprises determining a number of the consumer applications in dependence upon the number of map entries in the snapshot.

14. The computer program product of claim 11 wherein instantiating the number of the consumer applications further comprises determining a number of the consumer applications in dependence upon the number of map entries in the map.

15. The computer program product of claim 11 further comprising computer program instructions capable of:

counting messages entering the queue;

counting messages consumed by the consumer applications; and

changing the number of the consumer applications in dependence upon the number of messages consumed and the number of messages entering the queue.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 17, 2013
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: INTELLECTUAL DISCOVERY, INC.
Reel/Frame 030628/0554 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 12, 2004
From: DINH, HUNG THE; HU, TENG S.; PHAM, PHONG ANH
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 014887/0020 →