We use multiple clients in our services rather than sharing one, we needed to add different basic auth (over SSL) credentials for different services so we needed to add different filters to each one.
Using multiple clients is straightforard, in 0.6.2 you need to add new fields to your configuration class, one for each client you want to setup;
private com.yammer.dropwizard.client.JerseyClientConfiguration slow;
private com.yammer.dropwizard.client.JerseyClientConfiguration fast;
…
// getters()
Then configure the clients in your service;
Client slowClient = new JerseyClientBuilder().using(config.getSlow()).using(environment).build();
And in your configuration file;
slow:
timeout: 2000ms
and repeat the process for each one.
hth,
Graham
I haven’t tried in 0.7.0 but I wouldn’t imagine that much has changed beyond the package names