Finagle 6.34.0
Runtime Behavior Changes
- finagle-core: GenSerialClientDispatcher fails pending and subsequent requests when
its underlying transport closes.RB_ID=807590
New Features
- finagle-core: Include upstream/downstream addresses/client ids and request trace id
in exceptions that extendc.t.f.HasRemoteInfo
(includingc.t.f.SourcedException
),
accessible via theremoteInfo
value.RB_ID=797082
- finagle-core: Introduce
c.t.f.service.ResponseClassifier
for HTTP servers,
which allows developers to give Finagle the additional application specific knowledge
necessary in order to properly classify responses.RB_ID=800179
- finagle: Export two new histograms:
request_payload_bytes
andresponse_payload_bytes
for the following protocols: HTTP (non-chunked), Mux, ThriftMux and Thrift.RB_ID=797821
- finagle-core: Define
c.t.f.Address
to represent an endpoint's physical location.
Resolvers and namers may attach metadata such as weight to individual endpoint addresses.
RB_ID=792209
- finagle-http: Introduce convenience extractors to pattern match
c.t.f.http.Response.status
against the different categories.RB_ID=802953
- finagle-http: Add
toBoolean
method inStringUtil
to parse strings to boolean consistently.
RB_ID=804056
Breaking API Changes
-
finagle-core:
c.t.f.Codec.prepareConnFactory(ServiceFactory)
is markedfinal
, override
c.t.f.Codec.prepareConnFactory(ServiceFactory, Stack.Params)
instead.RB_ID=797821
-
finagle-core:
c.t.f.Codec.newClientDispatcher(Transport)
is markedfinal
, override
c.t.f.Codec.newClientDispatcher(Transport, Stack.Params)
instead.RB_ID=797821
-
finagle-core: Removed deprecations:
RB_ID=800974
- Removed
c.t.f.Service.release
, replace usage withService.close()
. - Removed
c.t.f.ServiceFactory.make
, replace usage withServiceFactory.apply
. - Removed
c.t.f.ProxyServiceFactory
, replace usage withServiceFactoryProxy
. - Removed deprecated
c.t.f.service.FailureAccrualFactory
constructor. - Removed
c.t.f.netty3.ChannelBufferBuf.apply
, replace usage withChannelBufferBuf.Owned.apply
. - Removed
c.t.f.util.InetAddressUtil.Loopback
, replace usage withjava.net.InetAddress.getLoopbackAddress
. - Removed
c.t.f.tracing.TracingFilter
, replace usage withTraceInitializationFilter
and(Client|Server)TracingFilter
.
- Removed
-
finagle-core:
c.t.f.Addr.Bound.addr
type changed fromSet[SocketAddress]
to
Set[c.t.f.Address]
. We provide a migration guide below for the most common cases.Callers of
c.t.f.Addr.Bound.addr
must handleSet[c.t.f.Address]
instead of
Set[SocketAddresses]
. If you do something with theSocketAddress
and expect the underlying
type to beInetSocketAddress
, usec.t.f.Address.Inet.addr
to get the underlying
InetSocketAddress
.c.t.f.Addr
constructors andc.t.f.Name.bound
method now acceptc.t.f.Address
instead
ofSocketAddress
. For most cases, wrapping theInetSocketAddress
in anAddress.Inet
will fix the compile error.Any other
SocketAddress
subclass is currently incompatible withc.t.f.Address
. Instead,
you should encode any additional information in the metadata field ofc.t.f.Address.Inet
orc.t.f.exp.Address.ServiceFactory
.RB_ID=792209
-
finagle-core: Delete
c.t.f.ServiceFactorySocketAddress
and replace usages with
c.t.f.exp.Address.ServiceFactory
.RB_ID=792209
-
finagle-core: Delete
c.t.f.WeightedSocketAddress
and instead use
c.t.f.addr.WeightedAddress
to represent address weights.RB_ID=792209
-
finagle-core:
c.t.f.builder.ClientBuilder.hosts
takes a Seq ofInetSocketAddress
instead of
SocketAddress
. If you get a compile error, change the static type toInetSocketAddress
if
you can. Otherwise, cast it at runtime toInetSocketAddress
.RB_ID=792209
-
finagle-core:
c.t.f.client.Transporter.EndpointAddr
takes ac.t.f.Address
as its
parameter instead ofSocketAddress
.RB_ID=792209
-
finagle-core:
c.t.f.service.FauilureAccrualFactory.Param(FailureAccrualPolicy)
is removed -
it's not safe to configure Failure Accrual with a shareable instance of the policy, use
() => FailureAccrualPolicy
instead.RB_ID=802953
-
finagle-core:
$Client.withSessionQualifier.failureAccrualPolicy
has been removed from the API
since it enables an experimental feature (use Stack's.configured
API instead).RB_ID=802953
-
finagle-core:
c.t.f.service.exp.FailureAccrualPolicies
(Java-friendly API) has bee removed -
usec.t.f.service.exp.FailureAccrualPolicy
instead. -
finagle-memcached:
c.t.f.memcached.protocol.text.Memcached
no longer takes aStatsReceiver
,
pass it to a(Client/Server)Builder
instead.RB_ID=797821
-
finagle-redis:
c.t.f.redis.Redis
no longer takes aStatsReceiver
, pass it to a
(Client/Server)Builder
instead.RB_ID=797821