Bug 62856 - JMS Publisher sampler forces Byte Messages in Text Message textfield via XStream
Summary: JMS Publisher sampler forces Byte Messages in Text Message textfield via XStream
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 4.0
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-26 02:41 UTC by Andrew Burton
Modified: 2018-10-29 09:39 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.