use of io.zeebe.broker.incident.processor.IncidentStreamProcessor in project zeebe by zeebe-io.
the class WorkflowQueueManagerService method installIncidentStreamProcessor.
private void installIncidentStreamProcessor(final LogStream logStream) {
final ServiceName<StreamProcessorController> streamProcessorServiceName = incidentStreamProcessorServiceName(logStream.getLogName());
final String streamProcessorName = streamProcessorServiceName.getName();
final ServerTransport transport = clientApiTransportInjector.getValue();
final ServiceName<LogStream> logStreamServiceName = logStreamServiceName(logStream.getLogName());
final TypedStreamEnvironment env = new TypedStreamEnvironment(logStream, transport.getOutput());
final IncidentStreamProcessor incidentProcessorFactory = new IncidentStreamProcessor();
final TypedStreamProcessor streamProcessor = incidentProcessorFactory.createStreamProcessor(env);
final StreamProcessorService incidentStreamProcessorService = new StreamProcessorService(streamProcessorName, INCIDENT_PROCESSOR_ID, streamProcessor).eventFilter(streamProcessor.buildTypeFilter());
serviceContext.createService(streamProcessorServiceName, incidentStreamProcessorService).dependency(logStreamServiceName, incidentStreamProcessorService.getLogStreamInjector()).dependency(SNAPSHOT_STORAGE_SERVICE, incidentStreamProcessorService.getSnapshotStorageInjector()).install();
}
Aggregations