Skip to content

Messagequeue

This 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.

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

pip3 install grizzly-loadtester[mq]

Step implementations

Arguments

  • direction RequestDirection - if the request is upstream or downstream

  • endpoint str - specifies details to be able to perform the request, e.g. account and container information

  • name str - name used in locust statistics

  • destination str (optional) - not used by this client

  • source str (optional) - file path of local file that should be put on endpoint

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 have support for Templating.

  • 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>

  • username str (optional) - username to authenticate with, default None

  • password str (optional) - password to authenticate with, default None

  • hostname str - hostname of MQ server

  • port int (optional) - port on MQ server, default 1414

  • endpoint str - prefixed with either topic: or queue: and then the name of the endpoint to perform operations on

  • wait int (optional) - number of seconds to wait for an message, default is to wait infinite (0 seconds)

  • heartbeat int (optional) - number of seconds between heartbeats, default is 300 seconds

  • QueueManager str - name of queue manager

  • Channel str - name of channel to connect to

  • KeyFile str (optional) - path to key repository for certificates needed to connect over TLS

  • SslCipher str (optional) - SSL cipher to use for connection, default ECDHE_RSA_AES_256_GCM_SHA384

  • CertLabel str (optional) - label of certificate in key repository, default username

  • HeaderType str (optional) - header type, can be RFH2 for sending gzip compressed messages using RFH2 header, default None

  • MaxMessageSize int (optional) - maximum number of bytes a message can be for the client to accept it, default is None which implies that the client will throw MQRC_TRUNCATED_MSG_FAILED, adjust buffer and try again.