home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / msmqocm.cab / MSMQTEST.TXT < prev    next >
Text File  |  1997-10-06  |  4KB  |  86 lines

  1. MSMQTest.txt
  2.  
  3. MSMQTest is installed on all MSMQ workstations and servers by default.
  4. You can use MSMQTest to test and demonstrate MSMQ functionality. 
  5. Install the MSMQ SDK to install other MSMQ sample applications.
  6.  
  7. MSMQTest demonstrates basic MSMQ functionality in a complete C 
  8. program, including usage of Queue and Message properties and many of 
  9. the MSMQ APIs. MSMQTest sends messages between two or more computers,
  10. or between two instances of MSMQTest on the same computer. You can 
  11. run MSMQTest either as a receiving application (using the -r 
  12. parameter) or as a sending application (using the -s parameter). You 
  13. can run multiple instances of the application in sending or receiving 
  14. mode. All messages you send from an instance of MSMQTest are sent to 
  15. all the MSMQTest queues created by computers running MSMQTest in 
  16. receiving mode. Similarly, computers running MSMQTest in receiving 
  17. mode receive messages from all instances of MSMQTest in sending mode. 
  18.  
  19. Note:  When you install the MSMQ SDK, the MSMQTest source file, 
  20. Msmqtest.c, is installed.
  21.  
  22. The following procedure introduces MSMQTest, demonstrating how you 
  23. can use it to observe basic message queuing functionality.
  24.  
  25. To use MSMQTest:
  26.  
  27. 1. Run two instances of the Windows NT command prompt or the 
  28.    Windows 95 MS-DOS prompt, either on one computer or on two 
  29.    different computers. 
  30.  
  31. 2. In each instance, change to the MSMQ directory (c:\ program 
  32.    files\msmq by default).
  33.  
  34. 3. In one instance, start MSMQTest in receive mode by typing 
  35.    msmqtest -r and then pressing ENTER.
  36.  
  37.    If you run MSMQ Explorer, you see an msmqtest queue has been 
  38.    created on the computer you are using. The queue has no messages.
  39.  
  40. 4. In the other instance, start the MSMQTest in send mode by typing 
  41.    msmqtest -s, and then pressing ENTER.
  42.  
  43. 5. At the Enter a string: prompt, type some text (for example, Hello 
  44.    World) and then press ENTER.
  45.  
  46.    The text you types in the sending application appears in the 
  47.    receiver's command prompt window. If you look at the msmqtest queue
  48.    in MSMQ Explorer, you see it still has no messages. Because all the
  49.    messages have been received by the receiving application, they do
  50.    not appear in the queue.
  51.  
  52. 6. In the command prompt window running MSMQTest in receiving mode, 
  53.    press CTRL+C to exit MSMQTest.
  54.  
  55. 7. In the MSMQTest sending window, type some additional text and press
  56.    ENTER.
  57.  
  58.    If you look at the msmqtest queue in MSMQ Explorer, you see the 
  59.    messages the sending application has sent, but that MSMQ has not 
  60.    yet been able to deliver because the receiving application is no 
  61.    longer running.
  62.  
  63. 8. Restart MSMQTest in receiving mode by typing msmqtest -r, and then
  64.    pressing ENTER.
  65.  
  66.    The messages stored by MSMQ are immediately delivered to the 
  67.    receiving application. If you switch to MSMQ Explorer and press F5
  68.    to refresh the display, you see that the queue has no messages 
  69.    because all the messages have been read by the receiving 
  70.    application.
  71.  
  72. 9. In the MSMQTest sending window, type quit in lowercase, and then 
  73.    press ENTER.
  74.  
  75. If you switch to MSMQ Explorer and press F5to refresh the display, you
  76. see that the queue has been deleted. If you exit the sending 
  77. application by pressing CTRL+C, the queue is not deleted. The queue is
  78. deleted only when you exit the sending application by typing quit in 
  79. lowercase, and then pressing ENTER. 
  80.  
  81. If you exit the sending application while there are undelivered 
  82. messages in the receiving application queue, the queue is not removed.
  83. However, if you run MSMQTest in receiving mode again, it empties the 
  84. queue (displaying each message), removes the queue, and then exits.
  85.  
  86.