Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set JMSType header field through JMSProperties. #600

Merged
merged 2 commits into from
Jun 24, 2020

Conversation

topicus-pw-dvdouden
Copy link
Contributor

Description

Allow the JMSType header field to be set using the JMSProperties.

Motivation and Context

JMeter seems to assume that all JMS implementations support setting the JMSType header field of a Message through the JMSProperties. This is not necessarily the case. The proprietary JMS implementation I use at our company does not support this and requires the JMSType header field to be set using Message.setJMSType. The JMS spec does not seem to require implementations to set the header fields through the message properties. It does state that JMSCorrelationId, JMSType and JMSReplyTo should be set by the client.
Since there already is a similar fix in place for WebSphereMQ where the JMSCorrelationId is set explicitly when a property with that name is set, it seemed only logical to do the same for JMSType.

How Has This Been Tested?

Ran all unit tests, no test failures so this change does not seem to affect existing code.
Using our proprietary JMS implementation, added message property "JMSType" to a message. Send message, check request headers.
Prior to change: JMSType header field remained empty. A property with the name "JMSType" appeared under "Properties" containing the value.
After change: JMSType header field is set to expected value. No separate property, see screenshot.

Screenshots (if appropriate):

When setting JMSType through properties, the JMSType would end up empty in the request header and a separate "JMSType" property would end up under "Properties:". After this change, the result looks as expected.
image(10)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the [code style][style-guide] of this project.
  • I have updated the documentation accordingly.
    note: since there does not seem to be any documentation for the existing CorrelationId fix, I have not added any documentation for this change.

@topicus-pw-dvdouden topicus-pw-dvdouden changed the title n Set JMSType header field through JMSProperties. Set JMSType header field through JMSProperties. Jun 22, 2020
@pmouawad pmouawad merged commit 8b43d6a into apache:master Jun 24, 2020
@pmouawad
Copy link
Contributor

Thanks for your contribution.
Just to mention you, what is your full name if it's not a secret :-)

Thanks

@topicus-pw-dvdouden
Copy link
Contributor Author

Thanks for merging!
I must've forgotten to set my name somewhere... It's Daniel van den Ouden

kkalinin pushed a commit to kkalinin/jmeter that referenced this pull request Mar 11, 2021
* Set JMSType header field through JMSProperties.

* Fixed indenting

This fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=64555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants