use of io.zeebe.broker.task.processor.TaskExpireLockStreamProcessor in project zeebe by zeebe-io.
the class TaskQueueManagerService method startExpireLockService.
protected void startExpireLockService(ServiceName<LogStream> logStreamServiceName, LogStream stream, TypedStreamEnvironment env) {
final ServiceName<StreamProcessorController> expireLockStreamProcessorServiceName = taskQueueExpireLockStreamProcessorServiceName(stream.getLogName());
final TaskExpireLockStreamProcessor expireLockStreamProcessor = new TaskExpireLockStreamProcessor(env.buildStreamReader(), env.buildStreamWriter());
final TypedStreamProcessor streamProcessor = expireLockStreamProcessor.createStreamProcessor(env);
final StreamProcessorService expireLockStreamProcessorService = new StreamProcessorService(expireLockStreamProcessorServiceName.getName(), TASK_EXPIRE_LOCK_STREAM_PROCESSOR_ID, streamProcessor).eventFilter(streamProcessor.buildTypeFilter());
serviceContext.createService(expireLockStreamProcessorServiceName, expireLockStreamProcessorService).dependency(logStreamServiceName, expireLockStreamProcessorService.getLogStreamInjector()).dependency(SNAPSHOT_STORAGE_SERVICE, expireLockStreamProcessorService.getSnapshotStorageInjector()).install();
}
Aggregations