Extending the Coordinated Request Reply Global Cache sample

The global cache enables you to share data across processes running in the same broker or across multiple execution groups. In this sample the Coordinated Request Reply Global Cache Application is deployed to two execution groups, CoordinatedRequestReplyExecGroup and AdditionalCoordinatedRequestReplyExecGroup. The application contains a request and reply message flow. When the sample is deployed the same application is deployed to both execution groups which means the sharing of data across execution groups is seamless and you are unaware which container server(running on an execution group) contains the data added by the Request flow.

To fully demonstrate that the global cache is shared by more than one execution group try the following:

  1. Ensure you have the Coordinated Request Reply Global Cache Application and Coordinated Request Reply Backend Application deployed to both execution groups
  2. In execution group AdditionalCoordinatedRequestReplyExecGroup stop both applications
  3. In execution group CoordinatedRequestReplyExecGroup stop the Reply message flow in Coordinated Request Reply Global Cache Application
  4. Send a message through the Request flow running on CoordinatedRequestReplyExecGroup by selecting Enqueue and clicking the Send Message button in the Requester test client in Coordinated Request Reply Global Cache Application
  5. Stop the Coordinated Request Reply Global Cache Application running on CoordinatedRequestReplyExecGroup
  6. Now start Coordinated Request Reply Global Cache Application on AdditionalCoordinatedRequestReplyExecGroup
  7. Retrieve the reply message, which has been processed on AdditionalCoordinatedRequestReplyExecGroup by selecting Dequeue and clicking the Get Message button in the Requester test client in Coordinated Request Reply Global Cache Application
  8. You have now shown that data added by the Request message flow running on execution group CoordinatedRequestReplyExecGroup was retrieved by the Reply message flow running on execution group AdditionalCoordinatedRequestReplyExecGroup

Back to sample home