Bug 62856

Summary: JMS Publisher sampler forces Byte Messages in Text Message textfield via XStream
Product: JMeter Reporter: Andrew Burton <adb20>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: enhancement CC: p.mouawad
Priority: P2    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Andrew Burton 2018-10-26 02:41:42 UTC
The JMS Publisher sampler passes Bytes messages that are specified in the Text Message textfield via an XML stream.

If a PreProcessor converts the text to a byte encoded string and passes the variable in the Text Message textfield as a workaround, then this is converted back to String before being sent.

In my use case, I am supplying a byte-encoded JSON text string to the JMS queue/topic, it doesn't need to be converted to XML first.

The only way to have this work is to supply the JSON text in a file.

The desired approach would be to have an option for Bytes Messages to be created directly from the string (either the Text Message textfield or the file), without going via the XML XStream converter.
Comment 1 Andrew Burton 2018-10-26 02:48:10 UTC
The restriction is due to Message Source = Text Area is not supported when choosing a Message Type = Bytes Message.

If choosing Message Type = Object Message, the message is converted to an XML source first (which in the case of a JSON string is not correct).

Probably the help for this sampler (https://jmeter.apache.org/usermanual/component_reference.html#JMS_Publisher) needs to also describe the difference between the Message Types as well.