Bug 56510 - JMS Publisher/Point to Point: Add JMSPriority and JMSExpiration
Summary: JMS Publisher/Point to Point: Add JMSPriority and JMSExpiration
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.11
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2014-05-11 14:38 UTC by Tom M.
Modified: 2014-07-06 20:37 UTC (History)
2 users (show)



Attachments
Patch for org.apache.jmeter.protocol.jms.client.Publisher (2.12 KB, patch)
2014-05-11 14:41 UTC, Tom M.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom M. 2014-05-11 14:38:44 UTC
In JMeter you can define a list of typed properties for the JMS Publisher which are added to the message before sending. According to the JMS spec there are a couple of headers which are not used at the level of the message rather than at the producer level respectively the send-method. 

There is already a special treatment implemented for JMSDeliveryMode (dedicated checkbox in the gui). Using properties for "JMSPriority" and "JMSExpiration" has no effect since they need to be set in the send-Method not as a message property.
Comment 1 Tom M. 2014-05-11 14:41:08 UTC
Created attachment 31603 [details]
Patch for org.apache.jmeter.protocol.jms.client.Publisher

Added a patch for JMS Publisher, this could be applied in a similar way to JMSSampler (Point-to-Point).

Since there are no tests yet for the package org.apache.jmeter.protocol.jms and a mock framework is yet missing in JMeter I didn't provide a unit test but the patch has been tested while using JMeter.
Comment 2 Philippe Mouawad 2014-06-01 14:36:54 UTC
Thanks for patch.
First I requalify this as an enhancement, as currently JMeter does not handle those 2 Headers.

Regarding patch, I think integrating it as-is would be a bit disturbing as the 2 "properties" are in fact Headers, so allowing users to put them in JMS Properties would be misleading.

According to:
http://docs.oracle.com/javaee/1.4/tutorial/doc/JMS4.html#wp79367

I understand we are not able to set those:
- JMSExpiration
- JMSPriority

Others being set through different ways in JMeter, by broker, or automatically.

I think to be clear, we should introduce 2 custom fields in GUI between timeout and delivery as there is place and it makes sense there.

Tell me if you could rework your patch, if not I will do .

Thanks for contribution.
Comment 3 Tom M. 2014-06-02 18:19:40 UTC
(In reply to Philippe Mouawad from comment #2)
> 
> Regarding patch, I think integrating it as-is would be a bit disturbing as
> the 2 "properties" are in fact Headers, so allowing users to put them in JMS
> Properties would be misleading.
> 

The same would apply to JMSCorrelationID which can be set in the JMS Properties table although it is a header too. Moving this one to a dedicated text field could possibly break backward compatibility, so this has to be taken into account?
Comment 4 Philippe Mouawad 2014-07-01 20:55:33 UTC
Date: Tue Jul  1 20:54:07 2014
New Revision: 1607183

URL: http://svn.apache.org/r1607183
Log:
Bug 56510 - JMS Publisher/Point to Point: Add JMSPriority and JMSExpiration
Bugzilla Id: 56510

Modified:
    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/FixedQueueExecutor.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/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/QueueExecutor.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/TemporaryQueueExecutor.java
    jmeter/trunk/xdocs/changes.xml
Comment 5 Philippe Mouawad 2014-07-01 20:56:24 UTC
Hello Tom M.,
It would be nice if you could test nightly build when it is available and give us some feedback.

Thank you
Comment 6 Tom M. 2014-07-02 17:26:19 UTC
Hi Philippe, sure, I will do some test, but it may take some time. I'll let you know about the results.