Chapter 5 Deleting a Message
Deleting a Message.
This section will describe how to delete a message from a queue.
Purpose
Use the Delete command to delete messages in the queue.
Syntax
{mqbt or mqbt.sh} Delete -a Path_and_FileName_for_CommProfileDB -p Profile_Name -q Source_Queue_Name [-s Start_Position] [-c Message_Count]
Function Name:
Delete
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.)
Optional Parameters:
-s Start position when getting messages from the queue. The default is 1.
-c Number of messages to be read from the queue. The default is all messages.
Example 1
Delete all messages from in the queue.
Windows
mqbt Delete -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q
Unix
./mqbt.sh Delete -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q
Example 2
Delete 50 messages starting at message number 20 in the queue.
Windows
mqbt Delete -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q -s 20 -c 50
Unix
./mqbt.sh Delete -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q -s 20 -c 50
|