Processing

Please wait...

Settings

Settings

Goto Application

1. WO2012069356 - TRANSACTIONAL MESSAGING SUPPORT IN CONNECTED MESSAGING NETWORKS

Note: Text based on automatic Optical Character Recognition processes. Please use the PDF version for legal matters

[ EN ]

TRANSACTIONAL MESSAGING SUPPORT IN

CONNECTED MESSAGING NETWORKS

Technical Field

This invention relates to the field of connected messaging networks. In particular, the invention relates to providing transactional messaging support in connected messaging network.

Background Information

Often networks of multiple types of message engines/clients are connected together.

Different types of messaging networks may have different features. A first more feature-rich network may be connected to a second less sophisticated network. This means that an application connected to the less sophisticated network may not be able to access or use some of the functions of the more feature-rich network.

For example, using IBM® WebSphere® Message Broker V6, MQTT (MQ Telemetry Transport) clients can be connected into an MQ network (IBM and WebSphere are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide.). MQTT is a simple, lightweight protocol that can be used in devices such as mobile phones whereas MQ is a feature-rich protocol that requires more powerful computers to run on.

Sometimes, clients on one messaging network would like access to features of the other messaging network. For example, an MQTT application on a mobile phone might want to be able to put messages under syncpoint to the MQ network so that they can ensure that all the receivers of the message receive it or no receiver does.

Therefore, there is a need in the art to address the aforementioned problems.

Summary

According to a first aspect of the present invention there is provided a method for transactional messaging support in connected messaging networks with a first messaging network which does not support transactional processing and a second messaging network which does support transactional processing; the method comprising providing a proxy application between the first and second messaging networks, wherein the proxy application: receives messages from a first application on the first messaging network, the messages including instructions regarding transactional processing of the messages; and forwards the messages to the second messaging network using a transaction processing supported by the second messaging network.

According to a further aspect, the present invention provides a computer program stored on a computer readable medium and loadable into the internal memory of a digital computer, comprising software code portions, when said program is run on a computer, for performing the steps of the invention.

According to a further aspect of the present invention there is provided a system for transactional messaging support in connected messaging networks, comprising: a first messaging network which does not support transactional processing; a second messaging network which does support transactional processing; a proxy application provided between the first and second messaging networks, wherein the proxy application includes: an information reading component for receiving and reading messages from a first application on the first messaging network, the messages including instructions regarding transactional processing of the messages; a transaction processing component for forwarding the messages to the second messaging network using a transactional processing supported by the second messaging network.

According to a further aspect, the present invention provides a computer program product for transactional messaging support in connected messaging networks with a first messaging network which does not support transactional processing and a second messaging network which does support transactional processing, the computer program product comprising: a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method for performing the steps of the invention.

Brief Description of the Drawings

The present invention will now be described, by way of example only, with reference to preferred embodiments, as illustrated in the following figures:

Figure 1 is block diagram of a system in accordance with a preferred embodiment of the present invention;

Figure 2 is a block diagram of a computer in accordance with the prior art, and in which a preferred embodiment of the present invention may be implemented;

Figure 3 is a schematic diagram showing the flow of messages in accordance with a first embodiment of the present invention;

Figure 4 is a flow diagram of a method in accordance with a preferred embodiment of the present invention; and

Figure 5 is a flow diagram showing the flow of messages in accordance with a second embodiment of the present invention.

Detailed Description of the Invention

It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numbers may be repeated among the figures to indicate corresponding or analogous features.

In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, and components have not been described in detail so as not to obscure the present invention.

A method and system are described in which a proxy application on one messaging network performs transactional messaging on behalf of an application connected to a messaging network that does not support transactions. A beginning and an end of a batch of messages are exposed in a proxy transaction so that the sending application has control.

This allows applications connected to a messaging network that does not support transactions to control which operations are parts of which transaction. The operations are performed by the proxy application on a messaging network that does support transactions on behalf of the sending application. The proxy application on one messaging network receives and acts on requests from an application on the other messaging network and provides responses to the original sender detailing the success (or otherwise) of the requests.

A proxy application performs transactional messaging on behalf of an application connected to a network that does not support transactions giving the sending application control of which operations are performed as a transactional unit-of-work. In addition, the proxy application may perform one or more other functions as follows:

• The proxy application may perform publish/subscribe operations on behalf of an application on a connected point-to-point only messaging network;

• The proxy application may perform point-to-point messaging on behalf of an application on a publish/subscribe only messaging network;

• The proxy application may assemble a single large message in response to a series of message fragments sent from an application connected to a more unreliable messaging network. These fragments should also be able to include metadata such as MQ's message properties;

• The proxy application may send multicast messages on behalf of an application

connected to a network that doesn't support multicast.

Referring to Figure 1, a block diagram shows an embodiment of the described system 100. A first messaging network is provided 110 which does not support transactional processing. A second messaging network is provided 120 which does support transactional processing. The two messaging networks 110, 120 are connected, for example via a messaging broker.

A first application 111 on the first messaging network 110 produces messages to be consumed by applications 121-123 on the second messaging network 120 via a messaging engine 125.

A proxy application 130 is provided which performs transactional messaging on behalf of the first application 111 giving the first application 111 control of which operations are performed as a transactional unit-of-work. The proxy application 130 may be a stand-alone application or may be built into a messaging engine in one of the messaging networks or the gateway between the messaging networks.

The first application 111 includes an information adding component 112 for adding information to a message to instruct the proxy application 130 how to handle transactions and any other functionality to be added by the proxy application 130. The first application 111 includes a transactional processing component 113 for coordinating transactional processing to be instructed to the proxy application 130. The first application 111 also includes a function processing component 114 for coordinating additional functional processing to be instructed to the proxy application 130. The first application 111 also includes an information reading component 115 to interpret return messages from the proxy application 130.

In one embodiment, the information adding component 112 adds a header 141 to a message 140 to be sent by the first application 111. The header 141 may include a topic, a destination queue, and an identifier of a unit of work to which the message belongs.

In another embodiment, the information adding component 112 adds information in the form of the topic of the message 140.

The first application 111 requests a commit of a unit of work as instructed to the proxy application 130. The first application 111 also includes an information reading component 115 for reading the information from incoming messages from the proxy application 130.

The proxy application 130 includes a subscription mechanism 135 for subscribing to a topic on which the first application 111 publishes messages with the additional transactional processing information.

The proxy application 130 includes an information reading component 131 for reading the added information from the first application 111 relating to a message 140. In one embodiment this may read a header 141 of a message 140 received from the first application 111. In another embodiment, this may read the topic of the message 140 to obtain instructions.

The proxy application 130 includes a transaction processing component 132 for adding the transaction processing to the message 150 as forwarded to a messaging engine 125 of the second messaging network 120 for access by the second applications 121-123 of the second messaging network 120.

The proxy application 130 may also include other function processing components 133 for adding other functionality to the message 150 in response to instruction received from the first application 111. For example, other functionality may include: converting between publish/subscribe messages and point to point messages and visa versa, compiling multiple small messages in to a large messages, and converting a message to a multicast message.

Responses to the first application 111 are generated by the proxy application 130 based on the success/failure of operations the proxy application 130 carries out for the first application 111.

Responses from a second application 121-123 will flow from the second messaging network 120 to first messaging network 110 without needing the proxy application 130. When a transaction is committed, the messages are normal messages and can therefore be processed by the first application 111.

Referring to Figure 2, an exemplary system for implementing aspects of the invention includes a data processing system 200 suitable for storing and/or executing program code including at least one processor 201 coupled directly or indirectly to memory elements through a bus system 203. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.

The memory elements may include system memory 202 in the form of read only memory (ROM) 204 and random access memory (RAM) 205. A basic input/output system (BIOS) 206 may be stored in ROM 204. System software 207 may be stored in RAM 205 including operating system software 208. Software applications 210 may also be stored in RAM 205.

The system 200 may also include a primary storage means 211 such as a magnetic hard disk drive and secondary storage means 212 such as a magnetic disc drive and an optical disc drive. The drives and their associated computer-readable media provide non-volatile storage of computer-executable instructions, data structures, program modules and other data for the system 200. Software applications may be stored on the primary and secondary storage means 211, 212 as well as the system memory 202.

The computing system 200 may operate in a networked environment using logical connections to one or more remote computers via a network adapter 216.

Input/output devices 213 can be coupled to the system either directly or through intervening I/O controllers. A user may enter commands and information into the system 200 through input devices such as a keyboard, pointing device, or other input devices (for example, microphone, joy stick, game pad, satellite dish, scanner, or the like). Output devices may include speakers, printers, etc. A display device 214 is also connected to system bus 203 via an interface, such as video adapter 215.

Referring to Figure 3, a schematic diagram 300 shows an example embodiment of the message flow between a first application 111 on a first messaging network 110 which is a non-transactional processing network, and a messaging engine 125 on a second messaging network 120 which is transactional processing via a proxy application 130. The messaging engine 125 includes designation queues 340 from which one or more application 121-123 may read messages

In a transaction, either everything done in the transaction succeeds or the transaction is backed out and nothing that was part of the transaction occurred. The described method allow the first application 111 connected to the first messaging network 110 that does not support transactions to control which operations are parts of which transaction. The operations are performed by the proxy application 130 on behalf of the first application 111 on the second messaging network 120 that does support transactions.

The proxy application 130 exposes the beginning and end of a batch of messages in a proxy transaction so that the first application 111 has control.

The first application 111 may publish one or more messages 310 containing a special header 320 including a topic that the proxy application 130 subscribes 301 to. The header 320 includes a destination queue and an identifier of a unit of work (UOW) that the message 310 is part of.

The proxy application 130 receives 302 the published message 310 and reads the header 320. The proxy application 130 forwards 303 the message 310 with transactional processing according to the information from the header 320. The proxy application 130 puts the message 310 to the second messaging network 120 using whatever mechanism the second messaging network 120 uses to support transactions. The proxy application 130 puts the message in a transaction to the destination queue 340 on the second messaging network 120.

Optionally, the proxy application 130 performs the put as the user the first application 111 was authenticated as, if it has the required authority. Different users may have different authorities. If the first application 111 provides a username (and optionally some authentication information) the proxy application 130 can carry out the transaction as that user. For example, an application running as user "bob" sends a request to the proxy application 130 to publish to "/happy/christmas". The metadata might include a password. When the proxy application 130 publishes to the second messaging network 120, it authenticates as "bob" (and optionally supplies the password it was given). The success or failure will then depend on Bob's access - not that of another user.

The second application 121 sends a response message 350 which will flow from the second messaging network 120 to the first messaging network 110 without going via the proxy application 130.

The first application 111 publishes a subsequent commit message 360 asking for the transaction to the committed or backed out. The proxy application 130 determines 304 success or failure of the messages it processed on behalf of the first application 111 in a transaction and generates 305 a commit response message 370 and sends this to the first application 111.

Optionally, the proxy application 130 may have a time limit for commit or backout of the transaction.

Referring to Figure 4, a flow diagram 400 shows an embodiment of the described method as carried out by the proxy application.

The proxy application receives 401 a message from a first or producing application on a first messaging network which does not support transactional processing. The message includes instructions from the first application regarding transactional processing of the message and, optionally, additional instructions regarding functional processing of the message.

Additional functional processing may include converting between point-to-point and

publish/ subscribe messages, compiling multiple messages together, or converting to a multicast message.

The proxy application reads 402 the instructions provided in the message and forwards 403 the message with transactional processing supported by a second messaging network to which the message is to be sent. Optionally, the message is also converted 404 to add other functionality.

The proxy application returns 305 a message to the first application regarding the outcome of the message.

An example embodiment is provided between a first messaging network in the form of an MQTT network connected to an MQ network which supports a richer set of features including transactional processing. An MQ network is able to connect up to a network of intelligent but simple devices used for instrumenting pipelines, rail tracks, and other telemetry applications, which speak a much simpler MQTT protocol. An MQTT client may wish to (for example) put messages under syncpoint, add message properties to a message, and/or broadcast a message via multicast.

If the proxy application is an IBM MQ application, the MQTT client would need to route requests to the proxy application. If the proxy was part of the messaging network at the gateway between the two networks then the MQTT application could send messages directly to their final destination with the proxy application intercepting and acting on them.

Referring to Figure 5, a flow diagram 500 shows an example flow between a producing application and a proxy application. The producing application is on a messaging network which only supports publish/subscribe messaging and does not support transactional processing.

The proxy application is on a connected messaging network that supports transactional publish/subscribe messaging and point-to-point messaging. The proxy application listens 501 for commands published on the topic string: /proxy/commands/#.

The producer application needs to give the proxy application instructions about what to do with messages it is sending it. This can be achieved either by altering the topic-string it is using or by including the information is a header in the message.

The producer publishes 502 a message on /proxy/commands/producerl :

"Start a new transaction called X and as part of the transaction put a message (with message id = 1 that says "Hello" to queue "destinationqueue"".

The proxy does this and publishes 503 a message on /proxy/responses/producerl saying message id = 1 put successfully.

The producer publishes 504 a message on /proxy/commands/producerl :

"Start a new transaction called Y and as part of the transaction put a message (with message id = 2 that says "Hello" to queue "destinationqueue2"".

The proxy does this and publishes 505 a message on /proxy/responses/producerl saying message id = 2 put successfully.

The producer publishes 506 a message on /proxy/commands/producerl :

"As part of transaction X publish a message (with message id = 3) that says "Hello" to topic /happy/ Chri stmas" .

The proxy does this and publishes 507 a message on /proxy/responses/producerl saying message id = 3 published successfully.

The producer publishes 508 a message on /proxy/commands/producerl :

"Commit the transaction X".

The proxy replies 509 "transaction X committed ok".

The producer publishes 510 a message on /proxy/commands/producerl :

"As part of transaction Y publish a message (with message id = 4) that says "Hello" to topic /happy/ Christmas/ secret" .

The proxy replies 51 1 "put of message 4 failed with error:

SECURITY ERROR PUBLISH NOT ALLOWED.

The producer publishes 512 a message on /proxy/commands/producerl :

"Back out transaction Y".

The proxy replies 513 that transaction Y has been cancelled

So although the producer wanted to send four messages, when one of the message failed, the producer could decide to back out that whole transaction so only two messages (with ids 1 and 3) were actually sent.

Additional functionality can also be added by the proxy application on behalf of the first messaging system when communicating with a second more sophisticated messaging network.

The proxy application may perform publish/subscribe operations on behalf of an application on a connected point-to-point only messaging network, as follows:

• Proxy application listens for commands on queue "Ql ";

• Producer application puts message to "Ql " on with a topic string included in the header;

• Proxy application publishes the message to the topic listed in the header via the second messaging network;

• Proxy application sends a reply message to a queue which the producer application listens on, reporting if the publish succeeded or not.

The proxy application may perform point-to-point messaging on behalf of an application on a publish/subscribe only messaging network, as follows.

• Proxy application listens for commands on topic: /PROXY/COMMAND S/#

• Producer application publishes to topic: /PROXY/COMMAND S/# and included in the message header is the name of a queue on the second messaging network to put the message to and instructions to do a put;

• Proxy application puts the message to the relevant queue;

• Proxy application publishes a reply message to a topic which the producer application listens on, reporting if the put succeeded or not.

The proxy application may assemble a single large message in response to a series of message fragments sent from an application connected to a more unreliable messaging network. These fragments should also be able to include metadata such as message properties.

• Proxy application listens for commands on queue Ql;

• Producer application puts a message to Ql on the proxy and included in the message header are a sequence number and a flag to say that this is the first message in a sequence;

• Producer application then puts each subsequent message to the proxy application with sequentially increasing sequence numbers, until the last message is sent, which also includes a flag in the header to say it is the last message;

• Proxy application waits until the last message has been received and checks that there are no sequence numbers missing and then assembles the bodies and metadata of all the messages into one large message, which it then sends to the second messaging network;

• Proxy application sends a reply message to a queue which the producer application listens on, reporting if the put succeeded or not.

The proxy application may send multicast messages on behalf of an application connected to a network that does not support multicast.

• Proxy application listens for commands on queue Ql;

• Producer application puts a message to Ql on the proxy application and included in the message header is a flag to instruct the proxy application that this is a multicast message along with any extra information required for the multicast;

• The proxy application then publishes the message as a multicast message via the second messaging network;

• Proxy application sends a reply message to a queue which the producer application listens on, reporting if the put succeeded or not.

A simple messaging network can be connected to a more complex, featureful network and clients connected to the simple network can send and receive messages which look like normal simple messages but have instructions encoded into the message to be interpreted by a proxy application and forwarded by the proxy application to the more featureful network.

The messages from the client which include control instructions may flow through a number of messaging engines that do not understand the instructions before arriving at the proxy that can decode or interpret the instructions and use the advanced features on behalf of the client.

A transactional messaging support system may be provided as a service to a client over a network.

The invention can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment containing both hardware and software elements. In a preferred embodiment, the invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.

The invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer usable or computer readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus or device.

The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk read only memory (CD-ROM), compact disk read/write (CD-RAV), and DVD.

Improvements and modifications can be made to the foregoing without departing from the scope of the present invention.