Search in sources :

Example 1 with TopicSubscriptionService

use of io.zeebe.broker.event.processor.TopicSubscriptionService in project zeebe by zeebe-io.

the class ControlMessageHandlerManagerService method start.

@Override
public void start(ServiceStartContext context) {
    final Dispatcher controlMessageBuffer = controlMessageBufferInjector.getValue();
    final ServerTransport transport = transportInjector.getValue();
    final ActorScheduler actorScheduler = context.getScheduler();
    final TaskSubscriptionManager taskSubscriptionManager = taskSubscriptionManagerInjector.getValue();
    final TopicSubscriptionService topicSubscriptionService = topicSubscriptionServiceInjector.getValue();
    final SystemPartitionManager systemPartitionManager = systemPartitionManagerInjector.getValue();
    final ServerOutput output = transport.getOutput();
    final List<ControlMessageHandler> controlMessageHandlers = Arrays.asList(new AddTaskSubscriptionHandler(output, taskSubscriptionManager), new IncreaseTaskSubscriptionCreditsHandler(output, taskSubscriptionManager), new RemoveTaskSubscriptionHandler(output, taskSubscriptionManager), new RemoveTopicSubscriptionHandler(output, topicSubscriptionService), new RequestTopologyHandler(output, clusterManagerInjector.getValue()), new RequestPartitionsMessageHandler(output, systemPartitionManager));
    service = new ControlMessageHandlerManager(transport.getOutput(), controlMessageBuffer, controlMessageRequestTimeoutInMillis, actorScheduler, controlMessageHandlers);
    context.async(service.openAsync());
}
Also used : ServerOutput(io.zeebe.transport.ServerOutput) ServerTransport(io.zeebe.transport.ServerTransport) TopicSubscriptionService(io.zeebe.broker.event.processor.TopicSubscriptionService) RemoveTopicSubscriptionHandler(io.zeebe.broker.event.handler.RemoveTopicSubscriptionHandler) SystemPartitionManager(io.zeebe.broker.system.log.SystemPartitionManager) Dispatcher(io.zeebe.dispatcher.Dispatcher) TaskSubscriptionManager(io.zeebe.broker.task.TaskSubscriptionManager) RequestPartitionsMessageHandler(io.zeebe.broker.system.log.RequestPartitionsMessageHandler) RequestTopologyHandler(io.zeebe.broker.clustering.handler.RequestTopologyHandler) ActorScheduler(io.zeebe.util.sched.ActorScheduler)

Example 2 with TopicSubscriptionService

use of io.zeebe.broker.event.processor.TopicSubscriptionService in project zeebe by zeebe-io.

the class LogStreamsComponent method init.

@Override
public void init(SystemContext context) {
    final LogStreamsManagerService streamsManager = new LogStreamsManagerService(context.getConfigurationManager());
    context.getServiceContainer().createService(LOG_STREAMS_MANAGER_SERVICE, streamsManager).install();
    final SnapshotStorageService snapshotStorageService = new SnapshotStorageService(context.getConfigurationManager());
    context.getServiceContainer().createService(SNAPSHOT_STORAGE_SERVICE, snapshotStorageService).install();
    final TopicSubscriptionService topicSubscriptionService = new TopicSubscriptionService(context.getConfigurationManager());
    context.getServiceContainer().createService(TopicSubscriptionServiceNames.TOPIC_SUBSCRIPTION_SERVICE, topicSubscriptionService).dependency(TransportServiceNames.serverTransport(TransportServiceNames.CLIENT_API_SERVER_NAME), topicSubscriptionService.getClientApiTransportInjector()).groupReference(LogStreamServiceNames.WORKFLOW_STREAM_GROUP, topicSubscriptionService.getLogStreamsGroupReference()).install();
}
Also used : TopicSubscriptionService(io.zeebe.broker.event.processor.TopicSubscriptionService)

Aggregations

TopicSubscriptionService (io.zeebe.broker.event.processor.TopicSubscriptionService)2 RequestTopologyHandler (io.zeebe.broker.clustering.handler.RequestTopologyHandler)1 RemoveTopicSubscriptionHandler (io.zeebe.broker.event.handler.RemoveTopicSubscriptionHandler)1 RequestPartitionsMessageHandler (io.zeebe.broker.system.log.RequestPartitionsMessageHandler)1 SystemPartitionManager (io.zeebe.broker.system.log.SystemPartitionManager)1 TaskSubscriptionManager (io.zeebe.broker.task.TaskSubscriptionManager)1 Dispatcher (io.zeebe.dispatcher.Dispatcher)1 ServerOutput (io.zeebe.transport.ServerOutput)1 ServerTransport (io.zeebe.transport.ServerTransport)1 ActorScheduler (io.zeebe.util.sched.ActorScheduler)1