Example usage for org.springframework.jms.listener SimpleMessageListenerContainer setDestinationName

List of usage examples for org.springframework.jms.listener SimpleMessageListenerContainer setDestinationName

Introduction

In this page you can find the example usage for org.springframework.jms.listener SimpleMessageListenerContainer setDestinationName.

Prototype

public void setDestinationName(@Nullable String destinationName) 

Source Link

Document

Set the name of the destination to receive messages from.

Usage

From source file:io.fabric8.quickstarts.activemq.App.java

@Bean
SimpleMessageListenerContainer container(MessageListenerAdapter messageListener,
        ConnectionFactory connectionFactory) {
    SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
    container.setMessageListener(messageListener);
    container.setConnectionFactory(connectionFactory);
    container.setDestinationName(destination);
    return container;
}

From source file:org.openengsb.ports.jms.JMSIncomingPort.java

private SimpleMessageListenerContainer createListenerContainer(String destination, MessageListener listener) {
    SimpleMessageListenerContainer messageListenerContainer = factory.createMessageListenerContainer();
    messageListenerContainer.setPubSubNoLocal(true);
    messageListenerContainer.setConnectionFactory(connectionFactory);
    messageListenerContainer.setDestinationName(destination);
    messageListenerContainer.setMessageListener(listener);
    return messageListenerContainer;
}