SEZ9 commented on issue #12694:
URL: https://github.com/apache/seatunnel/issues/12694#issuecomment-6098061923

   Thanks for the report — the leak is real. Creating a JMS `Session` and 
`MessageProducer` on every write without closing them will eventually exhaust 
connections on both the broker and the client, so this is worth fixing.
   
   A couple of notes on how we'd like this to land:
   
   1. **One implementation, please.** There are currently two open PRs claiming 
this issue with overlapping lifecycle changes. We don't want to maintain two 
versions of the same fix. Could the authors coordinate, pick one PR to carry 
the work, and close the other once you've confirmed the diffs are equivalent 
(or folded any missing pieces into the retained one)?
   
   2. **Expected shape of the retained fix:**
      - Create the `Session` and `MessageProducer` once per client and reuse 
them across writes.
      - On close, release in order producer → session → connection, and make 
sure that path also runs when initialization fails partway through (e.g. 
connection succeeds but session creation throws).
      - Keep all existing options and their defaults intact; the new 
connection-factory / producer options should be purely additive.
      - Don't surface broker URLs or credentials in log messages or exception 
text.
      - Add tests covering the cleanup path as well as existing send behavior, 
so we can be confident nothing regressed.
   
   Once the consolidated PR is ready for review, please link it here and we'll 
take a look. The issue remains open until that lands in `dev`.
   
   <!-- streview-comment:1657 -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to