Progress
External Program
Interfaces
PTP Messaging Examples
The PTP examples consist of a sender and a receiver, and each set should run together. Note that queues cannot be generated on the fly by the clients; queues must be created using the administration tool of the SonicMQ broker.
The path for the PTP messaging examples is:
Sending a Message To a Queue and Receiving a Message From a Queue
Examples 18 and 19 send and receive a message from a queue.
Follow these steps to send a message to a queue and receive a message from a queue:
- Create the GolfQueue queue using the SonicMQ Explorer. (See the SonicMQ Programming Guide for information about creating queues.)
- Run example18.p to send a TextMessage to the GolfQueue.
- Run example19.p to receive a message from the GolfQueue.
Achieving Scalable Server Architecture With PTP Queuing
Examples 20 and 21 use PTP queuing to achieve scalable server architecture. Several instances of example20.p (1 of 2) send requests to a single JMS queue and receive replies from servers that run example21.p (1 of 2). You can add more instances to handle an increasing volume of requests.
Follow these steps to run Examples 20 and 21:
- Create the requestQueue queue using the SonicMQ Explorer.
- Run example20.p (1 of 2) to send requests to the requestQueue queue.
- Run example21.p (1 of 2) to receive requests from the requestQueue queue, execute them, and reply to the requester.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |