Implementing a message queuing interface (MQI) indexed queue support that adds a key to the index on put commit
First Claim
1. A method of managing retrieval of messages from a shared queue, where a plurality of receiver applications retrieve messages from the same shared queue, where a PUT operation by a sender application is used to place a message onto the shared queue, and where a message on the queue is not to be retrieved until a subsequent commit of the PUT operation occurs, the method comprising:
- assigning an index key to a message in response to a commit of the PUT operation, wherein the assigned index key comprises an attribute value of the message which was specified by the sender application when the message was placed on the queue, so that the assignment of the index key is deferred until a commit occurs of the PUT operation; and
in response to a receiver application requesting retrieval of messages from the queue and specifying a request attribute value, monitoring the availability of messages in the queue with reference to said assigned index key to identify a match,whereby the index key being assigned to the message in response to said commit is usable for identifying committed messages having an attribute value matching the request attribute value.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided are a method, computer program product and system for providing indexed queue support for efficient retrieval of messages from a queue. An index key for expediting message retrieval is assigned to a message when the operation of placing the message on a queue is committed. The index key assigned at commit time comprises an attribute (such as a message ID or correlation ID) specified by the sending application program, which placed the message on the queue. This deferred assignment of an index key until commit time means that the index key can be used to search for messages having the particular attribute without any possibility of identifying messages for retrieval before the messages have been committed. This maintains transactional requirements of a transaction-oriented messaging system which requires a message to only be made available for retrieval by receiver application programs after the sender application'"'"'s put operation has committed.
28 Citations
14 Claims
-
1. A method of managing retrieval of messages from a shared queue, where a plurality of receiver applications retrieve messages from the same shared queue, where a PUT operation by a sender application is used to place a message onto the shared queue, and where a message on the queue is not to be retrieved until a subsequent commit of the PUT operation occurs, the method comprising:
-
assigning an index key to a message in response to a commit of the PUT operation, wherein the assigned index key comprises an attribute value of the message which was specified by the sender application when the message was placed on the queue, so that the assignment of the index key is deferred until a commit occurs of the PUT operation; and in response to a receiver application requesting retrieval of messages from the queue and specifying a request attribute value, monitoring the availability of messages in the queue with reference to said assigned index key to identify a match, whereby the index key being assigned to the message in response to said commit is usable for identifying committed messages having an attribute value matching the request attribute value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A program product comprising program code including executable program instructions recorded on a machine-readable recording medium, for controlling the performance of operations of a data processing apparatus on which it executes relating to storage and retrieval of messages on a shared queue where a PUT operation is used to place a message on the queue but access is not intended until a subsequent commit action is taken, the program code including:
-
program code for postponing the assigning an index key to a message to be in response to such commit of the PUT operation, wherein the assigned index key comprises an attribute value of the message which was specified when the message was sent; and program code, responsive to a receiver application program requesting retrieval of messages from the queue and specifying a request attribute value, for monitoring the availability of messages in the queue with reference to said assigned index key, whereby the index key assigned to the message in response to said commit provides an index which is usable for identifying only committed messages having the attribute value that matches the requested attribute value.
-
-
13. A resource manager component for a data processing apparatus, for storing messages within a queue and storing index keys in association with the enqueued messages for use in retrieval of the messages from the queue, the resource manager component including:
-
means for assigning an index key to a message after a delay to be in response to commit of the operation of putting the message on the queue, wherein the assigned index key comprises an attribute value of the message which was specified by the sending application when the message was sent; and means, responsive to a receiver application program requesting retrieval of messages from the queue and specifying a request attribute value, for monitoring the availability of messages in the queue with reference to said assigned index key, whereby the index key assigned to the message in response to said commit provides an index which is usable for identifying only committed messages having the particular the request attribute value.
-
-
14. A data processing apparatus including:
-
storage means; a data processor; a resource manager component for storing messages within a queue and storing index keys in association with the enqueued messages for use in retrieval of the messages from the queue, the resource manager component including; means for assigning an index key to a message after a delay to be in response to commit of the operation of putting the message on the queue, wherein the assigned index key comprises an attribute value of the message which was specified by the sending application when the message was sent; and means, responsive to a receiver application program requesting retrieval of messages from the queue and specifying a request attribute value, for monitoring the availability of messages in the queue with reference to said assigned index key, whereby the index key assigned to the message in response to said commit provides an index which is usable for identifying only committed messages having the request attribute value.
-
Specification