Tabnine Logo
TopicRepository.createTopic
Code IndexAdd Tabnine to your IDE (free)

How to use
createTopic
method
in
pl.allegro.tech.hermes.domain.topic.TopicRepository

Best Java code snippets using pl.allegro.tech.hermes.domain.topic.TopicRepository.createTopic (Showing top 2 results out of 315)

origin: allegro/hermes

private void createTopic(Topic topic, String createdBy) {
  topicRepository.createTopic(topic);
  if (!multiDCAwareService.topicExists(topic)) {
    createTopicInBrokers(topic);
    auditor.objectCreated(createdBy, topic);
    topicOwnerCache.onCreatedTopic(topic);
  } else {
    logger.info("Skipping creation of topic {} on brokers, topic already exists", topic.getQualifiedName());
  }
}
origin: allegro/hermes

private SubscriptionName createSubscription(SubscriptionName subscriptionName) {
  Subscription subscription = subscription(subscriptionName).build();
  Group group = Group.from(subscription.getTopicName().getGroupName());
  if (!groupRepository.groupExists(group.getGroupName())) {
    groupRepository.createGroup(group);
  }
  if (!topicRepository.topicExists(subscription.getTopicName())) {
    topicRepository.createTopic(topic(subscription.getTopicName()).build());
  }
  subscriptionRepository.createSubscription(subscription);
  await().atMost(adjust(ONE_SECOND)).until(
      () -> {
        subscriptionRepository.subscriptionExists(subscription.getTopicName(), subscription.getName());
        subscriptionsCaches.forEach(subscriptionsCache ->
            subscriptionsCache.listActiveSubscriptionNames().contains(subscriptionName));
      }
  );
  return subscription.getQualifiedName();
}
pl.allegro.tech.hermes.domain.topicTopicRepositorycreateTopic

Popular methods of TopicRepository

  • getTopicDetails
  • listTopicNames
  • listTopics
  • topicExists
  • ensureTopicExists
  • getTopicsDetails
  • isSubscribingRestricted
  • removeTopic
  • touchTopic
  • updateTopic

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Sublime Text plugins
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