Read the entry count per host in the connection pool

32 views
Skip to first unread message

Wouter Lammers

unread,
May 7, 2014, 12:07:45 PM5/7/14
to dispatc...@googlegroups.com
Hello,

We're using Dispatch with Netty a lot, and I was wondering if it's possible to read the entry count per host in the connection pool in some way (and also the total number of connections). I've tried to query http.client.getConfig.getConnectionsPool, but it's null, even though in the log I see the NettyConnectionsPool debug lines like "Entry count for ..." and such. Am I looking in the wrong place?

Regards,
Wouter

Nathan Hamblen

unread,
May 10, 2014, 10:21:03 AM5/10/14
to dispatc...@googlegroups.com
You may need to initialize your own connection pool and set it into the
configuration, in order to have a reference to it later.

AHC's current master is very different from their stable branch, so if
you want to poke around the source be sure to check out tag
async-http-client-1.8.8, the version used in Dispatch 0.11.1. I think
what you want to do is very much possible with a little customization,
though I haven't done it myself. I spend my AHC customization energies
making it possible to exit sbt scala console without ceremony. :\

Nathan
Reply all
Reply to author
Forward
0 new messages