use of io.zeebe.logstreams.spi.SnapshotStorage in project zeebe by zeebe-io.
the class StreamProcessorService method start.
@Override
public void start(ServiceStartContext ctx) {
final LogStream logStream = logStreamInjector.getValue();
final SnapshotStorage snapshotStorage = snapshotStorageInjector.getValue();
final ActorScheduler actorScheduler = ctx.getScheduler();
MetadataFilter metadataFilter = versionFilter;
if (customEventFilter != null) {
metadataFilter = metadataFilter.and(customEventFilter);
}
final EventFilter eventFilter = new MetadataEventFilter(metadataFilter);
streamProcessorController = LogStreams.createStreamProcessor(name, id, streamProcessor).logStream(logStream).snapshotStorage(snapshotStorage).snapshotPeriod(Duration.ofMinutes(15)).actorScheduler(actorScheduler).eventFilter(eventFilter).readOnly(readOnly).build();
ctx.async(streamProcessorController.openAsync());
}
Aggregations