Skip to content

Messagequeue

formatting...

Task performs IBM MQM get and put opertions to a specified queue or topic.

This is useful if the scenario is another user type than MessageQueueUser, but the scenario still requires an action towards an MQ server. Use Transformer task to extract specific parts of the message.

Warning

Grizzly must have been installed with the extra mq package and native IBM MQ libraries must be installed for being able to use this client task.

pip3 install grizzly-loadtester[mq]

Step implementations

Arguments

Name Type Description Default
direction RequestDirection if the request is upstream or downstream required
endpoint str specifies details to be able to perform the request, e.g. account and container information required
name str name used in locust statistics required
destination str not used by this client None
source str file path of local file that should be put on endpoint None

Format

endpoint

mq[s]://<username>:<password>@]<hostname>[:<port>]/<endpoint>?QueueManager=<queue manager>&Channel=<channel>[&wait=<wait>][&heartbeat=<heartbeat>][&KeyFile=<key repo path>[&SslCipher=<ssl cipher>][&CertLabel=<certificate label>]][&HeaderType=<header type>][&MaxMessageSize=<number of bytes>]

All variables in the endpoint has support for templating.

Name Type Description Default
mq[s] str must be specified, mqs implies connecting with TLS, if KeyFile is not set in querystring, it will look for a key repository in ./<username> required
username str username to authenticate with None
password str password to authenticate with None
hostname str hostname of MQ server required
port int port on MQ server 1414
endpoint str prefixed with either topic: or queue: and then the name of the endpoint to perform operations on required
wait int number of seconds to wait for an message, default is to wait infinite 0
heartbeat int number of seconds between heartbeats 300
QueueManager str name of queue manager required
Channel str name of channel to connect to required
KeyFile str path to key repository for certificates needed to connect over TLS None
SslCipher str SSL cipher to use for connection, default ECDHE_RSA_AES_256_GCM_SHA384 None
CertLabel str label of certificate in key repository username
HeaderType str header type, can be RFH2 for sending gzip compressed messages using RFH2 header None
MaxMessageSize int maximum number of bytes a message can be for the client to accept it, default value implies that the client will throw MQRC_TRUNCATED_MSG_FAILED, adjust buffer and try again. None

Examples

Given value for variable "message" is "none"
Then get from "mqs://$conf::mq.username$:$conf::mq.password$@$conf::mq.endpoint.host$/queue:INCOMING?QueueManager=$conf::mq.endpoint.qm$&Channel=$conf::mq.channel$&KeyFile=$conf::mq.key_file$&wait=1800&MaxMessageSize=16384" with name "get-incoming" and save response payload in "message"