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
I'm wondering what the better practise is when using RestClientBuilder.
Option 1:
close RestClientBuilder after each request using ie try-with-resources
Option 2:
re-use the RestClientBuilder as part of a Singleton class, which would save time initializing the connection and garbage collection
Basically I'm not sure if the underlying implementation is thread safe and has a http pool, and if it has a http pool, how big is it and how can I configure it.
Thanks,
Daniel
The text was updated successfully, but these errors were encountered:
DevDPM
changed the title
Practise question using RestClientBuilder
Good practise question using RestClientBuilder
Nov 29, 2024
Hello,
I'm wondering what the better practise is when using RestClientBuilder.
Option 1:
close RestClientBuilder after each request using ie try-with-resources
Option 2:
re-use the RestClientBuilder as part of a Singleton class, which would save time initializing the connection and garbage collection
Basically I'm not sure if the underlying implementation is thread safe and has a http pool, and if it has a http pool, how big is it and how can I configure it.
Thanks,
Daniel
The text was updated successfully, but these errors were encountered: