Package org.springframework.amqp.rabbit.listener

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


    MissingMessageIdAdvice missingIdAdvice = new MissingMessageIdAdvice(cache);

    Advice retryInterceptor = fb.getObject();
    // add both advices
    container.setAdviceChain(new Advice[] {missingIdAdvice, retryInterceptor});
    container.start();

    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);
View Full Code Here


    MissingMessageIdAdvice missingIdAdvice = new MissingMessageIdAdvice(cache);

    Advice retryInterceptor = fb.getObject();
    // add both advices
    container.setAdviceChain(new Advice[] {missingIdAdvice, retryInterceptor});
    container.start();

    MessageProperties messageProperties = new MessageProperties();
    messageProperties.setContentType("text/plain");
    messageProperties.setMessageId("foo");
    Message message = new Message("Hello, world!".getBytes(), messageProperties);
View Full Code Here

    connectionFactory.setTargetConnectionFactories(factories);

    SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(connectionFactory);
    container.setQueueNames("foo, bar");
    container.afterPropertiesSet();
    container.start();

    Mockito.verify(connectionFactory1, never()).createConnection();
    Mockito.verify(connectionFactory2).createConnection();
    Mockito.verify(defaultConnectionFactory, never()).createConnection();
View Full Code Here

    SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
    container.setConnectionFactory(this.template.getConnectionFactory());
    container.setQueues(REPLY_QUEUE);
    container.setMessageListener(this.template);
    container.start();

    int count = 10;

    final Map<Double, Object> results = new HashMap<Double, Object>();
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.