Hello, Is it possible to have the possibility to set the JMS header properties with numeric values? Thanks.
Bugzilla is not a support forum. Please subscribe to the JMeter user list and ask there.
Hello sebb, I think this is an enhancement request as today you can only pass String properties on JMS Messages: - msg.setStringProperty(name, value); Enhancement would be: JMS Publisher/Point to Point : Add ability to set typed values in JMS header properties.
According to this: http://docs.oracle.com/javaee/6/api/javax/jms/Message.html Message properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMSException. The String-to-primitive conversions may throw a runtime exception if the primitive's valueOf method does not accept the String as a valid representation of the primitive. A value written as the row type can be read as the column type. | | boolean byte short int long float double String |---------------------------------------------------------- |boolean | X X |byte | X X X X X |short | X X X X |int | X X X |long | X X |float | X X X |double | X X |String | X X X X X X X X |---------------------------------------------------------- So currently provided value is convertible to primitive type, writing in String as JMeter does would work fine. But this feature is still interesting to implement.
The JMS spec states that a String property should not get converted to a numeric when used in a selector. This means this feature is in fact very useful and should be implemented. It is even useful in the case the JMS provider is old and would not support those conversions.
Any updates on this? Can anyone provide a proposed patch?
Created attachment 31074 [details] Patch to implement feature
Date: Sun Nov 24 22:21:58 2013 New Revision: 1545089 URL: http://svn.apache.org/r1545089 Log: Bug 55589 - JMS Publisher/Point to Point : Add ability to set typed values in JMS header properties. Bugzilla Id: 55589 Added: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPropertiesPanel.java (with props) jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSProperties.java (with props) jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSProperty.java (with props) Modified: jmeter/trunk/bin/saveservice.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPublisherGui.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java jmeter/trunk/xdocs/changes.xml Date: Sun Nov 24 22:22:55 2013 New Revision: 1545091 URL: http://svn.apache.org/r1545091 Log: Bug 55589 - JMS Publisher/Point to Point : Add ability to set typed values in JMS header properties. Bugzilla Id: 55589 Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Date: Sun Nov 24 22:23:55 2013 New Revision: 1545092 URL: http://svn.apache.org/r1545092 Log: Bug 55589 - JMS Publisher/Point to Point : Add ability to set typed values in JMS header properties. Bugzilla Id: 55589 Modified: jmeter/trunk/bin/saveservice.properties Date: Sun Nov 24 22:24:30 2013 New Revision: 1545094 URL: http://svn.apache.org/r1545094 Log: Bug 55589 - JMS Publisher/Point to Point : Add ability to set typed values in JMS header properties. Bugzilla Id: 55589 Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Date: Sun Nov 24 22:25:42 2013 New Revision: 1545095 URL: http://svn.apache.org/r1545095 Log: Bug 55589 - JMS Publisher/Point to Point : Add ability to set typed values in JMS header properties. set svn:eol Native Bugzilla Id: 55589 Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPropertiesPanel.java (props changed) jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSProperties.java (props changed) jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSProperty.java (props changed)
(In reply to Josh Garlick from comment #5) > Any updates on this? Can anyone provide a proposed patch? This is implemented now and available in nightly build, your feedback is welcome: http://ci.apache.org/projects/jmeter/nightlies/
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3240