backoff vs. connectionManager

14 views
Skip to first unread message

Elad Ben David

unread,
Feb 25, 2016, 11:32:03 AM2/25/16
to google-http-java-client
Hi all,

I tried to add "google backoff java client" to my current "apache http client"

I have a few questions if you can help me.

1) How can I use `connectionManager` with google google backoff client for java?
Or I should not even bother regarding this? as There is an underlying pool managed by the client-lib?

2) How can I set the retry times to 3?
Is my only way to set `.setMaxElapsedTimeMillis(MAX_INTERVAL * 3 )` ?


3) Will the backoff policy drain my Threads connection pool?
(I'm using parallelStream to send requests)


Thanks in advance


Eric Anderson

unread,
Feb 25, 2016, 12:54:39 PM2/25/16
to google-http...@googlegroups.com
On Wed, Feb 24, 2016 at 3:09 PM, Elad Ben David <elad...@gmail.com> wrote:
I tried to add "google backoff java client" to my current "apache http client"

I have a few questions if you can help me.

1) How can I use `connectionManager` with google google backoff client for java?
Or I should not even bother regarding this? as There is an underlying pool managed by the client-lib?

I don't follow what this has to do with backoff. You should be able to provide an HttpTransport like normal.

2) How can I set the retry times to 3?
Is my only way to set `.setMaxElapsedTimeMillis(MAX_INTERVAL * 3 )` ?

Effectively. MAX_INTERVAL*3 isn't quite right if you are using exponential backoff, but the general idea is right.

3) Will the backoff policy drain my Threads connection pool?
(I'm using parallelStream to send requests)

Yes. It is implemented using sleeps.
Reply all
Reply to author
Forward
0 new messages