Request-Level Client-Side API with multiple connection pools

Is it possible to use multiple connection pools with request-level client-side API? That is, with Http().singleRequest().

I have REST calls to multiple hosts that require different pool configurations but I only see how to do it with host-level client-side API.

Thank you,

I should have looked at the docs more. Is this best I can do with request-level API?

def singleRequest(
request: HttpRequest,
connectionContext: HttpsConnectionContext,
settings: ConnectionPoolSettings,
log: LoggingAdapter)

Hi @apiwoni,

there will be a new pool created for each set of settings passed to singleRequest. So, if you need multiple configuration just pass it in there and it should just work. There’s also a long-standing PR that adds the possibility to specify separate configurations per host directly in the application.conf:


I have looked at pull request and I have implemented similar per target host connection pool override using application.conf. It would be great to see this pull request incorporated in upcoming release.

Thank you!