Skip to content

JMSTemplate should support setting QoS settings on send [SPR-5183] #9856

Closed
@spring-projects-issues

Description

@spring-projects-issues

Christian Schneider opened SPR-5183 and commented

JMSTemplate currently supports QoS settings like: deliveryMode, priority, timeToLive

While this is ok if you want to set these only once it makes some problems if you want to set them new for each message. If you set the properties before doing the send the code is not threadsafe anymore.
See http://fisheye6.atlassian.com/browse/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?r=700236#l251

I have currently ignored the threading problem but I have to correct this before the new CXF version is released. So what I would like to have is a send method that allows setting the QoS stuff like in producer. Alternatively I would be happy if there is some easy workaround.

This is the code that decides about QoS

protected void doSend(MessageProducer producer, Message message) throws JMSException {
if (isExplicitQosEnabled()) {
producer.send(message, getDeliveryMode(), getPriority(), getTimeToLive());
}
else {
producer.send(message);
}
}


Affects: 2.5.5

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions