jersey - Which JerseyClientBuilder to use? -


so i'm developing application on top of dropwizard , in 1 component have call external rest service. want using jerseyclient.

now there 2 implementations available, 1 dropwizard , 1 jersey. using builder have choose between

io.dropwizard.client.jerseyclientbuilder.jerseyclientbuilder 

and

org.glassfish.jersey.client.jerseyclientbuilder 

now former requires environment jerseyclientconfiguration being passed it.

is there reason using dropwizard implementation on vanilla one? what's difference (except timeout)?

thank you

after more digging , asking around, got answer (below). seems better use jerseyclientbuilder comes dropwizard better integrated:

  • one can use jerseyclientconfiguration in order configure jerseyclientbuilder via application configuration (service.yml file).
  • passing environment information enables use of managed thread pool integrated within dropwizard's lifecycle, when dropwizard gets shut down, client.
  • dropwizard's metrics integrated each client can see latency , rate of calls each one, metrics around thread pool sizes.

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -