Publishing and Subscribing to TIBCO Rendezvous Messages
Rendezvous programs use messages as the common currency to exchange data. The Rendezvous palette includes activities that allow you to easily setup subjects to send and receive messages. This sample shows how to use Rendezvous activities.
TIBCO Rendezvous™ must be running on the machine.
To run this sample you can either use TIBCO ActiveMatrix BusinessWorks™ 6.x client or ActiveMatrix BusinessWorks™ 5.x as a client.
For more information about how to configure client in TIBCO ActiveMatrix BusinessWorks 5.x, see Configure the Client in TIBCO Designer section.
- Procedure
- In the samples directory, select and double-click tibco.bw.sample.palette.rendezvous.RPC. For more information, see Accessing Samples.
- In the Project Explorer view, expand the tibco.bw.sample.palette.rendezvous.RPC project.
- Set the default ApplicationProfile to match the OS you are running on. For more information, see Setting the Default Application Profile.
- Fully expand the Processes directory and double-click PublishRVmessageProcess.bwp, RendezvousRPC.bwp, and SubscribeRVMessageProcess.bwp.
- Click .
- At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
- Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the checkbox next to tibco.bw.sample.palette.rendezvous.rpc.application.
- Click
Debug.
This runs the sample in Debug mode.
- In TIBCO Designer, import the client project, TIBCO_HOME\bw\n.n\samples\palette\rv\RPC\bw5\tibco.bw.sample.palette.rendezvous.RPCClient.
- Click Global Variables and select the OUTPUT_FILE variables to get the location of the output file.
- Click .
- In
TIBCO Business Studio™ for BusinessWorks™, click the
Terminate
icon to stop the process.
The Console view displays the message similar to the following:
10:49:55.611 INFO [bwThread:In-Memory STWorkProcessor-1] c.t.b.p.g.L.t.b.s.p.r.rpc.Log - Message Published to BW.Start
10:49:57.745 INFO [bwThread:In-Memory STWorkProcessor-7] c.t.b.p.g.L.t.b.s.p.r.rpc.Log - TestCase Completed
10:50:02.759 INFO [bwThread:In-Memory STWorkProcessor-5] c.t.b.p.g.L.t.b.s.p.r.rpc.Log - Recieved Response HELLO WORLD
The output.log file is generated at C:\tmp\RPC that contains the following data:
Message Published to BW.Start
Subscriber to Bw.Start invoked and Message Published on BW.Results
Process completed.Final output is--->>HELLO WORLD
Understanding the Configuration
The Subscribe to BW.Start Rendezvous Subscriber activity listens on the BW.Start subject. On receiving the message on that subject, the process starts the:
- Wait_for_BW.Request activity that is listening to the BW.Request subject.
- Reply_to_BW.Request activity that is listening on the BW.Request subject and BW.Reply subject.
The Wait for Rendezvous Request activity receives the message from the Send Rendezvous Request activity and sends a reply message to the Rendezvous Request activity. A final result message is delivered by the publisher on the subject BW.Result.