Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Good practise question using RestClientBuilder #396

Open
DevDPM opened this issue Nov 29, 2024 · 0 comments
Open

Good practise question using RestClientBuilder #396

DevDPM opened this issue Nov 29, 2024 · 0 comments

Comments

@DevDPM
Copy link

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

@DevDPM DevDPM changed the title Practise question using RestClientBuilder Good practise question using RestClientBuilder Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant