Tabnine Logo
DistributedPubSubMediator$Subscribe
Code IndexAdd Tabnine to your IDE (free)

How to use
DistributedPubSubMediator$Subscribe
in
akka.cluster.pubsub

Best Java code snippets using akka.cluster.pubsub.DistributedPubSubMediator$Subscribe (Showing top 20 results out of 315)

origin: at.researchstudio.sat/won-matcher-service

pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(WonNodeEvent.class.getName(), getSelf()), getSelf());
pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(HintEvent.class.getName(), getSelf()), getSelf());
pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(BulkHintEvent.class.getName(), getSelf()), getSelf());
origin: eclipse/ditto

.match(DistributedPubSubMediator.SubscribeAck.class, subscribeAck ->
    log.debug("Successfully subscribed to distributed pub/sub on topic '{}'",
        subscribeAck.subscribe().topic())
origin: eclipse/ditto

  pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(
      startStreaming.getStreamingType().getDistributedPubSubTopic(),
      connectionCorrelationId,
.match(DistributedPubSubMediator.SubscribeAck.class, subscribeAck -> {
  LogUtil.enhanceLogWithCorrelationId(logger, connectionCorrelationId);
  final String topic = subscribeAck.subscribe().topic();
  final StreamingType streamingType = StreamingType.fromTopic(topic);
  final ActorRef self = getSelf();
origin: eclipse/ditto

.match(DistributedPubSubMediator.SubscribeAck.class, subscribeAck ->
    getLogger().debug("Successfully subscribed to distributed pub/sub on topic '{}'",
        subscribeAck.subscribe().topic())
origin: eclipse/ditto

pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(ThingEvent.TYPE_PREFIX, UPDATER_GROUP, self()),
    self());
pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(PolicyEvent.TYPE_PREFIX, UPDATER_GROUP, self()),
    self());
origin: at.researchstudio.sat/won-matcher-service

pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(WonNodeEvent.class.getName(), getSelf()), getSelf());
pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(CrawlUriMessage.class.getName(), getSelf()), getSelf());
pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(
    ResourceCrawlUriMessage.class.getName(), getSelf()), getSelf());
origin: org.eclipse.ditto/ditto-services-amqpbridge-messaging

@Override
public Receive createReceive() {
  return ReceiveBuilder.create()
      .match(RetrieveConnectionStatusResponse.class, command -> {
        if (!ConnectionStatus.OPEN.equals(command.getConnectionStatus())) {
          connectionIds.remove(command.getConnectionId());
        }
      })
      .match(ConnectionCreated.class,
          event -> persistEvent(event, e -> connectionIds.add(e.getConnectionId())))
      .match(ConnectionOpened.class,
          event -> persistEvent(event, e -> connectionIds.add(e.getConnectionId())))
      .match(ConnectionClosed.class,
          event -> persistEvent(event, e -> connectionIds.remove(e.getConnectionId())))
      .match(ConnectionDeleted.class,
          event -> persistEvent(event, e -> connectionIds.remove(e.getConnectionId())))
      .match(DistributedPubSubMediator.SubscribeAck.class, subscribeAck ->
          log.debug("Successfully subscribed to distributed pub/sub on topic '{}'",
              subscribeAck.subscribe().topic())
      )
      .matchAny(m -> {
        log.warning("Unknown message: {}", m);
        unhandled(m);
      }).build();
}
origin: org.eclipse.ditto/ditto-services-thingsearch-updater-actors

private ThingsUpdater(final int numberOfShards,
    final ShardRegionFactory shardRegionFactory,
    final ThingsSearchUpdaterPersistence searchUpdaterPersistence,
    final CircuitBreaker circuitBreaker,
    final boolean eventProcessingActive,
    final Duration thingUpdaterActivityCheckInterval,
    final int maxBulkSize) {
  final ActorSystem actorSystem = context().system();
  // Start the proxy for the Things and Policies sharding, too.
  final ActorRef thingsShardRegion = shardRegionFactory.getThingsShardRegion(numberOfShards);
  final ActorRef policiesShardRegion = shardRegionFactory.getPoliciesShardRegion(numberOfShards);
  final ActorRef pubSubMediator = DistributedPubSub.get(actorSystem).mediator();
  final Props thingUpdaterProps =
      ThingUpdater.props(searchUpdaterPersistence, circuitBreaker, thingsShardRegion, policiesShardRegion,
          thingUpdaterActivityCheckInterval, ThingUpdater.DEFAULT_THINGS_TIMEOUT, maxBulkSize)
          .withMailbox("akka.actor.custom-updater-mailbox");
  shardRegion = shardRegionFactory.getSearchUpdaterShardRegion(numberOfShards, thingUpdaterProps);
  this.searchUpdaterPersistence = searchUpdaterPersistence;
  materializer = ActorMaterializer.create(getContext());
  retrieveStatisticsDetailsResponseSupplier = RetrieveStatisticsDetailsResponseSupplier.of(shardRegion,
      ThingsSearchConstants.SHARD_REGION, log);
  if (eventProcessingActive) {
    pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(ThingEvent.TYPE_PREFIX, UPDATER_GROUP, self()),
        self());
    pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(PolicyEvent.TYPE_PREFIX, UPDATER_GROUP, self()),
        self());
  }
}
origin: org.eclipse.ditto/ditto-services-amqpbridge-messaging

private ReconnectActor(final ActorRef connectionShardRegion, final ActorRef pubSubMediator) {
  this.connectionShardRegion = connectionShardRegion;
  final Config config = getContext().system().settings().config();
  snapshotThreshold = config.getLong(ConfigKeys.Reconnect.SNAPSHOT_THRESHOLD);
  if (snapshotThreshold < 0) {
    throw new ConfigurationException(String.format("Config setting '%s' must be positive, but is: %d.",
        ConfigKeys.Reconnect.SNAPSHOT_THRESHOLD, snapshotThreshold));
  }
  snapshotAdapter = new MongoReconnectSnapshotAdapter(getContext().system());
  connectionIds = new HashSet<>();
  pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(ConnectionCreated.TYPE, ACTOR_NAME, getSelf()),
      getSelf());
  pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(ConnectionOpened.TYPE, ACTOR_NAME, getSelf()),
      getSelf());
  pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(ConnectionClosed.TYPE, ACTOR_NAME, getSelf()),
      getSelf());
  pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(ConnectionDeleted.TYPE, ACTOR_NAME, getSelf()),
      getSelf());
}
origin: ks-no/eventstore2

@Override
public void preStart() {
  registerSagas();
  try {
    ActorRef mediator =
        DistributedPubSub.get(getContext().system()).mediator();
    mediator.tell(new DistributedPubSubMediator.Subscribe(EventStore.EVENTSTOREMESSAGES, getSelf()),
        getSelf());
  } catch (ConfigurationException e){
    log.info("Not subscribing to eventstore event, no cluster system");
  }
  repository.open();
  subscribe();
  timeoutstore = getContext().actorOf(TimeOutStore.mkProps(repository));
}
origin: eclipse/ditto

private void subscribeForEvents() {
  checkConnectionNotNull();
  // unsubscribe to previously subscribed topics
  unsubscribeFromEvents();
  uniqueTopics = connection.getTargets().stream()
      .flatMap(target -> target.getTopics().stream().map(FilteredTopic::getTopic))
      .collect(Collectors.toSet());
  forEachPubSubTopicDo(pubSubTopic -> {
    final DistributedPubSubMediator.Subscribe subscribe =
        new DistributedPubSubMediator.Subscribe(pubSubTopic, PUB_SUB_GROUP_PREFIX + connectionId,
            getSelf());
    log.debug("Subscribing to pub-sub topic <{}> for connection <{}>.", pubSubTopic, connectionId);
    pubSubMediator.tell(subscribe, getSelf());
  });
}
origin: org.eclipse.ditto/ditto-services-connectivity-messaging

private void subscribeForEvents() {
  checkConnectionNotNull();
  // unsubscribe to previously subscribed topics
  unsubscribeFromEvents();
  uniqueTopics = connection.getTargets().stream()
      .flatMap(target -> target.getTopics().stream().map(FilteredTopic::getTopic))
      .collect(Collectors.toSet());
  forEachPubSubTopicDo(pubSubTopic -> {
    final DistributedPubSubMediator.Subscribe subscribe =
        new DistributedPubSubMediator.Subscribe(pubSubTopic, PUB_SUB_GROUP_PREFIX + connectionId,
            getSelf());
    log.debug("Subscribing to pub-sub topic <{}> for connection <{}>.", pubSubTopic, connectionId);
    pubSubMediator.tell(subscribe, getSelf());
  });
}
origin: eclipse/ditto

private DistributedPubSubMediator.Subscribe subscribe(final String topic, final String group) {
  return new DistributedPubSubMediator.Subscribe(topic, group, getSelf());
}
origin: eclipse/ditto

private void subscribePubSub(final ActorRef pubSubMediator) {
  pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(Shutdown.TYPE, self), self);
}
origin: eclipse/ditto

private void subscribeAck(final DistributedPubSubMediator.SubscribeAck subscribeAck) {
  log.debug("Successfully subscribed to distributed pub/sub on topic '{}'", subscribeAck.subscribe().topic());
}
origin: org.eclipse.ditto/ditto-services-thingsearch-updater-actors

private void subscribeAck(final DistributedPubSubMediator.SubscribeAck subscribeAck) {
  log.debug("Successfully subscribed to distributed pub/sub on topic '{}'", subscribeAck.subscribe().topic());
}
origin: ks-no/eventstore2

@Override
public void preStart() {
  log.debug(getSelf().path().toString());
  try {
    ActorRef mediator =
        DistributedPubSub.get(getContext().system()).mediator();
    mediator.tell(new DistributedPubSubMediator.Subscribe(EventStore.EVENTSTOREMESSAGES, getSelf()),
        getSelf());
  } catch (ConfigurationException e){
    log.info("Not subscribing to eventstore event, no cluster system");
  }
  subscribe();
}
origin: ks-no/eventstore2

@Override
public void preStart() {
  log.debug(getSelf().path().toString());
  try {
    ActorRef mediator =
        DistributedPubSub.get(getContext().system()).mediator();
    mediator.tell(new DistributedPubSubMediator.Subscribe(EventStore.EVENTSTOREMESSAGES, getSelf()),
        getSelf());
  } catch (ConfigurationException e){
    log.info("Not subscribing to eventstore event, no cluster system");
  }
  subscribe();
}
origin: eclipse/ditto

private void subscribeForNamespaceCommands() {
  final ActorRef self = getSelf();
  pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(PurgeNamespace.TYPE, self), self);
}
origin: eclipse/ditto

private void handleSubscribeAck(final DistributedPubSubMediator.SubscribeAck subscribeAck) {
  log.debug("Successfully subscribed to distributed pub/sub on topic <{}>.",
      subscribeAck.subscribe().topic());
}
akka.cluster.pubsubDistributedPubSubMediator$Subscribe

Most used methods

  • <init>
  • topic
  • group

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JComboBox (javax.swing)
  • JPanel (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now