Examples of createTopic()


Examples of com.amazonaws.services.sns.AmazonSNSClient.createTopic()

    public void createTopicAndSubscribe(AwsCredential awsCredential, Regions region) {
        MDCBuilder.buildMdcContext(awsCredential);
        AmazonSNSClient amazonSNSClient = awsStackUtil.createSnsClient(region, awsCredential);
        LOGGER.info("Amazon SNS client successfully created.");

        CreateTopicResult createTopicResult = amazonSNSClient.createTopic(CB_TOPIC_NAME);
        LOGGER.info("Amazon SNS topic successfully created. [topic ARN: '{}']", createTopicResult.getTopicArn());

        SnsTopic snsTopic = new SnsTopic();
        snsTopic.setName(CB_TOPIC_NAME);
        snsTopic.setRegion(region);
View Full Code Here

Examples of com.comcast.cns.persistence.CNSTopicCassandraPersistence.createTopic()

            String topicName = "T" + rand.nextLong();

            String userId1 = user1.getUserId();
            String userId2 = user2.getUserId();

            CNSTopic t = topicHandler.createTopic(topicName, topicName, userId2);
            topicArn = t.getArn();

            ICNSSubscriptionPersistence subscriptionHandler = new CNSSubscriptionCassandraPersistence();
            subscriptionHandler.subscribe(CMBTestingConstants.HTTP_ENDPOINT_BASE_URL + "recv/1234", CnsSubscriptionProtocol.http, t.getArn(), userId1);
           
View Full Code Here

Examples of com.comcast.cns.persistence.ICNSTopicPersistence.createTopic()

    try {

      String userId1 = user1.getUserId();

      String topicName = "T" + rand.nextLong();
      CNSTopic t = topicHandler.createTopic(topicName, topicName, userId1);
      topicArn = t.getArn();

      ICNSSubscriptionPersistence subscriptionHandler = new CNSSubscriptionCassandraPersistence();

      for (int i=1; i<=96; i++) {
View Full Code Here

Examples of com.netflix.staash.mesh.db.TopicRegistry.createTopic()

        final TopicRegistry    topics   = new TopicRegistry(new MemoryTopicFactory());
        final InstanceRegistry registry = new InstanceRegistry();
        final ClientFactory    factory  = new MemoryClientFactory();
        final EndpointPolicy   endpointPolicy = new ChordEndpointPolicy();
       
        topics.createTopic("test");
        topics.addEntry("test"new Entry("Key1", "Value1", System.currentTimeMillis()));
        topics.addEntry("test"new Entry("Key2", "Value2", System.currentTimeMillis()));
       
        final AtomicInteger counter = new AtomicInteger();
        final int instanceCount     = 10;
View Full Code Here

Examples of javax.jms.QueueSession.createTopic()

      QueueConnection c = (QueueConnection)cf.createConnection();
      QueueSession s = c.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
     
      try
      {
         s.createTopic("TestTopic");
         fail("should throw IllegalStateException");
      }
      catch(javax.jms.IllegalStateException e)
      {
         // OK
View Full Code Here

Examples of javax.jms.QueueSession.createTopic()

      QueueConnection c = (QueueConnection)getConnectionFactory().createConnection();
      QueueSession s = c.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

      try
      {
         s.createTopic("TestTopic");
         ProxyAssertSupport.fail("should throw IllegalStateException");
      }
      catch (javax.jms.IllegalStateException e)
      {
         // OK
View Full Code Here

Examples of javax.jms.Session.createTopic()

   {
      Connection conn = cf.createConnection();
      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
      try
      {
         sess.createTopic("TopicThatDoesNotExist");
         fail("should throw JMSException");
      }
      catch (JMSException e)
      {
         // OK
View Full Code Here

Examples of javax.jms.Session.createTopic()

   {
      Connection conn = cf.createConnection();
      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
      try
      {
         sess.createTopic("TestQueue");
         fail("should throw JMSException");
      }
      catch (JMSException e)
      {
         // OK
View Full Code Here

Examples of javax.jms.Session.createTopic()

   public void testCreateTopic() throws Exception
   {
      Connection conn = cf.createConnection();     
      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
     
      Topic topic = sess.createTopic("TestTopic");
     
      MessageProducer producer = sess.createProducer(topic);
      producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
     
      MessageConsumer consumer = sess.createConsumer(topic);
View Full Code Here

Examples of javax.jms.Session.createTopic()

      }

      Session session = getSession();
      if (trace)
         log.trace("createTopic " + session + " topicName=" + topicName);
      Topic result = session.createTopic(topicName);
      if (trace)
         log.trace("createdTopic " + session + " topic=" + result);
      return result;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.