Package org.springframework.amqp.rabbit.listener

Examples of org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.stop()


    template.convertAndSend("retry.test.exchange", "retry.test.binding", "Hello, world!");
    template.convertAndSend("retry.test.exchange", "retry.test.binding", "Hello, world!");
    assertTrue(latch.await(10, TimeUnit.SECONDS));
    Thread.sleep(2000);
    assertEquals(0, ((Map) new DirectFieldAccessor(cache).getPropertyValue("map")).size());
    container.stop();
    ctx.close();
  }

  @SuppressWarnings("rawtypes")
  @Test
View Full Code Here


    template.send("retry.test.exchange", "retry.test.binding", message);
    template.send("retry.test.exchange", "retry.test.binding", message);
    assertTrue(latch.await(10, TimeUnit.SECONDS));
    Thread.sleep(2000);
    assertEquals(0, ((Map) new DirectFieldAccessor(cache).getPropertyValue("map")).size());
    container.stop();
    ctx.close();
  }

  public class POJO {
    public void handleMessage(String foo) {
View Full Code Here

    container.setQueueNames("qux");
    Mockito.verify(connectionFactory1, never()).createConnection();
    Mockito.verify(connectionFactory2, never()).createConnection();
    Mockito.verify(defaultConnectionFactory).createConnection();

    container.stop();
  }


}
View Full Code Here

    } while (receiveCount.get() < count * 2);


    executor.shutdown();
    assertTrue(executor.awaitTermination(10, TimeUnit.SECONDS));
    container.stop();

    assertEquals(count * 2, results.size());

    for (Map.Entry<Double, Object> entry : results.entrySet()) {
      assertEquals(entry.getKey() * 3, entry.getValue());
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.