Tuesday, December 7, 2010

Setting JMS DeliveryMode in LoadRunner

I have been scripting SOAP over JMS using LoadRunner SOA protocol and had forgotten that LoadRunner uses value associated with Delivery mode "PERSISTENT" or "NONPERSISTENT"/"NON_PERSISTENT".

Below is the screenshot of what loadRunner Script code & log looked when I used "NONPERSISTENT" text as my parameter in jms_set_message_property function. If you don't know the Deliverymode value, you may think value "2" is for "NONPERSISTENT" mode but that is incorrect as seen in HermesJMS(see following screenshot).

After I updated the function by passing the correct DeliveryMode value, everything looked great as seen from LoadRunner log and HermesJMS.

If you want JMS delivery message to be "PERSISTENT" then you have to use value "2" and for "NONPERSISTENT" message you need to use value "1" in your jms_set_message_property function.

Therefore your jms_set_message_property function will look like this:

jms_set_message_property("MsgDeliveryMode","JMSDeliveryMode","1"); //NONPERSISTENT msg

jms_set_message_property("MsgDeliveryMode","JMSDeliveryMode","2"); //PERSISTENT msg

No comments: