Claims
- 1. A method of managing retrieval of messages from a queue, each message on the queue having been sent by a sender application program, the method comprising:
assigning an index key to a message 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 in response to a receiver application program requesting retrieval of messages from the queue and specifying the attribute value, 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 committed messages having the particular application-specified attribute value.
- 2. A method according to claim 1, including:
in response to the monitoring step identifying the availability of a committed message in the queue which has the assigned index key, determining whether the message matches other criteria of the retrieval request; and in response to a positive match, sending a response to the application program which issued the request.
- 3. A method according to claim 2, wherein the response includes the message which matches the request.
- 4. A method according to claim 1, wherein the attribute value included in the assigned index keyis a message identifier or a correlation identifier.
- 5. A method according to claim 1, wherein receiver application programs are able to issue retrieval requests with a wait attribute, and wherein the method includes:
responsive to no messages which match the request being available in the queue when the request is issued, triggering a monitoring process to perform the monitoring step; and responsive to the monitoring step identifying the availability of a committed message in the queue having said assigned index key, determining whether the message matches a waiting retrieval request and, if matching, sending a response to the application program which issued the request.
- 6. A method according to claim 1, wherein the queue is a shared access queue held in a list structure of a Coupling Facility to which a plurality of resource managers can connect to put messages on the queue and to retrieve messages from the queue on behalf of respective sender and receiver application programs.
- 7. A method according to claim 6, wherein the step of assigning an index key at commit time comprises a resource manager which put the message on the shared queue providing the attribute value to the Coupling Facility in response to committing the put operation, the Coupling Facility then building the index key and storing it in association with the enqueued message.
- 8. A method according to claim 6, wherein the assigned index value for each message is held in a predefined control data area of the Coupling Facility list structure which holds the queue.
- 9. A method according to claim 8, wherein the predefined control data area of the Coupling Facility list structure is a Coupling Facility list entry control data area, and the predefined control data area holds a message identifier and a correlation identifier for the message, the assigned index key comprising one of said message identifier or correlation identifier.
- 10. A method according to claim 6, wherein the monitoring step is performed by a monitoring process within the Coupling Facility in response to receipt of a retrieval request which specifies said attribute value, the monitoring process including:
means for determining whether an identified available message matches all criteria of the received retrieval request; and means, responsive to a positive match, for sending a response to the application program which issued the request.
- 11. A method according to claim 10, wherein the monitoring process is adapted to invoke said means for determining a match for all identified messages in said queue which have said assigned index value corresponding to the application-specified attribute value.
- 12. A method according to claim 1, wherein the assigned key comprises a secondary index key representing a sender-application-assigned attribute and can be used to identify messages in response to a retrieval request which specifies said attribute, and an additional primary index key comprising sequencing information is assigned to a message when the message is placed on the queue; and wherein the primary index key is used to select a message for retrieval from the available messages identified in the monitoring step which used the secondary key.
- 13. 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, the program code including:
program code for assigning an index key to a message 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 program code, responsive to a receiver application program requesting retrieval of messages from the queue and specifying the 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 committed messages having the particular application-specified attribute value.
- 14. A program product according to claim 13, wherein the program code includes:
means, responsive to the monitoring step identifying the availability of a committed message in the queue which has the assigned index key, for determining whether the message matches other criteria of the retrieval request; and means, responsive to a positive match, for sending a response to the application program which issued the request.
- 15. 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 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 the 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 committed messages having the particular application-specified attribute value.
- 16. 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 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 the 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 committed messages having the particular application-specified attribute value.
- 17. A data processing apparatus according to claim 16, wherein the resource manager component includes means, responsive to the monitoring step identifying the availability of a committed message in the queue which has the assigned index key, for determining whether the message matches other criteria of the retrieval request, and the apparatus further includes means, responsive to a positive match, for sending a response to the application program which issued the request.
CROSS REFERENCES TO RELATED PATENT APPLICATIONS
[0001] This application claims priority and all other benefits under 35 U.S.C 120 of prior filed co-pending US provisional patent application U.S. Ser. No. 60/219,889, filed Jul. 21, 2000, which is incorporated herein by reference.
[0002] This application is related to the subject matter of the following co-pending patent applications, each of which is assigned to the same assignee as this application and each of which is incorporated herein by reference:
[0003] D. A. Elko et al., U.S. Ser. No. 09/677,339, filed Oct. 2, 2000, entitled “METHOD AND APPARATUS FOR PROCESSING A LIST STRUCTURE” (IBM docket POU920000043);
[0004] D. A. Elko et al, U.S. Ser. No. 09/677,341, filed Oct. 2, 2000, entitled “METHOD AND APPARATUS FOR IMPLEMENTING A SHARED MESSAGE QUEUE USING A LIST STRUCTURE” (IBM Docket POU920000042);
[0005] P. Kettley et al., U.S. Ser. No. 09/605,589, filed Jun. 28, 2000, entitled “METHOD AND APPARATUS FOR OPERATING A COMPUTER SYSTEM TO ENABLE A RESTART” (IBM docket GB920000031);
[0006] P. Kettley et al., U.S. Ser. No. 60/220,685, filed Jul. 25, 2000,, entitled “METHOD AND APPARATUS FOR IMPROVING MESSAGE AVAILABILITY IN A SUBSYSTEM WHICH SUPPORTS SHARED MESSAGE QUEUES” (IBM docket GB920000032);
Provisional Applications (1)
|
Number |
Date |
Country |
|
60219889 |
Jul 2000 |
US |