public class HystrixModule extends AbstractModule
To use it one has to register the module.
By default the module registers a HystrixConcurrencyStrategy
with Hystrix that provides a Registry
backed strategy for caching HystrixRequestVariable
during a Request
. This means that Hystrix will use Ratpack's Request Registry for request caching, request collapsing and request log.
To enable the streaming of Hystrix metrics in text/event-stream format use the sse()
configuration option.
For example: (Groovy DSL)
import ratpack.hystrix.HystrixModule import static ratpack.groovy.Groovy.ratpack ratpack { bindings { add new HystrixModule().sse() } }
This allows Server Sent Event based clients such as the Hystrix Dashboard and
Turbine to consume the metrics being reported by your application in realtime. See
HystrixMetricsEventStreamHandler
for more details.
Constructor and Description |
---|
HystrixModule() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure() |
HystrixModule |
sse()
Enable the reporting of Hystrix metrics via SSE.
|
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
protected void configure()
configure
in class AbstractModule
public HystrixModule sse()
To stream metrics within an application see HystrixMetricsEventStreamHandler
.
HystrixModule