use of com.sequenceiq.flow.reactor.eventbus.ConsumerCheckerEventBus in project cloudbreak by hortonworks.
the class FlowIntegrationTestConfig method reactor.
@Bean
public EventBus reactor(MDCCleanerThreadPoolExecutor threadPoolExecutor, Environment env) {
MpscDispatcher dispatcher = new MpscDispatcher("test-dispatcher");
EventBus eventBus = new EventBusSpec().env(env).dispatcher(dispatcher).traceEventPath().consumerNotFoundHandler(new ConsumerNotFoundHandler()).get();
return new ConsumerCheckerEventBus(eventBus);
}
use of com.sequenceiq.flow.reactor.eventbus.ConsumerCheckerEventBus in project cloudbreak by hortonworks.
the class EventBusConfig method reactor.
@Bean
public EventBus reactor(MDCCleanerThreadPoolExecutor threadPoolExecutor, Environment env) {
ThreadPoolExecutorDispatcher dispatcher = new ThreadPoolExecutorDispatcher(eventBusThreadPoolBacklogSize, eventBusThreadPoolCoreSize, threadPoolExecutor);
EventBus eventBus = new EventBusSpec().env(env).dispatcher(dispatcher).traceEventPath().dispatchErrorHandler(throwable -> {
handleFlowFail(throwable, dispatcher);
LOGGER.error("Exception happened in dispatcher", throwable);
}).uncaughtErrorHandler(throwable -> {
handleFlowFail(throwable, dispatcher);
LOGGER.error("Uncaught exception happened", throwable);
}).consumerNotFoundHandler(new ConsumerNotFoundHandler()).get();
return new ConsumerCheckerEventBus(eventBus);
}
Aggregations