Skip to content

Question: Lifetime of a Connection #27

@sll552

Description

@sll552

I have a question regarding the intended usage of this lib.

how long can I keep a Connection Object without closing it? I want to use the SDK in a wrapper class for a long running service, so I would setup the connection using ConnectionBuilder and keep it as field in my wrapper class whose methods are called several times (with long or short timespans between calls) throughout the lifetime of my service. If the service gets restarted/stopped I would call close().

Is this the intended usage or should I build a new connection for each set of calls I have to make to the API and then close it? In the mentioned service this would most likely mean everytime a method in the wrapper is called a new connection is built and closed respectively.

Thanks in advance.

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