Websphere MQ functions
The Tricentis TDM WebSphere MQ functions enable users to connect to WebSphere MQ.
For information on the system requirements for the WebSphere MQ functions, see chapter "System requirements for the Tricentis TDM WebSphere MQ Functions".
The sections below list the Tricentis TDM WebSphere MQ functions in alphabetical order.
The Websphere MQ functions are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory. |
ConnectWebSphereMQ
Creates and opens a connection to the given WebSphere MQ message queue.
ConnectWebSphereMQ(
hostName,
port,
channelName,
queueManagerName
[userID,
password]
)
This function consists of the following elements:
Element |
Description |
---|---|
hostName |
A string with the host name or IP address. |
port |
The port number, with the data type integer. |
channelName |
A string with the channel name. |
queueManagerName |
A string with the name of the queuemanager |
userID |
A string with the username for the message queue connection. |
password |
A string with the password for the given user. |
Example:
1 ConnectWebSphereMQ(
"192.168.5.5",
1413,
"CHANNEL1",
"queue.manager.1");
Alternatively, with indication of authentication information:
1 ConnectWebSphereMQ(
"192.168.5.5",
1413,
"CHANNEL1",
"queue.manager.1",
“Tester”,
“pawd123”
);
DisconnectWebSphereMQ
Closes the connection to the WebSphere MQ.
DisconnectWebSphereMQ()
Example:
1 DisconnectWebSphereMQ();
ReadWebSphereMQMessage
Reads a message from the given queue.
ReadWebsphereMessage(
queueName
)
This function consists of the following element:
Element |
Description |
---|---|
queueName |
A string with the name of the queue. |
Example:
1 String Message = ReadWebsphereMessage("QUEUE1");
WriteWebSphereMQMessage
Writes the given message into the given queue.
WriteWebSphereMessage(
queueName,
messageString
)
This function consists of the following elements:
Element |
Description |
---|---|
queueName |
A string with the name of the queue. |
messageString |
A string that contains the message. |
Example:
1 WriteWebSphereMessage(
"QUEUE1",
"This is a Test Message”
);