Skip to content

Good practise question using RestClientBuilder #396

@DevDPM

Description

@DevDPM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions