Search in sources :

Example 1 with IncidentStreamProcessor

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();
}
Also used : ServerTransport(io.zeebe.transport.ServerTransport) IncidentStreamProcessor(io.zeebe.broker.incident.processor.IncidentStreamProcessor) StreamProcessorController(io.zeebe.logstreams.processor.StreamProcessorController) LogStream(io.zeebe.logstreams.log.LogStream) TypedStreamEnvironment(io.zeebe.broker.logstreams.processor.TypedStreamEnvironment) TypedStreamProcessor(io.zeebe.broker.logstreams.processor.TypedStreamProcessor) StreamProcessorService(io.zeebe.broker.logstreams.processor.StreamProcessorService)

Aggregations

IncidentStreamProcessor (io.zeebe.broker.incident.processor.IncidentStreamProcessor)1 StreamProcessorService (io.zeebe.broker.logstreams.processor.StreamProcessorService)1 TypedStreamEnvironment (io.zeebe.broker.logstreams.processor.TypedStreamEnvironment)1 TypedStreamProcessor (io.zeebe.broker.logstreams.processor.TypedStreamProcessor)1 LogStream (io.zeebe.logstreams.log.LogStream)1 StreamProcessorController (io.zeebe.logstreams.processor.StreamProcessorController)1 ServerTransport (io.zeebe.transport.ServerTransport)1