allthingssecurity commented on PR #28262:
URL: https://github.com/apache/camel/pull/28262#issuecomment-6334341276

   Thanks Claus. Pushed 81f6fe21a538 on top:
   
   1. (blocking) `acquireConnection` creates a connection only when the account 
has none. A connection that is not connected is connected and logged in again 
under the account's lock, the same object every holder uses. `reconnect` shares 
that helper, so it now logs in again too (Smack's `login()` with the 
credentials the connection used before). Releasing the last user also 
disconnects a connection that is no longer connected, which stops Smack's 
`ReconnectionManager` from reconnecting it. New 
`connectionAcquiredDuringAnOutageIsTheConnectionOfTheAccount` fails with the 
old code (`A second connection of the account was created`).
   2. The listener removal and `releaseConnection` are in a `finally` after 
`muc.leave()` (consumer) and `chat.leave()` (group chat producer). Two new 
tests fail without it (`expected: <0> but was: <1>` users left).
   3. 4.24 upgrade-guide entry `camel-xmpp - one endpoint per participant and 
user, and one connection per account`: separate endpoints, one session per 
account closed with its last route, `connectionConfig` sharing by instance, and 
the changed `XmppEndpoint.createConnection()`.
   4. With the reconnect logging in, 
`producersOfTheAccountReconnectTheSharedConnectionConcurrently` now also checks 
that a message sent after the reconnects is delivered (it fails without the 
login). What is left is a follow-up JIRA draft for Shashank to file: a producer 
checks only `isConnected()`, so a send between connect and login of another 
reconnect goes out too early; the group chat producer does not enter its room 
again; the consumer's monitor (#28263) should reconnect under the account's 
lock.
   5. I left a reply on that thread; it can be resolved.
   
   The branch still merges cleanly with #28263 and with main (`git 
merge-tree`). camel-xmpp: 20 tests, 0 failures, 5 skipped. I checked the new 
and strengthened tests against the previous production code: 
`connectionAcquired...`, both `...CannotLeaveItsRoom...` tests and the 
concurrent-reconnect delivery check fail there.
   
   _Claude Code on behalf of allthingssecurity_
   


-- 
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