You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should i replace singleUse boolean with two boolean flags? Like replace singleUse in AbstractConnectionFactory with two booleans mentioned above ?
If so it have changes in both client and server factory classes. Also if i understand correctly, we need to use sharedConnection in connection factory for creating / re-using the connections and closeAfterCompletion in adapters to close/keep the connections ?
Also new method getConnection(String connectionId) , should we implement for ThreadAffinityClientConnectionFactory and CachingClientConnectionFactory alone ?
Thanks @garyrussell . Just to make sure I understand correctly. Instead of calling "this.clientConnectionFactory.getConnection() " from adapters, now we should extract the ip_connectionId from message and call this.clientConnectionFactory.getConnection(connectionId).
If the connection is already created , then send that back or create a new one. Also we need to create a Map in AbstractClientConnectionFactory to hold multiple connections, since we dont have that.
No; it should be optional only; by default use the existing getConnection().
Add a SpEL expression property; something like connectionIdExpression; which, if present, tells us to try to get the existing connection by name and, if not present, fall back to the existing getConnection() - we might also need. to provide an option to throw an exception if the connection doesn't exist already.
In most cases, yes, the expression will be headers[ip_connectionId].
Activity
deepak5127 commentedon Sep 10, 2020
Hi @garyrussell , Shall i work on this item ?
artembilan commentedon Sep 10, 2020
@deepak5127 ,
sure! You can take a crack on this and we together can see what to do else in your Pull Request!
deepak5127 commentedon Oct 14, 2020
@artembilan I have couple of questions.
garyrussell commentedon Oct 15, 2020
This is a non-trivial change (hence it's been on the backlog for a while).
deepak5127 commentedon Oct 15, 2020
Thanks @garyrussell . Just to make sure I understand correctly. Instead of calling "this.clientConnectionFactory.getConnection() " from adapters, now we should extract the ip_connectionId from message and call this.clientConnectionFactory.getConnection(connectionId).
If the connection is already created , then send that back or create a new one. Also we need to create a Map in AbstractClientConnectionFactory to hold multiple connections, since we dont have that.
garyrussell commentedon Oct 15, 2020
No; it should be optional only; by default use the existing
getConnection().Add a SpEL expression property; something like
connectionIdExpression; which, if present, tells us to try to get the existing connection by name and, if not present, fall back to the existinggetConnection()- we might also need. to provide an option to throw an exception if the connection doesn't exist already.In most cases, yes, the expression will be
headers[ip_connectionId].Yes, we'll need a map of connections.
deepak5127 commentedon Oct 15, 2020
Thanks @garyrussell . I will work on it.