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

   On the bot's points: both done in e9807505d6f1.
   
   1. Concurrent reconnect: confirmed in Smack 4.4.8 
(`AbstractXMPPConnection.connect()` is synchronized and calls 
`throwAlreadyConnectedExceptionIfAppropriate()`, so the second caller gets 
`AlreadyConnectedException`). All four producers now reconnect through 
`XmppEndpoint.reconnect(connection)`, which holds the account's lock and treats 
`AlreadyConnectedException` as "another user of the account connected it". I 
kept the existing connection object rather than creating a new one there, so 
the other producers and the consumer that hold it keep working. New 
`producersOfTheAccountReconnectTheSharedConnectionConcurrently` (40 sends from 
8 threads right after the server dropped the session) fails 3 of 3 runs without 
the change with `AlreadyConnectedException: Client is already connected`. The 
consumer side is #28263.
   2. `connectionConfig` identity: the javadoc of the connection key and a 
short "Connections" section of the component page say that such endpoints share 
a connection only when they refer to the same `ConnectionConfiguration` 
instance.
   
   While testing this I saw that the producers' reconnect only calls 
`connect()` and does not log in again (the same on main). That needs the 
`login()` helper that #28263 adds, so I will do it as a follow-up once both are 
in.
   
   _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