-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)type: enhancementA general enhancementA general enhancement
Milestone
Description
Stéphane Nicoll opened SPR-11707 and commented
MessageListenerAdapter
has a reply feature for quite some time: if the method to invoke has a non-void
return type, the result is wrapped in a JMS Message
and sent to the destination defined by the JMSReplyTO
header. There is also a way to specify a default reply destination to use if that header is not set
<jms:listener-container ...>
<jms:listener ... responseDestination="fooBar"/>
</jms:listener-container>
The new JmsListener
has a responseDestination
attribute with the same semantic.
This issue is about considering using @ReplyTo
instead (and therefore removing the responseDestination
attribute.
Several things to consider, following a brainstorming with Rossen Stoyanchev
- Existing users trying to migrate from XML might get confused and look for that attribute. Improving the
@JmsListener
javadoc might help - The Javadoc of
@SendTo
should be revisited to be less imperative. Something to describe that if the incoming message defines where to send the reply, this takes precedence over the value defined by the annotation - Right now,
getReplyChannel
returns theJMSReplyTO
header value for the JMS specific implementation. This shouldn't be as the use of that attribute is reserved forMessageChannel
and are not applicable to simple listeners
Affects: 4.1 RC1
Metadata
Metadata
Assignees
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)type: enhancementA general enhancementA general enhancement