Package com.amazonaws.services.sns.model

Examples of com.amazonaws.services.sns.model.CreateTopicRequest


        String randomSeed = UUID.randomUUID().toString();
        String queueName = "glacier-archive-transfer-" + randomSeed;
        String topicName = "glacier-archive-transfer-" + randomSeed;

        queueUrl = sqs.createQueue(new CreateQueueRequest(queueName)).getQueueUrl();
        topicArn = sns.createTopic(new CreateTopicRequest(topicName)).getTopicArn();
        String queueARN = sqs.getQueueAttributes(new GetQueueAttributesRequest(queueUrl).withAttributeNames("QueueArn")).getAttributes().get("QueueArn");

        Policy sqsPolicy =
            new Policy().withStatements(
                    new Statement(Effect.Allow)
View Full Code Here


    private void setupQueueAndTopic() {
      String queueName = "glacier-archive-transfer-" + System.currentTimeMillis();
      String topicName = "glacier-archive-transfer-" + System.currentTimeMillis();

        queueUrl = sqs.createQueue(new CreateQueueRequest(queueName)).getQueueUrl();
        topicArn = sns.createTopic(new CreateTopicRequest(topicName)).getTopicArn();
        String queueARN = sqs.getQueueAttributes(new GetQueueAttributesRequest(queueUrl).withAttributeNames("QueueArn")).getAttributes().get("QueueArn");

        Policy sqsPolicy =
            new Policy().withStatements(
                    new Statement(Effect.Allow)
View Full Code Here

    private void setupQueueAndTopic() {
        String queueName = "glacier-archive-transfer-" + System.currentTimeMillis();
        String topicName = "glacier-archive-transfer-" + System.currentTimeMillis();

        queueUrl = sqs.createQueue(new CreateQueueRequest(queueName)).getQueueUrl();
        topicArn = sns.createTopic(new CreateTopicRequest(topicName)).getTopicArn();
        String queueARN = sqs.getQueueAttributes(new GetQueueAttributesRequest(queueUrl).withAttributeNames("QueueArn")).getAttributes().get("QueueArn");

        Policy sqsPolicy =
            new Policy().withStatements(
                    new Statement(Effect.Allow)
View Full Code Here

    return com.comcast.cqs.util.Util.getArnForAbsoluteQueueUrl(queues.get(idx + "_" + usr));
  }

  public String getTopic(int idx, USR usr) {
    if (!topics.containsKey(idx)) {
      topics.put(idx + "_" + usr, getCns(usr).createTopic(new CreateTopicRequest(PREFIX + rand.nextInt())).getTopicArn());
      logger.info("created topic " + topics.get(idx + "_" + usr));
    }
    return topics.get(idx + "_" + usr);
  }
View Full Code Here

         
          // create topic
         
          String topicName = "TSTT" + randomGenerator.nextLong();
           
      CreateTopicRequest createTopicRequest = new CreateTopicRequest(topicName);
      CreateTopicResult createTopicResult = sns.createTopic(createTopicRequest);
      String topicArn = createTopicResult.getTopicArn();
     
      // subscribe and confirm cqs endpoint
     
View Full Code Here

    if (parameters.containsKey("Create")) {
   
      try {
       
        CreateTopicRequest createTopicRequest = new CreateTopicRequest(topicName);
        CreateTopicResult createTopicResult = sns.createTopic(createTopicRequest);
       
        arn = createTopicResult.getTopicArn();
       
        SetTopicAttributesRequest setTopicAttributesRequest = new SetTopicAttributesRequest(arn, "DisplayName", displayName);
View Full Code Here

    public void justCreateSubscriptionsFast() {
    long start = System.currentTimeMillis();
    String topicName = "BigTopic100";
      int numThreads = 1;
      int numSubscriptions = 100;
      topicArn = cns1.createTopic(new CreateTopicRequest(topicName)).getTopicArn();
    ScheduledThreadPoolExecutor ep = new ScheduledThreadPoolExecutor(numThreads + 2);
    for (int i=0; i<numThreads; i++) {
      ep.submit(new SubscriptionGenerator(numSubscriptions/numThreads));
    }
    logger.info("event=started");
View Full Code Here

     
      for (int k=0; k<NUM_TOPICS; k++) {
     
        // set up topics
       
        CreateTopicRequest createTopicRequest = new CreateTopicRequest(TOPIC_NAME_PREFIX + k);
 
        CreateTopicResult createTopicResult = sns.createTopic(createTopicRequest);
 
        String topicArn = createTopicResult.getTopicArn();
       
View Full Code Here

        topicArn = topic.getTopicArn();
        break;
      }
    }
    if (topicArn == null) {
      CreateTopicRequest request = new CreateTopicRequest(topicName);
      CreateTopicResult result = client.createTopic(request);
      topicArn = result.getTopicArn();
      log.debug("Topic created, arn: " + topicArn);
    } else {
      log.debug("Topic already created: " + topicArn);
View Full Code Here

    private void setupQueueAndTopic() {
        String queueName = "glacier-archive-transfer-" + System.currentTimeMillis();
        String topicName = "glacier-archive-transfer-" + System.currentTimeMillis();

        queueUrl = sqs.createQueue(new CreateQueueRequest(queueName)).getQueueUrl();
        topicArn = sns.createTopic(new CreateTopicRequest(topicName)).getTopicArn();
        String queueARN = sqs.getQueueAttributes(new GetQueueAttributesRequest(queueUrl).withAttributeNames("QueueArn")).getAttributes().get("QueueArn");

        Policy sqsPolicy =
            new Policy().withStatements(
                    new Statement(Effect.Allow)
View Full Code Here

TOP

Related Classes of com.amazonaws.services.sns.model.CreateTopicRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.