Examples of CorrelationData


Examples of org.springframework.amqp.rabbit.support.CorrelationData

      }
    });
    Executors.newSingleThreadExecutor().execute(new Runnable() {
      @Override
      public void run() {
        template.convertAndSend(ROUTE, (Object) "message", new CorrelationData("abc"));
        template.convertAndSend(ROUTE, (Object) "message", new CorrelationData("def"));
        first2SentOnThread1Latch.countDown();
      }
    });
    Executors.newSingleThreadExecutor().execute(new Runnable() {
      @Override
      public void run() {
        try {
          startedProcessingMultiAcksLatch.await();
          template.convertAndSend(ROUTE, (Object) "message", new CorrelationData("ghi"));
          allSentLatch.countDown();
        }
        catch (InterruptedException e) {
          e.printStackTrace();
        }
View Full Code Here

Examples of org.springframework.amqp.rabbit.support.CorrelationData

        latch.countDown();
        return null;
      }
    }).when(logger).error(any());

    CorrelationData correlationData = new CorrelationData("bar");
    String exchange = UUID.randomUUID().toString();
    this.templateWithConfirmsEnabled.convertAndSend(exchange, "key", "foo", correlationData);
    assertTrue(latch.await(10, TimeUnit.SECONDS));
    assertFalse(nack.get());
    assertEquals(correlationData.toString(), correlation.get().toString());
    assertThat(reason.get(), containsString("NOT_FOUND - no exchange '" + exchange));
    assertThat(log.get(), containsString("NOT_FOUND - no exchange '" + exchange));
  }
View Full Code Here

Examples of org.springframework.amqp.rabbit.support.CorrelationData

    for (int i = 0; i < 20; i++) {
      executorService.execute(new Runnable() {

        @Override
        public void run() {
          templateWithConfirmsEnabled.convertAndSend(ROUTE, (Object) "message", new CorrelationData("abc"));
          templateWithConfirmsEnabled.convertAndSend("BAD_ROUTE", (Object) "bad", new CorrelationData("cba"));
        }

      });
    }
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.