[ 
https://issues.apache.org/jira/browse/CAMEL-25889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131851#comment-18131851
 ] 

Claus Ibsen commented on CAMEL-25889:
-------------------------------------

Upgrade guide notes for 4.22.3 and 4.18.6 merged on main: 
https://github.com/apache/camel/pull/28440

The camel-4.22.x backport (https://github.com/apache/camel/pull/28439) is still 
open, so the issue stays In Progress until it lands.

_Claude Code on behalf of davsclaus_

> camel-google-mail/drive/calendar/sheets - create the API client per endpoint 
> credentials instead of one per component
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25889
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25889
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-google-calendar, camel-google-drive, 
> camel-google-mail, camel-google-sheets
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.18.6, 4.22.3, 4.24.0
>
>
> The google-mail, google-mail-stream, google-drive, google-calendar, 
> google-calendar-stream, google-sheets and google-sheets-stream components 
> keep a single API client in the component. {{getClient(configuration)}} 
> creates it lazily from the configuration of the first endpoint that asks for 
> one, and returns that same client to every later endpoint of the component, 
> whatever the options of that endpoint are (clientId, clientSecret, 
> refreshToken, accessToken, serviceAccountKey, delegate, scopes, 
> applicationName, and on google-calendar also emailAddress, p12FileName and 
> user).
> Change the seven components to keep one client per distinct set of these 
> options: endpoints with the same options keep sharing a client, endpoints 
> with different options get their own. This is the pattern already used by 
> camel-dhis2, camel-zendesk and camel-box.
> While there:
> * make the lazy creation thread-safe and release the clients when the 
> component stops;
> * honour the endpoint-level {{clientFactory}} option of google-drive, which 
> the component ignores today;
> * add tests with fake client factories for the seven components;
> * add an upgrade guide note.



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

Reply via email to