clj-http

dominicm 2020-12-01T18:02:28.013600Z

I'm trying to limit the number of http connections in order to apply backpressure to my program, so I tried creating a connection manager like so:

(conn/make-reusable-async-conn-manager
    {:threads 1
     :default-per-route 1
     :io-config {:io-thread-count 1}})
and then when I call into clj-http, I set that connection-manager and added a (Thread/sleep 10000) to my response callback. However, I can still make many many requests simultaneously. How do I limit the threadpool that handles the responses to requests?