We can either use the Apache Core Http client or implement a countdown latch on the jdk HttpClient that would lock the client after sending a pipeline amount of files.
My preference would be exploring apache core http client as it seems be more performant.