Point-to-point
The queue based TradeBrokerMDB asynchronously processes stock purchase and sell requests. In the Trade3 configuration, if the Order Process mode is set to Asynchronous_1-Phase or Asynchronous_2-Phase then instead of an order for some stock being processed immediately, it is handled asynchronously. Upon buying some stock an order is opened in the Trade database and a message sent to a queue. The application then immediately returns to the client. In the background the message is picked up by the TradeBrokerMDB and processed, updating the records in the database to set the order to completed. The next time the client returns to the Web site, they will receive a notification on their Web page that the order completed successfully.
This is using JMS for asynchronous communication within the application. Some important points to note on the influence the functionality has on the topology are:
- The topology required for this part of Trade3 does not require communication with any back-end systems.
- Any cluster member can process the order messages as they update the database. This means that if the client is on Trade3Server1 and the message is processed by Trade3Server2, the client will still receive the notification. This is asynchronous communication with no need for affinity.
- Having one or more JMS servers or WebSphere MQ queue managers will not affect the functionality of the application, nor will using messaging clients.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.