Chapter 7 SIM Server
SIM Server
This section will describe how to invoke and use the SIM Server Stress Testing tool. The SIM Server will continuously consume messages and for each incoming messages, send a reply message(s). The reply message's data can be from 1 of 3 Data Sources: A simple input text from the screen or from a text file or from a VEQ Backup file (this file can contain many messages with MQMDs).
The incoming message MUST have the Reply-To-Queue and Reply-To-QMgr fields filled in. The SIM Server will use these fields to sent a reply message to. Also, the incoming message's MsgID field of the MQMD header is copied to the outgoing message's CorrelID field of the MQMD header.
For the Stress Testing Servers (Get, Put, SIM Client & SIM Server), you can have unlimited number of them running (up to what your box can support). Also, while any of the Servers are running, the user can still use MQ Batch Toolkit.
Purpose
Use the SIMServer command to read a message from a queue then write a messages to a reply queue.
The message text for the reply message can be inputted from the command prompt (shell) or be read from a file.
The message can be setup in 1 of 4 ways: binary, string, RFH (Pub/Sub) or RFH2 (JMS).
Syntax
{mqbt or mqbt.sh} SIMServer -a Path_and_FileName_for_CommProfileDB -p Profile_Name -q Queue_Name {-f Input_File_Name -t Text_String} {-d Days -h Minutes -m Hours -n Max_Message_Count} [-S] [-P] [-R] [-r User_Folder]
Function Name:
SIMServer
Required Parameters:
-a The full path and filename for a CommProfileDB.properties file.
-p The name of a profile contained in the CommProfileDB.properties file.
-q The name of the queue (Note: Queue names are case sensitive.)
Requires at least 1 of the following parameters:
-f The full path and filename of the input file.
-t Text string to be used as the message data (enclose text string in quotes).
Requires at least 1 of the following parameters:
-d Consumes messages for 'x' days.
-h Consumes messages for 'x' hours.
-m Consumes messages for 'x' minutes.
-n Maximum number of messages to be read from the queue before terminating.
Optional Parameters:
-S Set the message's MQMD Format field to string (MQSTR).
-P Set the message's MQMD Format field to RFH (MQRFH version 1).
-R Set the message's MQMD Format field to RFH2 (MQRFH version 2).
-r For RFH1 type message, create and set the NameValue pair.
For RFH2 type message, create and set the User Folder to the text.
Example 1
Use SIMServer to reply to 100 incoming messages and each reply will be a binary message.
Windows
mqbt SIMServer -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q -n 100 -f c:\abc.pdf
Unix
./mqbt.sh SIMServer -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q -n 100 -f /abc.pdf
Example 2
Use SIMServer to reply to 200 incoming messages and each reply will be a text string from the command prompt as a 'String' message.
Windows
mqbt SIMServer -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q -S -n 200 -t "This is a test message."
Unix
./mqbt.sh SIMServer -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q -S -n 200 -t "This is a test message."
Example 3
Use SIMServer to reply to 500 incoming messages and each reply will be from a file in the Publish/Subscribe format (RFH).
Windows
mqbt SIMServer -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q -P -n 500 -f -r "MQPSCommand RegSub MQPSTopic" c:\myfile.txt
Unix
./mqbt.sh SIMServer -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q -P -n 500 -r "MQPSCommand RegSub MQPSTopic" -f /myfile.txt
Example 4
Use SIMServer to reply to 175 incoming messages and each reply will be from a file in the JMS format (RFH2) to a queue 175 times.
Windows
mqbt SIMServer -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q -R -n 175 -f c:\myfile.txt
Unix
./mqbt.sh SIMServer -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q -R -n 175 -f /myfile.txt
Example 5
Use SIMServer to reply to all incoming messages and each reply will a 'String' message from a file. SIMServer will terminate after 4 hours of execution.
Windows
mqbt SIMServer -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q -h 4 -f c:\myfile.txt
Unix
./mqbt.sh SIMServer -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q -h 4 -f /myfile.txt
|