Claus Ibsen created CAMEL-27864:
-----------------------------------

             Summary: camel-sjms: a transacted producer leaks a connection per 
message, the component jmsKeyFormatStrategy has no effect, 
replyToDeliveryPersistent is not used
                 Key: CAMEL-27864
                 URL: https://issues.apache.org/jira/browse/CAMEL-27864
             Project: Camel
          Issue Type: Bug
          Components: camel-sjms
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Found while improving the option descriptions of camel-sjms for CAMEL-23832 
(pull request https://github.com/apache/camel/pull/31146).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. A transacted or CLIENT_ACKNOWLEDGE producer leaks a connection per 
message
SjmsTemplate.send/execute opens a new Connection for every send, and onClose() 
only adds a {{TransactionOnCompletion}}, which closes the session but never the 
connection (the class has a TODO for it).
Proposed change: pass the Connection to TransactionOnCompletion and close it in 
onDone after commit or rollback.

h4. 2. The component jmsKeyFormatStrategy has no effect
{{SjmsComponent.createEndpoint}} does not copy jmsKeyFormatStrategy to the 
endpoint.
Proposed change: call endpoint.setJmsKeyFormatStrategy(jmsKeyFormatStrategy).

h4. 3. replyToDeliveryPersistent is not used
A consumer reply gets its delivery mode from deliveryPersistent/deliveryMode; 
replyToDeliveryPersistent is never read.
Proposed change: use it in the reply path, or deprecate it.

h4. 4. includeAllJMSXProperties filters the sent messages
In SjmsHeaderFilterStrategy (and JmsHeaderFilterStrategy in camel-jms) the JMSX 
names go to the OUT filter, so the option decides whether JMSX headers are 
sent; the old text was about received messages.
Proposed change: decide which direction is intended.

h4. 5. replyToType cannot change anything
Temporary together with replyTo throws, and Exclusive without replyTo still 
uses a temporary queue (initReplyManager reads replyToType only when replyTo is 
set).
Proposed change: fail fast, or deprecate it.


_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to