Add selector type support for sendAndReceive methods in JmsOperations and JmsTemplate#36177
Add selector type support for sendAndReceive methods in JmsOperations and JmsTemplate#36177pisek wants to merge 4 commits intospring-projects:mainfrom
Conversation
… and JmsTemplate Signed-off-by: Michał Pisarski <pisekfm@o2.pl>
…til constants Signed-off-by: Michał Pisarski <pisekfm@o2.pl>
…ssage IDs Signed-off-by: Michał Pisarski <pisekfm@o2.pl>
Signed-off-by: Michał Pisarski <pisekfm@o2.pl>
|
Frankly, this adds quite a bit of complexity to the If the selector type is commonly configured per provider, it should rather be a JmsTemplate-level setter rather than yet another |
|
Well, they would kindof work - only when you use one thread to call JMS... so yeap - it might be misleading and unusable in common scenarios :/ The setter thing - sure, i will move it to setter then. Composing selector expression - it is rather hard to compose it on top of JmsTemplate as you need messageId that is only set after the message is sent. |
|
In light of this, let's drop the "none" option and use the messageId approach by default for those |
|
@pisek I'm experimenting with my approach above, using a variation of your unit tests. No need to update the PR right now, I'll keep you posted. Let me know if you see a fundamental problem with this approach though. |
|
I've pushed the implicit JMSCorrelationID/JMSMessageID usage as suggested above. While a JMSCorrelationID (if desired) has to be manually set in each From my perspective, this removes the need for the additional method overloads with the enum in this PR. Please give this a try against the latest 7.0.4 snapshot. If anything remains for this to be usable in the 7.0.4 release, let me know. |
For explicit response queue we need correlationId to be used.
There are 2 main approaches depending on JMS provider: