This invention relates to a messaging system and method.
It is known that in the messaging environment provided by WebSphere® MQ Messaging Software from IBM®, messages are commonly identified by a system generated Message Identifier and a user generated Correlation Identifier. Programs connecting to the messaging system are allocated a handle (e.g., ‘hConn’, a common handle to a server connection) through which they reference the messaging system and optionally a Connection Identifier that can be used by a third party to identify a specific connection. It is common for Message Identifiers and Correlation Identifiers to share the same name space, thus making it possible for the system generated Message Identifier in a request message to be copied into the Correlation Identifier of any corresponding response message. This design can present the user with the problem of generating Correlation Identifiers that are guaranteed not to clash with the system generated Message Identifiers.
From patent publication US2003/0041178A1 there is known a technique for routing messages between applications in which a message identifier and a session identifier are used. However, in this publication there is no relationship between these two identifiers.
It is relatively common for users to want to allocate a single unique identifier to correlate all messages associated with a single connection (for example so that a reply queue can be shared by multiple users), and one way to allocate such an identifier in WebSphere® MQ (formerly MQSeries™) Messaging Software from IBM® is to issue a pair of ‘MQPUT’ and ‘MQBACK’ calls, causing the system to generate a unique message identifier.
However, this approach has the disadvantage(s) that although issuing a ‘MQPUT/MQBACK’ call sequence causes the system to generate a unique message identifier, it causes the message with that identifier to never be visible outside the connection issuing the calls.
A need therefore exists for a system and method for messaging wherein the abovementioned disadvantage(s) may be alleviated.
In accordance with a first aspect of the present invention there is provided system for messaging as claimed in claim 1.
In accordance with a second aspect of the present invention there is provided system for messaging as claimed in claim 6.
One system and method for messaging incorporating the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
Referring firstly to
The MQPUT call 113 is issued only to cause the QMGR to generate a unique CorrelId identifier. This CorrelId can then be used as a unique identifier for replies destined for this session. The reply message that is addressed to the application module 110 can be got from the shared reply queue 130 using the unique ID that was sent with the message in the MQPUT call 115. It will be understood that there are two sequences of calls because the first MQPUT/MQBACK sequence 113/114 gives the unique identifier and the second MQPUT/MQGET sequence 115/116 is the actual piece of work to be achieved; the MQBACK call 114 following the MQPUT call 113 is issued only to undo the unnecessary work performed by the preceding MQPUT call 113.
Although this MQPUT/MQBACK procedure produces a unique identifier, there is no built-in way for a third party (e.g., an administrator or a ‘sysprog’ module) to correlate this identifier with the particular application instance.
Referring now to
The application module 210 sends two MQOPEN calls 212 to (and receives appropriate confirmation responses from) the QMGR module 220. The application module 210 then sends an MQPUT call 215 to the QMGR module 220; the MQPUT call 215 includes a payload (containing message data) and the MQPUT call also includes a CorrelId (which is the ConnId received from the earlier call 211 to MQCONNX) and a queue identifier B to put the data on a queue B 240. The application module 210 then receives an appropriate confirmation response from the QMGR module 220.
Referring now also to
Thus, use of this allocation scheme allows an administrator 250 to query the queue manager QMGR module 220 to track messages queued by their unique MsgId or ConnId.
Referring now also to
It will be appreciated that the unique identifier allocation scheme described above is carried out in software running on a processor in one or more computers, and that the software may be provided as a computer program element carried on any suitable data carrier (not shown) such as a magnetic or optical computer disc.
It will be understood that the unique identifier allocation scheme described above provides the advantage that a user can use a Connection Identifier as a Correlation Identifier, safe in the knowledge that it will not clash with any system generated message identifier or correlation identifier. A secondary benefit to this scheme is that if a shared reply queue suffers from a build up of messages then the Correlation Identifier in those messages can be used to identify the application expected to receive those messages.
Number | Date | Country | Kind |
---|---|---|---|
0427305.8 | Dec 2004 | GB | national |
Number | Name | Date | Kind |
---|---|---|---|
4953204 | Cuschleg et al. | Aug 1990 | A |
5734986 | Helders | Mar 1998 | A |
6058389 | Chandra et al. | May 2000 | A |
6169748 | Barbas et al. | Jan 2001 | B1 |
7493623 | Ruutu | Feb 2009 | B2 |
20030041178 | Brouk et al. | Feb 2003 | A1 |
20050080759 | Brown et al. | Apr 2005 | A1 |
Entry |
---|
Thomas R. Henderson, Host Mobility for IP Networks: A Comparision, 2003. |
Number | Date | Country | |
---|---|---|---|
20060140362 A1 | Jun 2006 | US |